[Kstars-devel] branches/kstars/summer/kstars/kstars/comast
Prakash Mohan
prak902000 at gmail.com
Thu Jul 30 22:30:28 CEST 2009
SVN commit 1004769 by prakash:
Making the FOV Unit input as a KComboBox instead of a KLineEdit
CCMAIL: kstars-devel at kde.org
M +2 -3 equipmentwriter.cpp
M +19 -3 equipmentwriter.ui
--- branches/kstars/summer/kstars/kstars/comast/equipmentwriter.cpp #1004768:1004769
@@ -78,18 +78,17 @@
Comast::Eyepiece *e = ks->data()->logObject()->findEyepieceByName( ui.e_Id->text() );
if( e ){
if( Comast::warningOverwrite( i18n ( "Another Eyepiece already exists with the given Id, Overwrite?" ) ) == KMessageBox::Yes ) {
- e->setEyepiece( ui.e_Id->text(), ui.e_Model->text(), ui.e_Vendor->text(), ui.Fov->value(), ui.FovUnit->text(), ui.e_focalLength->value() );
+ e->setEyepiece( ui.e_Id->text(), ui.e_Model->text(), ui.e_Vendor->text(), ui.Fov->value(), ui.FovUnit->currentText(), ui.e_focalLength->value() );
} else
return;
} else {
- e = new Comast::Eyepiece( ui.e_Id->text(), ui.e_Model->text(), ui.e_Vendor->text(), ui.Fov->value(), ui.FovUnit->text(), ui.e_focalLength->value() );
+ e = new Comast::Eyepiece( ui.e_Id->text(), ui.e_Model->text(), ui.e_Vendor->text(), ui.Fov->value(), ui.FovUnit->currentText(), ui.e_focalLength->value() );
ks->data()->logObject()->eyepieceList()->append( e );
}
saveEquipment(); //Save the new list.
ui.e_Id->clear();
ui.e_Model->clear();
ui.e_Vendor->clear();
- ui.FovUnit->clear();
ui.Fov->setValue(0);
ui.e_focalLength->setValue(0);
}
--- branches/kstars/summer/kstars/kstars/comast/equipmentwriter.ui #1004768:1004769
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>310</width>
- <height>253</height>
+ <width>336</width>
+ <height>275</height>
</rect>
</property>
<layout class="QVBoxLayout" name="_2">
@@ -201,7 +201,18 @@
</widget>
</item>
<item>
- <widget class="KLineEdit" name="FovUnit"/>
+ <widget class="KComboBox" name="FovUnit">
+ <item>
+ <property name="text">
+ <string>deg</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>rad</string>
+ </property>
+ </item>
+ </widget>
</item>
</layout>
</item>
@@ -435,6 +446,11 @@
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
+ <customwidget>
+ <class>KComboBox</class>
+ <extends>QComboBox</extends>
+ <header>kcombobox.h</header>
+ </customwidget>
</customwidgets>
<resources/>
<connections/>
More information about the Kstars-devel
mailing list