[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/kalzium/gsoc2009/kalzium/src
From:       Kashyap Ramesh Puranik <kashthealien () gmail ! com>
Date:       2009-06-20 17:15:58
Message-ID: 1245518158.487081.32055.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 984394 by kashyappuranik:

Mass Calculator added.


 M  +3 -1      CMakeLists.txt  
 M  +21 -23    calculator/calculator.cpp  
 M  +3 -1      calculator/calculator.h  
 M  +3 -3      freeChem/CMakeLists.txt  


--- branches/kalzium/gsoc2009/kalzium/src/CMakeLists.txt #984393:984394
@@ -52,12 +52,14 @@
     calculator/nuclearCalculator.cpp
     calculator/gasCalculator.cpp
     calculator/concCalculator.cpp
+    calculator/massCalculator.cpp
     )
 kde4_add_ui_files(kalziumtools_SRCS
     calculator/calculator.ui
     calculator/nuclearCalculator.ui
     calculator/gasCalculator.ui
     calculator/concCalculator.ui
+    calculator/massCalculator.ui
     )
 message(STATUS "Building the calculator")	
 
@@ -132,7 +134,7 @@
 
 kde4_add_executable(kalzium ${kalzium_SRCS} )
 
-target_link_libraries(kalzium ${KDE4_KHTML_LIBRARY} ${KDE4_KUTILS_LIBRARY} \
${KDE4_KNEWSTUFF2_LIBS} conversion science kdeeduui ) +target_link_libraries(kalzium \
${KDE4_KHTML_LIBRARY} ${KDE4_KUTILS_LIBRARY} ${KDE4_KNEWSTUFF2_LIBS} conversion \
freeChem science kdeeduui)  
 if (OPENBABEL2_FOUND)
     target_link_libraries(kalzium ${OPENBABEL2_LIBRARIES})
--- branches/kalzium/gsoc2009/kalzium/src/calculator/calculator.cpp #984393:984394
@@ -32,24 +32,24 @@
 
     // Add the nuclear calculator to the user interface
     m_nuclearCalculator = new nuclearCalculator(this);
-    ui . stack -> addWidget(m_nuclearCalculator);
+    ui.stack->addWidget(m_nuclearCalculator);
     // Add the gas calculator to the user interface
     m_gasCalculator = new gasCalculator(this);
-    ui . stack -> addWidget(m_gasCalculator);
+    ui.stack->addWidget(m_gasCalculator);
     // Add the concentration calculator to the user interface
     m_concCalculator = new concCalculator(this);
-    ui . stack -> addWidget(m_concCalculator);
+    ui.stack->addWidget(m_concCalculator);
     // Add the molecular mass Calculator widget to the user interface
-    m_molecalculator = new MolcalcWidget(this);
-    m_molecalculator -> setObjectName("molcalcwidget");
-    ui . stack ->addWidget(m_molecalculator);
+	m_massCalculator = new massCalculator(this);
+	ui.stack->addWidget(m_massCalculator);
 #ifdef HAVE_FACILE
     // Add the equation balancer widget to the user interface
     m_equationBalancer = new EQChemDialog(this);
-    ui . stack -> addWidget(m_equationBalancer);
+    ui.stack->addWidget(m_equationBalancer);
 #endif
+
     // Connect the tree item selection signal to the corresponding slot
-    connect(ui . tree, SIGNAL(itemClicked(QTreeWidgetItem * , int)), this,
+    connect(ui.tree, SIGNAL(itemClicked(QTreeWidgetItem * , int)), this,
             SLOT(slotItemSelection(QTreeWidgetItem *)));
 }
 
@@ -65,31 +65,29 @@
     //DEBUG
     kDebug() << "Item clicked: " << item->text(0);
 
-    QString s = item -> text(0);
+    QString s = item->text(0);
 
-    if (!(s . compare(i18n("Introduction"))))
-        ui.stack -> setCurrentWidget(ui.intro);
+    if (!(s.compare(i18n("Introduction"))))
+        ui.stack->setCurrentWidget(ui.intro);
     // Check if nuclear calculator is selected, show the widget in the user \
                interface
-    else if (!(s . compare(i18n("Nuclear Calculator"))))
-        ui.stack -> setCurrentWidget(m_nuclearCalculator);
+    else if (!(s.compare(i18n("Nuclear Calculator"))))
+        ui.stack->setCurrentWidget(m_nuclearCalculator);
 
     // Check if gas calculator is selected, show the widget in the user interface
-    else if (!(s . compare(i18n("Gas Calculator"))))
-        ui.stack -> setCurrentWidget(m_gasCalculator);
+    else if (!(s.compare(i18n("Gas Calculator"))))
+        ui.stack->setCurrentWidget(m_gasCalculator);
 
     // Check if the concentration calculator is selected, sho the widget in the UI \
                if yes
-    else if (!(s . compare(i18n("Concentration Calculator"))))
-        ui.stack -> setCurrentWidget(m_concCalculator);
+    else if (!(s.compare(i18n("Concentration Calculator"))))
+        ui.stack->setCurrentWidget(m_concCalculator);
 
-    // Check if the molecular mass calculator was selected, if yes show it in the UI
-    else if (!(s . compare(i18n("Molecular mass Calculator"))))
-        ui.stack -> setCurrentWidget(m_molecalculator);
-
     // The equation balancer needs FACILE library, if its present HAVE_FACILE = 1
     // If the equation balancer was selected, open it in the UI.
 #ifdef HAVE_FACILE
-    else if (!(s . compare(i18n("Equation Balancer"))))
-        ui . stack -> setCurrentWidget(m_equationBalancer);
+    else if (!(s.compare(i18n("Equation Balancer"))))
+        ui.stack->setCurrentWidget(m_equationBalancer);
 #endif
+	else if (!(s.compare(i18n("Molecular mass Calculator"))))
+		ui.stack->setCurrentWidget(m_massCalculator);
 }
 
--- branches/kalzium/gsoc2009/kalzium/src/calculator/calculator.h #984393:984394
@@ -22,6 +22,7 @@
 #include "nuclearCalculator.h"
 #include "gasCalculator.h"
 #include "concCalculator.h"
+#include "massCalculator.h"
 #include "molcalcwidget.h"
 #include <kactioncollection.h>
 #ifdef HAVE_FACILE
@@ -46,7 +47,8 @@
     KActionCollection * m_actionCollection;
     nuclearCalculator * m_nuclearCalculator;    // The nuclear calculator
     gasCalculator *     m_gasCalculator;        // The gas calculator
-    concCalculator *    m_concCalculator;       // The concentration Calculator
+    concCalculator *    m_concCalculator;       // The concentration calculator
+    massCalculator *    m_massCalculator;		// The molecular mass calculator
     MolcalcWidget *     m_molecalculator;       // The molecular mass calculator
 #ifdef HAVE_FACILE
     EQChemDialog *      m_equationBalancer;     // The equation balancer
--- branches/kalzium/gsoc2009/kalzium/src/freeChem/CMakeLists.txt #984393:984394
@@ -7,16 +7,16 @@
     chemistry.cpp
     cycle.cpp
     document.cpp
+    formula.cpp   
+    element.cpp
     isotope.cpp
     matrix2d.cpp
     molecule.cpp
     object.cpp
     residue.cpp
+    value.cpp  
     vector.cpp
     xml-utils.cpp
-    value.cpp    
-    formula.cpp    
-    element.cpp    
 )
 
 set(freeChem_HEADERS


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic