Commit 1cb5a86d authored by Charles Sheridan's avatar Charles Sheridan
Browse files

Changes to the Calculator for consistency in the Batch Mode UI for Solar...

Changes to the Calculator for consistency in the Batch Mode UI for Solar System->Planets Coordinates, Coordinate Converters->Apparent Coordinates, Coordinate Converters->Horizontal Coordinates, Coordinate Converters->Angular Distance, and Coordinate Converters->LSR Velocity.

svn path=/trunk/KDE/kdeedu/kstars/; revision=1194060
parent 44d644c7
......@@ -59,8 +59,6 @@ modCalcAltAz::modCalcAltAz(QWidget *parentSplit)
connect(Alt, SIGNAL(editingFinished()), this, SLOT(slotCompute()));
connect(runButtonBatch, SIGNAL(clicked()), this, SLOT(slotRunBatch()));
connect(InputButtonBatch, SIGNAL(clicked()), this, SLOT(slotInputFile()));
connect(OutputButtonBatch, SIGNAL(clicked()), this, SLOT(slotOutputFile()));
connect(utCheckBatch, SIGNAL(clicked()), this, SLOT(slotUtChecked()));
connect(dateCheckBatch, SIGNAL(clicked()), this, SLOT(slotDateChecked()));
connect(azCheckBatch, SIGNAL(clicked()), this, SLOT(slotAzChecked()));
......@@ -227,22 +225,9 @@ void modCalcAltAz::equNoCheck() {
}
void modCalcAltAz::slotInputFile() {
QString inputFileName;
inputFileName = KFileDialog::getOpenFileName( );
InputLineEditBatch->setText( inputFileName );
}
void modCalcAltAz::slotOutputFile() {
QString outputFileName;
outputFileName = KFileDialog::getSaveFileName( );
OutputLineEditBatch->setText( outputFileName );
}
void modCalcAltAz::slotRunBatch() {
QString inputFileName;
inputFileName = InputLineEditBatch->text();
QString inputFileName = InputLineEditBatch->url().toLocalFile();
// We open the input file and read its content
......
......@@ -51,8 +51,6 @@ public slots:
void slotLatChecked();
void slotAzChecked();
void slotElChecked();
void slotInputFile();
void slotOutputFile();
void slotRunBatch();
private:
......
......@@ -640,29 +640,23 @@
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="1" >
<widget class="KLineEdit" name="OutputLineEditBatch" />
<item row="0" column="1" >
<widget class="KUrlRequester" name="InputLineEditBatch" />
</item>
<item row="1" column="0" >
<widget class="QPushButton" name="OutputButtonBatch" >
<property name="toolTip" >
<string>File for the output data</string>
</property>
<item row="1" column="1" >
<widget class="KUrlRequester" name="OutputLineEditBatch" />
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Output File...</string>
<string>Input File:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="KLineEdit" name="InputLineEditBatch" />
</item>
<item row="0" column="0" >
<widget class="QPushButton" name="InputButtonBatch" >
<property name="toolTip" >
<string>File with the input data</string>
</property>
<item row="1" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Input File...</string>
<string>Output File:</string>
</property>
</widget>
</item>
......@@ -798,9 +792,7 @@
<tabstop>allRadioBatch</tabstop>
<tabstop>inputRadioBatch</tabstop>
<tabstop>OutputLineEditBatch</tabstop>
<tabstop>OutputButtonBatch</tabstop>
<tabstop>InputLineEditBatch</tabstop>
<tabstop>InputButtonBatch</tabstop>
<tabstop>runButtonBatch</tabstop>
</tabstops>
<resources/>
......
......@@ -47,8 +47,6 @@ modCalcAngDist::modCalcAngDist(QWidget *parentSplit)
connect( SecondDec, SIGNAL(textEdited(QString)), this, SLOT(slotResetTitle()) );
connect( FirstObjectButton, SIGNAL(clicked()), this, SLOT(slotObjectButton()) );
connect( SecondObjectButton, SIGNAL(clicked()), this, SLOT(slotObjectButton()) );
connect( InputButtonBatch, SIGNAL(clicked()), this, SLOT(slotInputFile()) );
connect( OutputButtonBatch, SIGNAL(clicked()), this, SLOT(slotOutputFile()) );
connect( runButtonBatch, SIGNAL(clicked()), this, SLOT(slotRunBatch()) );
show();
......@@ -117,23 +115,9 @@ void modCalcAngDist::slotResetTitle() {
SecondPositionBox->setTitle( i18n("Second position") );
}
void modCalcAngDist::slotInputFile() {
QString inputFileName;
inputFileName = KFileDialog::getOpenFileName( );
InputLineEditBatch->setText( inputFileName );
}
void modCalcAngDist::slotOutputFile() {
QString outputFileName;
outputFileName = KFileDialog::getSaveFileName( );
OutputLineEditBatch->setText( outputFileName );
}
void modCalcAngDist::slotRunBatch() {
QString inputFileName;
inputFileName = InputLineEditBatch->text();
QString inputFileName = InputLineEditBatch->url().toLocalFile();
// We open the input file and read its content
......
......@@ -42,8 +42,6 @@ public slots:
void slotValidatePositions();
void slotObjectButton();
void slotResetTitle();
void slotInputFile();
void slotOutputFile();
void slotRunBatch();
private:
......
......@@ -474,32 +474,26 @@
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="1" >
<widget class="KLineEdit" name="OutputLineEditBatch" />
<item row="0" column="1" >
<widget class="KUrlRequester" name="InputLineEditBatch" />
</item>
<item row="0" column="0" >
<widget class="QPushButton" name="InputButtonBatch" >
<property name="toolTip" >
<string>File with the input data</string>
</property>
<item row="1" column="1" >
<widget class="KUrlRequester" name="OutputLineEditBatch" />
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Input File...</string>
<string>Input File:</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QPushButton" name="OutputButtonBatch" >
<property name="toolTip" >
<string>File for the output data</string>
</property>
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Output File...</string>
<string>Output File:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="KLineEdit" name="InputLineEditBatch" />
</item>
</layout>
</widget>
</item>
......
......@@ -51,8 +51,6 @@ modCalcApCoord::modCalcApCoord(QWidget *parentSplit)
connect( raCheckBatch, SIGNAL(clicked()), this, SLOT(slotRaCheckedBatch()) );
connect( decCheckBatch, SIGNAL(clicked()), this, SLOT(slotDecCheckedBatch()) );
connect( epochCheckBatch, SIGNAL(clicked()), this, SLOT(slotEpochCheckedBatch()) );
connect( InputButtonBatch, SIGNAL(clicked()), this, SLOT(slotInputFile()) );
connect( OutputButtonBatch, SIGNAL(clicked()), this, SLOT(slotOutputFile()) );
connect( runButtonBatch, SIGNAL(clicked()), this, SLOT(slotRunBatch()) );
show();
......@@ -140,23 +138,9 @@ void modCalcApCoord::slotEpochCheckedBatch(){
}
}
void modCalcApCoord::slotInputFile() {
QString inputFileName;
inputFileName = KFileDialog::getOpenFileName( );
InputLineEditBatch->setText( inputFileName );
}
void modCalcApCoord::slotOutputFile() {
QString outputFileName;
outputFileName = KFileDialog::getSaveFileName( );
OutputLineEditBatch->setText( outputFileName );
}
void modCalcApCoord::slotRunBatch() {
QString inputFileName;
inputFileName = InputLineEditBatch->text();
QString inputFileName = InputLineEditBatch->url().toLocalFile();
// We open the input file and read its content
......
......@@ -53,8 +53,6 @@ private slots:
void slotRaCheckedBatch();
void slotDecCheckedBatch();
void slotEpochCheckedBatch();
void slotInputFile();
void slotOutputFile();
void slotRunBatch();
};
......
......@@ -547,32 +547,26 @@
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="0" >
<widget class="QPushButton" name="OutputButtonBatch" >
<property name="toolTip" >
<string>File for the output data</string>
</property>
<item row="0" column="1" >
<widget class="KUrlRequester" name="InputLineEditBatch" />
</item>
<item row="1" column="1" >
<widget class="KUrlRequester" name="OutputLineEditBatch" />
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Output File...</string>
<string>Input File:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="KLineEdit" name="InputLineEditBatch" />
</item>
<item row="0" column="0" >
<widget class="QPushButton" name="InputButtonBatch" >
<property name="toolTip" >
<string>File with the input data</string>
</property>
<item row="1" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Input File...</string>
<string>Output File:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="KLineEdit" name="OutputLineEditBatch" />
</item>
</layout>
</widget>
</item>
......@@ -690,11 +684,9 @@
<tabstop>NowButton</tabstop>
<tabstop>UT</tabstop>
<tabstop>InputLineEditBatch</tabstop>
<tabstop>OutputButtonBatch</tabstop>
<tabstop>decCheckBatch</tabstop>
<tabstop>OutputLineEditBatch</tabstop>
<tabstop>runButtonBatch</tabstop>
<tabstop>InputButtonBatch</tabstop>
<tabstop>inputRadioBatch</tabstop>
<tabstop>raCheckBatch</tabstop>
<tabstop>dateCheckBatch</tabstop>
......
......@@ -716,8 +716,12 @@
<property name="spacing">
<number>6</number>
</property>
<item row="1" column="1">
<widget class="KUrlRequester" name="OutputFileBoxBatch"/>
<item row="0" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Input file:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KUrlRequester" name="InputFileBoxBatch"/>
......@@ -725,39 +729,72 @@
<item row="1" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Output:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Input:</string>
<string>Output file:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="KPushButton" name="RunButtonBatch">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>Run</string>
</property>
</widget>
<item row="1" column="1">
<widget class="KUrlRequester" name="OutputFileBoxBatch"/>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>151</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="KPushButton" name="RunButtonBatch">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Run</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>131</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
......
......@@ -740,6 +740,12 @@
</item>
<item>
<widget class="KPushButton" name="RunButtonBatch" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Run</string>
</property>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment