[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kstars] kstars: Adding XPlanet Recenter ability
From:       Jasem Mutlaq <null () kde ! org>
Date:       2018-09-01 18:49:27
Message-ID: E1fwAxb-0004RR-7p () code ! kde ! org
[Download RAW message or body]

Git commit 4e8b61f535d91d7a577c3d19ebd0955dccb1187e by Jasem Mutlaq, on behalf of Robert Lancaster.
Committed on 01/09/2018 at 18:49.
Pushed by mutlaqja into branch 'master'.

Adding XPlanet Recenter ability
Making left mouse button change position and right mouse chane location
Adding Reset Recenter button
Adding Reset Location button
Adding buttons for Xplanet config to make file selection easier

Reviewers: lancaster

Subscribers: kde-edu

Tags: #kde_edu

Differential Revision: https://phabricator.kde.org/D15210

M  +53   -2    kstars/auxiliary/xplanetimageviewer.cpp
M  +6    -0    kstars/auxiliary/xplanetimageviewer.h
M  +64   -9    kstars/xplanet/opsxplanet.cpp
M  +5    -0    kstars/xplanet/opsxplanet.h
M  +178  -85   kstars/xplanet/opsxplanet.ui

https://commits.kde.org/kstars/4e8b61f535d91d7a577c3d19ebd0955dccb1187e

diff --git a/kstars/auxiliary/xplanetimageviewer.cpp b/kstars/auxiliary/xplanetimageviewer.cpp
index adb9d590d..80b5d8f72 100644
--- a/kstars/auxiliary/xplanetimageviewer.cpp
+++ b/kstars/auxiliary/xplanetimageviewer.cpp
@@ -171,7 +171,10 @@ void XPlanetImageLabel::mouseMoveEvent(QMouseEvent *e)
         QPoint newPoint = e->globalPos();
         int dx = newPoint.x() - m_LastMousePoint.x();
         int dy = newPoint.y() - m_LastMousePoint.y();
-        emit changePosition(QPoint(dx, dy));
+        if(e->buttons() & Qt::RightButton)
+            emit changeLocation(QPoint(dx, dy));
+        if(e->buttons() & Qt::LeftButton)
+            emit changePosition(QPoint(dx, dy));
         m_LastMousePoint = newPoint;
     }
     e->accept();
@@ -252,6 +255,15 @@ XPlanetImageViewer::XPlanetImageViewer(const QString &obj, QWidget *parent): QDi
     m_PositionDisplay->setDisabled(true);
     selectorsLayout->addWidget(m_PositionDisplay);
 
+    QPushButton *resetXPlanetLocation = new QPushButton(this);
+    resetXPlanetLocation->setIcon(QIcon::fromTheme("system-reboot"));
+    resetXPlanetLocation->setAttribute(Qt::WA_LayoutUsesWidgetRect);
+    resetXPlanetLocation->setMaximumSize(QSize(32,32));
+    resetXPlanetLocation->setMinimumSize(QSize(32,32));
+    resetXPlanetLocation->setToolTip(i18n("Reset XPlanet Location to the location specified in the \
XPlanet Options")); +    selectorsLayout->addWidget(resetXPlanetLocation);
+    connect(resetXPlanetLocation, SIGNAL(clicked()), this, SLOT(resetLocation()));
+
     m_FreeRotate = new QPushButton(this);
     m_FreeRotate->setIcon(QIcon::fromTheme("object-rotate-left"));
     m_FreeRotate->setAttribute(Qt::WA_LayoutUsesWidgetRect);
@@ -262,6 +274,15 @@ XPlanetImageViewer::XPlanetImageViewer(const QString &obj, QWidget *parent): QDi
     selectorsLayout->addWidget(m_FreeRotate);
     connect(m_FreeRotate, SIGNAL(clicked()), this, SLOT(slotFreeRotate()));
 
+    QPushButton *reCenterB = new QPushButton(this);
+    reCenterB->setIcon(QIcon::fromTheme("snap-bounding-box-center"));
+    reCenterB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
+    reCenterB->setMaximumSize(QSize(32,32));
+    reCenterB->setMinimumSize(QSize(32,32));
+    reCenterB->setToolTip(i18n("Recenters the XPlanet image once it has been moved"));
+    selectorsLayout->addWidget(reCenterB);
+    connect(reCenterB, SIGNAL(clicked()), this, SLOT(reCenterXPlanet()));
+
     QPushButton *saveB = new QPushButton(this);
     saveB->setIcon(QIcon::fromTheme("document-save"));
     saveB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
