[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeedu/kstars/kstars/tools
From: Charles Sheridan <casheridan () gmail ! com>
Date: 2010-11-08 2:14:24
Message-ID: 20101108021424.A83ACAC89B () svn ! kde ! org
[Download RAW message or body]
SVN commit 1194060 by sheridan:
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.
M +1 -16 modcalcaltaz.cpp
M +0 -2 modcalcaltaz.h
M +10 -18 modcalcaltaz.ui
M +1 -17 modcalcangdist.cpp
M +0 -2 modcalcangdist.h
M +8 -14 modcalcangdist.ui
M +1 -17 modcalcapcoord.cpp
M +0 -2 modcalcapcoord.h
M +12 -20 modcalcapcoord.ui
M +53 -16 modcalcplanets.ui
M +6 -0 modcalcvlsr.ui
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcaltaz.cpp #1194059:1194060
@@ -59,8 +59,6 @@
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::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
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcaltaz.h #1194059:1194060
@@ -51,8 +51,6 @@
void slotLatChecked();
void slotAzChecked();
void slotElChecked();
- void slotInputFile();
- void slotOutputFile();
void slotRunBatch();
private:
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcaltaz.ui #1194059:1194060
@@ -640,29 +640,23 @@
<property name="spacing" >
<number>6</number>
</property>
+ <item row="0" column="1" >
+ <widget class="KUrlRequester" name="InputLineEditBatch" />
+ </item>
<item row="1" column="1" >
- <widget class="KLineEdit" name="OutputLineEditBatch" />
+ <widget class="KUrlRequester" name="OutputLineEditBatch" />
</item>
- <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="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/>
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcangdist.cpp \
#1194059:1194060 @@ -47,8 +47,6 @@
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,24 +115,10 @@
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;
+ QString inputFileName = InputLineEditBatch->url().toLocalFile();
- inputFileName = InputLineEditBatch->text();
-
// We open the input file and read its content
if ( QFile::exists(inputFileName) ) {
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcangdist.h #1194059:1194060
@@ -42,8 +42,6 @@
void slotValidatePositions();
void slotObjectButton();
void slotResetTitle();
- void slotInputFile();
- void slotOutputFile();
void slotRunBatch();
private:
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcangdist.ui #1194059:1194060
@@ -474,32 +474,26 @@
<property name="spacing" >
<number>6</number>
</property>
+ <item row="0" column="1" >
+ <widget class="KUrlRequester" name="InputLineEditBatch" />
+ </item>
<item row="1" column="1" >
- <widget class="KLineEdit" name="OutputLineEditBatch" />
+ <widget class="KUrlRequester" name="OutputLineEditBatch" />
</item>
<item row="0" column="0" >
- <widget class="QPushButton" name="InputButtonBatch" >
- <property name="toolTip" >
- <string>File with the input data</string>
- </property>
+ <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>
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcapcoord.cpp \
#1194059:1194060 @@ -51,8 +51,6 @@
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,24 +138,10 @@
}
}
-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;
+ QString inputFileName = InputLineEditBatch->url().toLocalFile();
- inputFileName = InputLineEditBatch->text();
-
// We open the input file and read its content
if ( QFile::exists(inputFileName) ) {
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcapcoord.h #1194059:1194060
@@ -53,8 +53,6 @@
void slotRaCheckedBatch();
void slotDecCheckedBatch();
void slotEpochCheckedBatch();
- void slotInputFile();
- void slotOutputFile();
void slotRunBatch();
};
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcapcoord.ui #1194059:1194060
@@ -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>
- <property name="text" >
- <string>Output File...</string>
- </property>
- </widget>
- </item>
<item row="0" column="1" >
- <widget class="KLineEdit" name="InputLineEditBatch" />
+ <widget class="KUrlRequester" name="InputLineEditBatch" />
</item>
+ <item row="1" column="1" >
+ <widget class="KUrlRequester" name="OutputLineEditBatch" />
+ </item>
<item row="0" column="0" >
- <widget class="QPushButton" name="InputButtonBatch" >
- <property name="toolTip" >
- <string>File with the input data</string>
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Input File:</string>
</property>
+ </widget>
+ </item>
+ <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>
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcplanets.ui #1194059:1194060
@@ -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,18 +729,32 @@
<item row="1" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
- <string>Output:</string>
+ <string>Output file:</string>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_15">
- <property name="text">
- <string>Input:</string>
- </property>
+ <item row="1" column="1">
+ <widget class="KUrlRequester" name="OutputFileBoxBatch"/>
+ </item>
+ </layout>
</widget>
</item>
- <item row="1" column="2">
+ <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">
@@ -744,20 +762,39 @@
<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>
+ <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>
- </widget>
</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>
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcvlsr.ui #1194059:1194060
@@ -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>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic