[Kalzium] KDE/kdeedu/kalzium/src

Prakash Mohan prak902000 at gmail.com
Fri Dec 4 11:28:44 CET 2009


SVN commit 1058339 by prakash:

Making the result of the molecular mass copyable.
Thanks for the patch, Subhashini Venugopalan.

CCMAIL:kalzium at kde.org


 M  +6 -3      molcalcwidget.cpp  
 M  +19 -8     molcalcwidgetbase.ui  


--- trunk/KDE/kdeedu/kalzium/src/molcalcwidget.cpp #1058338:1058339
@@ -171,6 +171,7 @@
 	// Clear the widgets.
 	ui.resultLabel->clear();
 	ui.resultMass->clear();
+	ui.resultValue->hide();
 	
 	ui.resultComposition->setText( i18n("Enter a formula in the\nwidget above and\nclick on 'Calc'.\nE.g. #Et#OH") );
 
@@ -228,9 +229,11 @@
         ui.resultComposition->setText( compositionString(m_elementMap) );
 
         // The mass
-        ui.resultMass->setText( i18n( "Molecular mass: %1 u", m_mass ) );
-
-        ui.resultMass->setToolTip(        complexString );
+        ui.resultMass->setText( i18n( "Molecular mass: ") );
+        
+        ui.resultValue->setText( QString::number(m_mass) + " u" ); 
+	    ui.resultValue->show();
+        ui.resultMass->setToolTip(  complexString );
         ui.resultComposition->setToolTip( complexString );
 
 #if 0
--- trunk/KDE/kdeedu/kalzium/src/molcalcwidgetbase.ui #1058338:1058339
@@ -112,14 +112,25 @@
         </widget>
        </item>
        <item>
-        <widget class="QLabel" name="resultMass">
-         <property name="text">
-          <string/>
-         </property>
-         <property name="wordWrap">
-          <bool>true</bool>
-         </property>
-        </widget>
+        <layout class="QHBoxLayout" name="horizontalLayout_4">
+         <item>
+          <widget class="QLabel" name="resultMass">
+           <property name="text">
+            <string/>
+           </property>
+           <property name="wordWrap">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="KLineEdit" name="resultValue">
+           <property name="readOnly">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </item>
        <item>
         <widget class="QLabel" name="resultLabel">


More information about the Kalzium mailing list