[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeedu/kalzium/src/calculator
From: Kashyap Ramesh Puranik <kashthealien () gmail ! com>
Date: 2009-07-02 14:44:05
Message-ID: 1246545845.966196.12406.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 990499 by kashyappuranik:
Fixing a couple of silly bugs in the nuclear calculator and nuclear calculator, \
misplaced init functions and invalid SIGNAL SLOT connections.
M +1 -1 concCalculator.cpp
M +5 -5 gasCalculator.cpp
M +10 -4 nuclearCalculator.cpp
--- trunk/KDE/kdeedu/kalzium/src/calculator/concCalculator.cpp #990498:990499
@@ -66,7 +66,7 @@
this, SLOT(concentrationChanged(double)));
connect(ui.mode, SIGNAL(activated(int)),
this, SLOT(setMode(int)));
- connect(ui.reset, SIGNAL(clicked(int)),
+ connect(ui.reset, SIGNAL(clicked()),
this, SLOT(init()));
/**************************************************************************/
--- trunk/KDE/kdeedu/kalzium/src/calculator/gasCalculator.cpp #990498:990499
@@ -69,6 +69,11 @@
gasCalculator:: ~gasCalculator()
{
+
+}
+
+void gasCalculator::init()
+{
ui.molarMass-> setValue(2.008);
ui.temp -> setValue(273.0);
ui.volume -> setValue(22.400);
@@ -97,11 +102,6 @@
setMode(3);
}
-
-void gasCalculator::init()
-{
-
-}
/*
Note:-
--- trunk/KDE/kdeedu/kalzium/src/calculator/nuclearCalculator.cpp #990498:990499
@@ -75,8 +75,10 @@
this, SLOT(timeChanged()));
connect(ui.slider, SIGNAL(valueChanged(int)),
this, SLOT(sliderMoved(int)));
+ connect(ui.mode, SIGNAL(activated(int)),
+ this, SLOT(setMode(int)));
connect(ui.reset, SIGNAL(clicked()),
- this, SLOT(setMode(int)));
+ this, SLOT(init()));
/**************************************************************************/
// Nuclear Calculator setup complete
@@ -96,16 +98,20 @@
ui.element -> setCurrentIndex(91);
ui.isotope -> setCurrentIndex(18);
ui.halfLife -> setValue(list.at(18) -> halflife());
+ ui.initAmt -> setValue(6.0);
+ ui.finalAmt -> setValue(3.0);
+ ui.time -> setValue(list.at(18) -> halflife());
+
QString tempStr;
tempStr.setNum(list.at(18) -> mass());
ui.mass -> setText(tempStr);
// Setup of the UI done
// Initialise values
- m_initAmount = Value(0.0, "g") ;
- m_finalAmount = Value(0.0, "g");
+ m_initAmount = Value(6.0, "g") ;
+ m_finalAmount = Value(3.0, "g");
m_mass = list.at(18) -> mass();
- m_time = Value(0.0, "y");
+ m_time = Value((list.at(18) -> halflife()), "y");
m_halfLife = Value(list.at(18) -> halflife(), "y");
m_element = * KalziumDataObject::instance() -> element(92);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic