[Kstars-devel] branches/kstars/summer/kstars/kstars/comast
Prakash Mohan
prak902000 at gmail.com
Mon Jul 27 08:03:49 CEST 2009
SVN commit 1002843 by prakash:
The load and save equiment functions need not be under any slots, they are just public member functions.
CCMAIL: kstars-devel at kde.org
M +7 -7 equipmentwriter.cpp
M +2 -2 equipmentwriter.h
--- branches/kstars/summer/kstars/kstars/comast/equipmentwriter.cpp #1002842:1002843
@@ -36,7 +36,7 @@
setCaption( i18n( "Equipment Writer" ) );
setButtons( KDialog::Close );
ks = KStars::Instance();
- slotLoadEquipment();
+ loadEquipment();
//make connections
connect( this, SIGNAL( closeClicked() ), this, SLOT( slotClose() ) );
@@ -62,7 +62,7 @@
ks->data()->logObject()->scopeList()->append( s );
}
- slotSaveEquipment(); //Save the new list.
+ saveEquipment(); //Save the new list.
ui.Id->clear();
ui.Model->clear();
ui.Vendor->clear();
@@ -85,7 +85,7 @@
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() );
ks->data()->logObject()->eyepieceList()->append( e );
}
- slotSaveEquipment(); //Save the new list.
+ saveEquipment(); //Save the new list.
ui.e_Id->clear();
ui.e_Model->clear();
ui.e_Vendor->clear();
@@ -109,7 +109,7 @@
l = new Comast::Lens( ui.l_Id->text(), ui.l_Model->text(), ui.l_Vendor->text(), ui.l_Factor->value() );
ks->data()->logObject()->lensList()->append( l );
}
- slotSaveEquipment(); //Save the new list.
+ saveEquipment(); //Save the new list.
ui.l_Id->clear();
ui.l_Model->clear();
ui.l_Vendor->clear();
@@ -131,7 +131,7 @@
f = new Comast::Filter( ui.f_Id->text(), ui.f_Model->text(), ui.f_Vendor->text(), ui.f_Type->text(), ui.f_Color->text() );
ks->data()->logObject()->filterList()->append( f );
}
- slotSaveEquipment(); //Save the new list.
+ saveEquipment(); //Save the new list.
ui.f_Id->clear();
ui.f_Model->clear();
ui.f_Vendor->clear();
@@ -139,7 +139,7 @@
ui.f_Color->clear();
}
-void EquipmentWriter::slotSaveEquipment() {
+void EquipmentWriter::saveEquipment() {
QFile f;
f.setFileName( KStandardDirs::locateLocal( "appdata", "equipmentlist.xml" ) );
if ( ! f.open( QIODevice::WriteOnly ) ) {
@@ -157,7 +157,7 @@
f.close();
}
-void EquipmentWriter::slotLoadEquipment() {
+void EquipmentWriter::loadEquipment() {
QFile f;
f.setFileName( KStandardDirs::locateLocal( "appdata", "equipmentlist.xml" ) );
if( ! f.open( QIODevice::ReadOnly ) )
--- branches/kstars/summer/kstars/kstars/comast/equipmentwriter.h #1002842:1002843
@@ -32,6 +32,8 @@
Q_OBJECT
public:
EquipmentWriter();
+ void saveEquipment();
+ void loadEquipment();
public slots:
void slotAddScope();
@@ -39,8 +41,6 @@
void slotAddLens();
void slotAddFilter();
void slotClose() { hide(); }
- void slotSaveEquipment();
- void slotLoadEquipment();
private:
KStars *ks;
More information about the Kstars-devel
mailing list