@@ -472,6 +493,7 @@ XPlanetImageViewer::XPlanetImageViewer(const QString &obj, QWidget *parent): QDi
     connect(m_View, SIGNAL(zoomIn()), this, SLOT(zoomInXPlanetFOV()));
     connect(m_View, SIGNAL(zoomOut()), this, SLOT(zoomOutXPlanetFOV()));
     connect(m_View, SIGNAL(changePosition(QPoint)), this, SLOT(changeXPlanetPosition(QPoint)));
+    connect(m_View, SIGNAL(changeLocation(QPoint)), this, SLOT(changeXPlanetLocation(QPoint)));
 
     //Reverse colors
     QPalette p = palette();
@@ -615,6 +637,11 @@ void XPlanetImageViewer::startXplanet()
     else
         args << "-origin" << m_OriginName;
 
+    //Centering
+    //This allows you to recenter the xplanet view
+
+    args << "-center" << "+" + QString::number(Options::xplanetWidth() / 2 + center.x()) + "+" + \
QString::number(Options::xplanetHeight() / 2 + center.y()); +
     // Projection
     if (Options::xplanetProjection())
     {
@@ -864,6 +891,7 @@ void XPlanetImageViewer::updateXPlanetTime(int timeShift){
 }
 
 void XPlanetImageViewer::updateXPlanetObject(int objectIndex){
+    center = QPoint(0,0);
     m_CurrentObjectIndex = objectIndex;
     m_ObjectName = m_ObjectNames.at(objectIndex);
 
@@ -878,6 +906,7 @@ void XPlanetImageViewer::updateXPlanetObject(int objectIndex){
 
 void XPlanetImageViewer::updateXPlanetOrigin(int originIndex)
 {
+    center = QPoint(0,0);
     m_CurrentOriginIndex = originIndex;
     m_OriginName = m_ObjectNames.at(originIndex);
     if(m_CurrentObjectIndex == m_CurrentOriginIndex)
@@ -888,7 +917,7 @@ void XPlanetImageViewer::updateXPlanetOrigin(int originIndex)
     startXplanet();
 }
 
-void XPlanetImageViewer::changeXPlanetPosition(QPoint delta)
+void XPlanetImageViewer::changeXPlanetLocation(QPoint delta)
 {
     if(m_CurrentObjectIndex == m_CurrentOriginIndex)
     {
@@ -905,6 +934,28 @@ void XPlanetImageViewer::changeXPlanetPosition(QPoint delta)
     }
 }
 
+void XPlanetImageViewer::changeXPlanetPosition(QPoint delta)
+{
+    center.setX(center.x() + delta.x());
+    center.setY(center.y() + delta.y());
+    startXplanet();
+}
+
+void XPlanetImageViewer::reCenterXPlanet()
+{
+    center = QPoint(0,0);
+    startXplanet();
+}
+
+void XPlanetImageViewer::resetLocation()
+{
+    m_lat = Options::xplanetLatitude().toDouble();
+    m_lon = Options::xplanetLongitude().toDouble();
+    m_Radius = 45;
+    updatePositionDisplay();
+    startXplanet();
+}
+
 void XPlanetImageViewer::slotFreeRotate()
 {
     if(m_FreeRotate->isChecked())
diff --git a/kstars/auxiliary/xplanetimageviewer.h b/kstars/auxiliary/xplanetimageviewer.h
index fb18c1181..b13e31554 100644
--- a/kstars/auxiliary/xplanetimageviewer.h
+++ b/kstars/auxiliary/xplanetimageviewer.h
@@ -65,6 +65,7 @@ class XPlanetImageLabel : public QFrame
     void zoomIn();
     void zoomOut();
     void changePosition(QPoint);
+    void changeLocation(QPoint);
 
   protected:
     void paintEvent(QPaintEvent *e) override;
@@ -158,6 +159,7 @@ class XPlanetImageViewer : public QDialog
     double m_FOV { 0 };
     double m_lat { 0 };
     double m_lon { 0 };
+    QPoint center;
 
 #ifndef Q_OS_WIN
     QFutureWatcher<bool> fifoImageLoadWatcher;
@@ -215,11 +217,15 @@ class XPlanetImageViewer : public QDialog
     void resetXPlanetRotation();
     void invertXPlanetRotation();
 
+    void reCenterXPlanet();
+
     // Free Rotation slots
     void changeXPlanetPosition(QPoint delta);
+    void changeXPlanetLocation(QPoint delta);
     void slotFreeRotate();
     void updateStates();
     void updatePositionDisplay();
+    void resetLocation();
 
     // Field of View slots
     void zoomInXPlanetFOV();
diff --git a/kstars/xplanet/opsxplanet.cpp b/kstars/xplanet/opsxplanet.cpp
index c702c80b6..4494365a9 100644
--- a/kstars/xplanet/opsxplanet.cpp
+++ b/kstars/xplanet/opsxplanet.cpp
@@ -20,6 +20,7 @@
 #include "kstarsdata.h"
 #include "Options.h"
 #include <QDesktopServices>
+#include <QFileDialog>
 
 OpsXplanet::OpsXplanet(KStars *_ks) : QFrame(_ks), ksw(_ks)
 {
@@ -63,8 +64,20 @@ OpsXplanet::OpsXplanet(KStars *_ks) : QFrame(_ks), ksw(_ks)
     connect(kcfg_XplanetBackground, SIGNAL(toggled(bool)), SLOT(slotBackgroundWidgets(bool)));
 
     kcfg_XplanetConfigFilePath->setEnabled(Options::xplanetConfigFile());
+    configFileB->setEnabled(Options::xplanetConfigFile());
+    configFileB->setIcon(QIcon::fromTheme("document-open-folder"));
+    configFileB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
+    connect(configFileB, SIGNAL(clicked()), this, SLOT(slotSelectConfigFile()));
     kcfg_XplanetStarmapPath->setEnabled(Options::xplanetStarmap());
+    starmapFileB->setEnabled(Options::xplanetStarmap());
+    starmapFileB->setIcon(QIcon::fromTheme("document-open-folder"));
+    starmapFileB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
+    connect(starmapFileB, SIGNAL(clicked()), this, SLOT(slotSelectStarMapFile()));
     kcfg_XplanetArcFilePath->setEnabled(Options::xplanetArcFile());
+    arcFileB->setEnabled(Options::xplanetArcFile());
+    arcFileB->setIcon(QIcon::fromTheme("document-open-folder"));
+    arcFileB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
+    connect(arcFileB, SIGNAL(clicked()), this, SLOT(slotSelectArcFile()));
     kcfg_XplanetLabelLocalTime->setEnabled(Options::xplanetLabel());
     kcfg_XplanetLabelGMT->setEnabled(Options::xplanetLabel());
     textLabelXplanetLabelString->setEnabled(Options::xplanetLabel());
@@ -101,26 +114,29 @@ OpsXplanet::OpsXplanet(KStars *_ks) : QFrame(_ks), ksw(_ks)
         kcfg_XplanetUseFIFO->setToolTip(i18n("FIFO files are not supported on Windows"));
     #endif
 
-
     connect(openXPlanetMaps, SIGNAL(clicked()),this,SLOT(showXPlanetMapsDirectory()));
 }
 
 void OpsXplanet::showXPlanetMapsDirectory()
 {
 
-    QString xplanetMapsDir;
-    if (Options::xplanetIsInternal())
-        xplanetMapsDir = QCoreApplication::applicationDirPath() + "/xplanet/share/xplanet/images";
-    else
-        xplanetMapsDir = Options::xplanetPath() + "../share/xplanet/images";
+    QString xplanetMapsDir = XPlanetShareDirectory() + QDir::separator() + "images";
+
+    QUrl path = QUrl::fromLocalFile(xplanetMapsDir);
+    QDesktopServices::openUrl(path);
+}
 
+QString OpsXplanet::XPlanetShareDirectory()
+{
     #ifdef Q_OS_WIN
         const QFileInfo xPlanetLocationInfo(Options::xplanetPath());
-        xplanetMapsDir = xPlanetLocationInfo.dir().absolutePath() + QDir::separator() + "xplanet" + \
QDir::separator() + "images"; +        return xPlanetLocationInfo.dir().absolutePath() + \
QDir::separator() + "xplanet";  #endif
 
-    QUrl path = QUrl::fromLocalFile(xplanetMapsDir);
-    QDesktopServices::openUrl(path);
+    if (Options::xplanetIsInternal())
+        return QCoreApplication::applicationDirPath() + "/xplanet/share/xplanet";
+    else
+        return Options::xplanetPath() + "../share/xplanet";
 }
 
 void OpsXplanet::toggleXPlanetInternal()
@@ -135,16 +151,19 @@ void OpsXplanet::toggleXPlanetInternal()
 void OpsXplanet::slotConfigFileWidgets(bool on)
 {
     kcfg_XplanetConfigFilePath->setEnabled(on);
+    configFileB->setEnabled(on);
 }
 
 void OpsXplanet::slotStarmapFileWidgets(bool on)
 {
     kcfg_XplanetStarmapPath->setEnabled(on);
+    starmapFileB->setEnabled(on);
 }
 
 void OpsXplanet::slotArcFileWidgets(bool on)
 {
     kcfg_XplanetArcFilePath->setEnabled(on);
+    arcFileB->setEnabled(on);
 }
 
 void OpsXplanet::slotLabelWidgets(bool on)
@@ -202,3 +221,39 @@ void OpsXplanet::slotBackgroundWidgets(bool on)
     kcfg_XplanetBackgroundColor->setEnabled(on);
     kcfg_XplanetBackgroundColorValue->setEnabled(on);
 }
+
+void OpsXplanet::slotSelectConfigFile()
+{
+    QString xplanetConfig = XPlanetShareDirectory() + QDir::separator() + "config";
+    QString file =
+        QFileDialog::getOpenFileName(KStars::Instance(), i18n("Select XPlanet Config File"), \
xplanetConfig); +
+    if (!file.isEmpty())
+        kcfg_XplanetConfigFilePath->setText(QFileInfo(file).completeBaseName());
+
+}
+
+void OpsXplanet::slotSelectStarMapFile()
+{
+    QString xplanetStarMap = XPlanetShareDirectory() + QDir::separator() + "stars";
+
+    QString file =
+        QFileDialog::getOpenFileName(KStars::Instance(), i18n("Select XPlanet Star Map File"), \
xplanetStarMap); +
+    if (!file.isEmpty())
+        kcfg_XplanetStarmapPath->setText(QFileInfo(file).completeBaseName());
+
+}
+
+void OpsXplanet::slotSelectArcFile()
+{
+
+    QString xplanetArc = XPlanetShareDirectory() + QDir::separator() + "arcs";
+
+    QString file =
+        QFileDialog::getOpenFileName(KStars::Instance(), i18n("Select XPlanet Arc File"), xplanetArc);
+
+    if (!file.isEmpty())
+        kcfg_XplanetArcFilePath->setText(QFileInfo(file).completeBaseName());
+
+}
diff --git a/kstars/xplanet/opsxplanet.h b/kstars/xplanet/opsxplanet.h
index cbf32f70f..7637eff8d 100644
--- a/kstars/xplanet/opsxplanet.h
+++ b/kstars/xplanet/opsxplanet.h
@@ -31,6 +31,8 @@ class OpsXplanet : public QFrame, public Ui::OpsXplanet
   private:
     KStars *ksw { nullptr };
 
+    QString XPlanetShareDirectory();
+
   private slots:
     void showXPlanetMapsDirectory();
     void slotConfigFileWidgets(bool on);
@@ -42,4 +44,7 @@ class OpsXplanet : public QFrame, public Ui::OpsXplanet
     void slotProjectionWidgets(int index);
     void slotBackgroundWidgets(bool on);
     void toggleXPlanetInternal();
+    void slotSelectConfigFile();
+    void slotSelectStarMapFile();
+    void slotSelectArcFile();
 };
diff --git a/kstars/xplanet/opsxplanet.ui b/kstars/xplanet/opsxplanet.ui
index 49e769fb9..1d148bf9c 100644
--- a/kstars/xplanet/opsxplanet.ui
+++ b/kstars/xplanet/opsxplanet.ui
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>622</width>
-    <height>647</height>
+    <height>665</height>
    </rect>
   </property>
   <layout class="QGridLayout" name="gridLayout">
@@ -207,53 +207,47 @@
            <property name="labelAlignment">
             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
            </property>
-           <item row="2" column="0">
-            <widget class="QCheckBox" name="kcfg_XplanetFOV">
+           <item row="1" column="0">
+            <widget class="QCheckBox" name="kcfg_XplanetUseFIFO">
              <property name="toolTip">
               <string>Use kstars's FOV?</string>
              </property>
              <property name="whatsThis">
-              <string>If checked, use kstars's FOV.</string>
+              <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If checked, XPlanet will use a FIFO \
file in the /tmp directory to temporarily save the XPlanet image for KStars to load them and update the \
view.  If not checked, XPlanet will actually save the files to the XPlanet folder in the KStars data \
directory.  Using a FIFO file should save the hard disk from excessive reads/writes and may offer a \
performance enhancement.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>  </property>
              <property name="text">
-              <string>Use kstars's FOV</string>
+              <string>Use FIFO File</string>
              </property>
             </widget>
            </item>
-           <item row="4" column="1">
-            <layout class="QHBoxLayout" name="horizontalLayout_3"/>
-           </item>
-           <item row="6" column="0">
-            <widget class="QLabel" name="textLabelXplanetGlare">
+           <item row="1" column="1">
+            <widget class="QLabel" name="label_5">
              <property name="text">
-              <string>Glare of Sun:</string>
+              <string>(saves to memory instead of a hard disk)</string>
              </property>
             </widget>
            </item>
-           <item row="6" column="1">
-            <widget class="QSpinBox" name="kcfg_XplanetGlare">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
+           <item row="2" column="0">
+            <widget class="QCheckBox" name="kcfg_XplanetFOV">
              <property name="toolTip">
-              <string>Radius of the glare around the Sun.</string>
+              <string>Use kstars's FOV?</string>
              </property>
              <property name="whatsThis">
-              <string>Draw a glare around the sun with a radius of the specified value larger than the \
Sun.  The default value is 28.</string> +              <string>If checked, use kstars's FOV.</string>
+             </property>
+             <property name="text">
+              <string>Use kstars's FOV</string>
              </property>
             </widget>
            </item>
-           <item row="7" column="0">
+           <item row="6" column="0">
             <widget class="QLabel" name="textLabelXplanetMagnitude">
              <property name="text">
               <string>Base magnitude:</string>
              </property>
             </widget>
            </item>
-           <item row="7" column="1">
+           <item row="6" column="1">
             <widget class="QSpinBox" name="kcfg_XplanetMagnitude">
              <property name="sizePolicy">
               <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@@ -269,7 +263,65 @@
              </property>
             </widget>
            </item>
-           <item row="9" column="0">
+           <item row="8" column="1">
+            <widget class="QWidget" name="widget" native="true"/>
+           </item>
+           <item row="10" column="0">
+            <widget class="QCheckBox" name="kcfg_XplanetConfigFile">
+             <property name="text">
+              <string>Config file:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="10" column="1">
+            <layout class="QHBoxLayout" name="horizontalLayout_3" stretch="0,0">
+             <property name="sizeConstraint">
+              <enum>QLayout::SetMaximumSize</enum>
+             </property>
+             <property name="leftMargin">
+              <number>0</number>
+             </property>
+             <property name="topMargin">
+              <number>0</number>
+             </property>
+             <item>
+              <widget class="QLineEdit" name="kcfg_XplanetConfigFilePath">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Config file path</string>
+               </property>
+               <property name="whatsThis">
+                <string>Use the specified configuration file</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QPushButton" name="configFileB">
+               <property name="minimumSize">
+                <size>
+                 <width>28</width>
+                 <height>28</height>
+                </size>
+               </property>
+               <property name="maximumSize">
+                <size>
+                 <width>28</width>
+                 <height>28</height>
+                </size>
+               </property>
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </item>
+           <item row="11" column="0">
             <widget class="QCheckBox" name="kcfg_XplanetStarmap">
              <property name="toolTip">
               <string>Use custom star map?</string>
@@ -282,85 +334,129 @@
              </property>
             </widget>
            </item>
-           <item row="9" column="1">
-            <widget class="QLineEdit" name="kcfg_XplanetStarmapPath">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
+           <item row="11" column="1">
+            <layout class="QHBoxLayout" name="horizontalLayout_10" stretch="0,0">
+             <property name="sizeConstraint">
+              <enum>QLayout::SetMaximumSize</enum>
              </property>
-             <property name="toolTip">
-              <string>Star map file path</string>
+             <property name="leftMargin">
+              <number>0</number>
              </property>
-             <property name="whatsThis">
-              <string>Star map file path</string>
+             <property name="topMargin">
+              <number>0</number>
+             </property>
+             <item>
+              <widget class="QLineEdit" name="kcfg_XplanetStarmapPath">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Star map file path</string>
+               </property>
+               <property name="whatsThis">
+                <string>Star map file path</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QPushButton" name="starmapFileB">
+               <property name="minimumSize">
+                <size>
+                 <width>28</width>
+                 <height>28</height>
+                </size>
+               </property>
+               <property name="maximumSize">
+                <size>
+                 <width>28</width>
+                 <height>28</height>
+                </size>
+               </property>
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </item>
+           <item row="12" column="0">
+            <widget class="QCheckBox" name="kcfg_XplanetArcFile">
+             <property name="text">
+              <string>Arc file:</string>
              </property>
             </widget>
            </item>
-           <item row="10" column="1">
-            <widget class="QLineEdit" name="kcfg_XplanetArcFilePath">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
+           <item row="12" column="1">
+            <layout class="QHBoxLayout" name="horizontalLayout_11">
+             <property name="sizeConstraint">
+              <enum>QLayout::SetMaximumSize</enum>
              </property>
-             <property name="toolTip">
-              <string>Arc file path</string>
+             <property name="leftMargin">
+              <number>0</number>
              </property>
-             <property name="whatsThis">
-              <string>Specify an arc file to be plotted against the background stars.</string>
+             <property name="topMargin">
+              <number>0</number>
              </property>
-            </widget>
+             <item>
+              <widget class="QLineEdit" name="kcfg_XplanetArcFilePath">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Arc file path</string>
+               </property>
+               <property name="whatsThis">
+                <string>Specify an arc file to be plotted against the background stars.</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QPushButton" name="arcFileB">
+               <property name="minimumSize">
+                <size>
+                 <width>28</width>
+                 <height>28</height>
+                </size>
+               </property>
+               <property name="maximumSize">
+                <size>
+                 <width>28</width>
+                 <height>28</height>
+                </size>
+               </property>
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+            </layout>
            </item>
-           <item row="8" column="1">
-            <widget class="QLineEdit" name="kcfg_XplanetConfigFilePath">
+           <item row="5" column="1">
+            <widget class="QSpinBox" name="kcfg_XplanetGlare">
              <property name="sizePolicy">
-              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+              <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
              <property name="toolTip">
-              <string>Config file path</string>
-             </property>
-             <property name="whatsThis">
-              <string>Use the specified configuration file</string>
-             </property>
-            </widget>
-           </item>
-           <item row="8" column="0">
-            <widget class="QCheckBox" name="kcfg_XplanetConfigFile">
-             <property name="text">
-              <string>Config file:</string>
-             </property>
-            </widget>
-           </item>
-           <item row="10" column="0">
-            <widget class="QCheckBox" name="kcfg_XplanetArcFile">
-             <property name="text">
-              <string>Arc file:</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="0">
-            <widget class="QCheckBox" name="kcfg_XplanetUseFIFO">
-             <property name="toolTip">
-              <string>Use kstars's FOV?</string>
+              <string>Radius of the glare around the Sun.</string>
              </property>
              <property name="whatsThis">
-              <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If checked, XPlanet will use a FIFO \
file in the /tmp directory to temporarily save the XPlanet image for KStars to load them and update the \
view.  If not checked, XPlanet will actually save the files to the XPlanet folder in the KStars data \
directory.  Using a FIFO file should save the hard disk from excessive reads/writes and may offer a \
                performance enhancement.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-             </property>
-             <property name="text">
-              <string>Use FIFO File</string>
+              <string>Draw a glare around the sun with a radius of the specified value larger than the \
Sun.  The default value is 28.</string>  </property>
             </widget>
            </item>
-           <item row="1" column="1">
-            <widget class="QLabel" name="label_5">
+           <item row="5" column="0">
+            <widget class="QLabel" name="textLabelXplanetGlare">
              <property name="text">
-              <string>(saves to memory instead of a hard disk)</string>
+              <string>Glare of Sun:</string>
              </property>
             </widget>
            </item>
@@ -1029,11 +1125,8 @@
   <tabstop>kcfg_XplanetGlare</tabstop>
   <tabstop>kcfg_XplanetMagnitude</tabstop>
   <tabstop>kcfg_XplanetConfigFile</tabstop>
-  <tabstop>kcfg_XplanetConfigFilePath</tabstop>
   <tabstop>kcfg_XplanetStarmap</tabstop>
-  <tabstop>kcfg_XplanetStarmapPath</tabstop>
   <tabstop>kcfg_XplanetArcFile</tabstop>
-  <tabstop>kcfg_XplanetArcFilePath</tabstop>
   <tabstop>kcfg_XplanetQuality</tabstop>
   <tabstop>kcfg_XplanetLabel</tabstop>
   <tabstop>kcfg_XplanetLabelLocalTime</tabstop>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic