[Kstars-devel] KDE/kdeedu/kstars/kstars

Jasem Mutlaq mutlaqja at ikarustech.com
Wed Dec 19 21:10:58 CET 2007


SVN commit 750649 by mutlaqja:

Various usability and icon fixes. Fixed a small bug with time stamp
generation for fits files.

CCMAIL:kstars-devel at kde.org



 M  +27 -6     fitsheaderdialog.ui  
 M  +3 -3      fitshistogramui.ui  
 M  +3 -0      fitsviewer.cpp  
 M  +11 -7     indidriver.cpp  
 M  +1 -1      indidriver.h  
 M  +11 -6     indistd.cpp  
 M  +50 -10    statform.ui  
 M  +49 -15    streamform.ui  
 M  +1 -1      streamwg.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/fitsheaderdialog.ui #750648:750649
@@ -16,14 +16,26 @@
    <bool>true</bool>
   </property>
   <layout class="QVBoxLayout" >
-   <property name="margin" >
-    <number>9</number>
-   </property>
    <property name="spacing" >
     <number>6</number>
    </property>
+   <property name="leftMargin" >
+    <number>9</number>
+   </property>
+   <property name="topMargin" >
+    <number>9</number>
+   </property>
+   <property name="rightMargin" >
+    <number>9</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>9</number>
+   </property>
    <item>
     <widget class="QTableWidget" name="tableWidget" >
+     <property name="editTriggers" >
+      <set>QAbstractItemView::NoEditTriggers</set>
+     </property>
      <property name="alternatingRowColors" >
       <bool>true</bool>
      </property>
@@ -49,12 +61,21 @@
    </item>
    <item>
     <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
      <property name="spacing" >
       <number>6</number>
      </property>
+     <property name="leftMargin" >
+      <number>0</number>
+     </property>
+     <property name="topMargin" >
+      <number>0</number>
+     </property>
+     <property name="rightMargin" >
+      <number>0</number>
+     </property>
+     <property name="bottomMargin" >
+      <number>0</number>
+     </property>
      <item>
       <spacer>
        <property name="orientation" >
--- trunk/KDE/kdeedu/kstars/kstars/fitshistogramui.ui #750648:750649
@@ -5,7 +5,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>640</width>
+    <width>650</width>
     <height>325</height>
    </rect>
   </property>
@@ -17,13 +17,13 @@
   </property>
   <property name="minimumSize" >
    <size>
-    <width>640</width>
+    <width>650</width>
     <height>325</height>
    </size>
   </property>
   <property name="maximumSize" >
    <size>
-    <width>640</width>
+    <width>650</width>
     <height>325</height>
    </size>
   </property>
--- trunk/KDE/kdeedu/kstars/kstars/fitsviewer.cpp #750648:750649
@@ -415,16 +415,19 @@
         properties = record.split(QRegExp("[=/]"));
 
         tempItem = new QTableWidgetItem(properties[0].simplified());
+	tempItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
         header.tableWidget->setItem(i, 0, tempItem);
 
         if (properties.size() > 1)
         {
             tempItem = new QTableWidgetItem(properties[1].simplified());
+	    tempItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
             header.tableWidget->setItem(i, 1, tempItem);
         }
         if (properties.size() > 2)
         {
             tempItem = new QTableWidgetItem(properties[2].simplified());
+	    tempItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
             header.tableWidget->setItem(i, 2, tempItem);
         }
 
--- trunk/KDE/kdeedu/kstars/kstars/indidriver.cpp #750648:750649
@@ -32,13 +32,13 @@
 #include <KMessageBox>
 #include <KPushButton>
 #include <KLineEdit>
+#include <KProcess>
+#include <KAction>
+#include <KActionCollection>
+#include <KIconLoader>
 
 #include <kstandarddirs.h>
-#include <kprocess.h>
-#include <kaction.h>
 #include <k3serversocket.h>
-#include <kactioncollection.h>
-#include <kiconloader.h>
 
 #include "indimenu.h"
 #include "ui_indihostconf.h"
@@ -67,12 +67,11 @@
 
     runningPix = KIcon( "system-run" );
     stopPix    = KIcon( "dialog-cancel" );
-    localMode  = KIcon( "system" );
+    localMode  = KIcon( "cpu" );
     serverMode = KIcon( "network" );
 
     connected           = KIcon( "connection-established" );
-    disconnected        = KIcon( "connect_no" );
-    establishConnection = KIcon( "connect_creating" );
+    disconnected        = KIcon( "connect-no" );
 
 }
 
@@ -115,6 +114,7 @@
     QObject::connect(ui->stopServiceB, SIGNAL(clicked()), this, SLOT(activateStopService()));
     QObject::connect(ui->localTreeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(updateLocalButtons()));
     QObject::connect(ui->clientTreeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(updateClientButtons()));
+    QObject::connect(ui->localTreeWidget, SIGNAL(expanded(const QModelIndex &)), this, SLOT(resizeDeviceColumn()));
 
     readXMLDriver();
 }
@@ -385,6 +385,10 @@
 
 }
 
+void INDIDriver::resizeDeviceColumn()
+{
+  ui->localTreeWidget->resizeColumnToContents(0);
+}
 
 void INDIDriver::updateMenuActions()
 {
--- trunk/KDE/kdeedu/kstars/kstars/indidriver.h #750648:750649
@@ -87,7 +87,6 @@
     QIcon stopPix;
     QIcon connected;
     QIcon disconnected;
-    QIcon establishConnection;
     QIcon localMode;
     QIcon serverMode;
 
@@ -137,6 +136,7 @@
 
 public slots:
     void updateMenuActions();
+    void resizeDeviceColumn();
     void addINDIHost();
     void modifyINDIHost();
     void removeINDIHost();
--- trunk/KDE/kdeedu/kstars/kstars/indistd.cpp #750648:750649
@@ -142,25 +142,30 @@
     // Save file to disk
     else
     {
-         QString ts = QDateTime::currentDateTime().toString("YYYY-MM-ddThh:mm:ss");
+         QString ts = QDateTime::currentDateTime().toString("yyyy-MM-ddThh:mm:ss");
 
         if (dataType == DATA_FITS)
         {
-            if ( batchMode && !ISOMode)
-			filename += seqPrefix + QString("_%1.fits").arg(seqCount , 2);
+            if ( batchMode)
+	    {
+		if (!ISOMode)
+			filename += seqPrefix + (seqPrefix.isEmpty() ? "" : "_") +  QString("%1.fits").arg(seqCount , 2);
+		else
+			filename += seqPrefix + (seqPrefix.isEmpty() ? "" : "_") + QString("%1_%2.fits").arg(seqCount, 2).arg(ts);
+	    }
                 //snprintf(filename, sizeof(filename), "%s/%s_%02d.fits", tempFileStr, seqPrefix.toAscii().data(), seqCount);
-            else if (!batchMode && !Options::indiFITSDisplay())
+            else /*if (!Options::indiFITSDisplay())*/
             {
 		filename += QString("file_") + ts + ".fits";
                 //strftime (ts, sizeof(ts), "%Y-%m-%dT%H:%M:%S", tp);
                 //snprintf(filename, sizeof(filename), "%s/file_%s.fits", tempFileStr, ts);
-            }
+            }/*
             else
             {
 		filename += QString("%1_%2_%3.fits").arg(seqPrefix).arg(seqCount, 2).arg(ts);
                 //strftime (ts, sizeof(ts), "%Y-%m-%dT%H:%M:%S", tp);
                 //snprintf(filename, sizeof(filename), "%s/%s_%02d_%s.fits", tempFileStr, seqPrefix.toAscii().data(), seqCount, ts);
-            }
+            }*/
 
             seqCount++;
         }
--- trunk/KDE/kdeedu/kstars/kstars/statform.ui #750648:750649
@@ -13,12 +13,24 @@
    <string>Statistics</string>
   </property>
   <layout class="QGridLayout" >
-   <property name="margin" >
+   <property name="leftMargin" >
     <number>11</number>
    </property>
-   <property name="spacing" >
+   <property name="topMargin" >
+    <number>11</number>
+   </property>
+   <property name="rightMargin" >
+    <number>11</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>11</number>
+   </property>
+   <property name="horizontalSpacing" >
     <number>6</number>
    </property>
+   <property name="verticalSpacing" >
+    <number>6</number>
+   </property>
    <item row="6" column="0" >
     <widget class="QLabel" name="stdDevLabel" >
      <property name="text" >
@@ -27,7 +39,11 @@
     </widget>
    </item>
    <item row="2" column="1" >
-    <widget class="KLineEdit" name="bitpixOUT" />
+    <widget class="KLineEdit" name="bitpixOUT" >
+     <property name="readOnly" >
+      <bool>true</bool>
+     </property>
+    </widget>
    </item>
    <item row="3" column="0" >
     <widget class="QLabel" name="maxLabel" >
@@ -37,7 +53,11 @@
     </widget>
    </item>
    <item row="5" column="1" >
-    <widget class="KLineEdit" name="meanOUT" />
+    <widget class="KLineEdit" name="meanOUT" >
+     <property name="readOnly" >
+      <bool>true</bool>
+     </property>
+    </widget>
    </item>
    <item row="2" column="0" >
     <widget class="QLabel" name="bitPixLabel" >
@@ -47,7 +67,11 @@
     </widget>
    </item>
    <item row="4" column="1" >
-    <widget class="KLineEdit" name="minOUT" />
+    <widget class="KLineEdit" name="minOUT" >
+     <property name="readOnly" >
+      <bool>true</bool>
+     </property>
+    </widget>
    </item>
    <item row="1" column="0" >
     <widget class="QLabel" name="heightLabel" >
@@ -57,7 +81,11 @@
     </widget>
    </item>
    <item row="0" column="1" >
-    <widget class="KLineEdit" name="widthOUT" />
+    <widget class="KLineEdit" name="widthOUT" >
+     <property name="readOnly" >
+      <bool>true</bool>
+     </property>
+    </widget>
    </item>
    <item row="5" column="0" >
     <widget class="QLabel" name="meanLabel" >
@@ -67,7 +95,11 @@
     </widget>
    </item>
    <item row="1" column="1" >
-    <widget class="KLineEdit" name="heightOUT" />
+    <widget class="KLineEdit" name="heightOUT" >
+     <property name="readOnly" >
+      <bool>true</bool>
+     </property>
+    </widget>
    </item>
    <item row="0" column="0" >
     <widget class="QLabel" name="widthLabel" >
@@ -77,7 +109,11 @@
     </widget>
    </item>
    <item row="3" column="1" >
-    <widget class="KLineEdit" name="maxOUT" />
+    <widget class="KLineEdit" name="maxOUT" >
+     <property name="readOnly" >
+      <bool>true</bool>
+     </property>
+    </widget>
    </item>
    <item row="4" column="0" >
     <widget class="QLabel" name="minLabel" >
@@ -87,7 +123,11 @@
     </widget>
    </item>
    <item row="6" column="1" >
-    <widget class="KLineEdit" name="stddevOUT" />
+    <widget class="KLineEdit" name="stddevOUT" >
+     <property name="readOnly" >
+      <bool>true</bool>
+     </property>
+    </widget>
    </item>
   </layout>
  </widget>
@@ -96,7 +136,7 @@
  <customwidgets>
   <customwidget>
    <class>KLineEdit</class>
-   <extends>QWidget</extends>
+   <extends>QLineEdit</extends>
    <header>klineedit.h</header>
    <container>1</container>
   </customwidget>
--- trunk/KDE/kdeedu/kstars/kstars/streamform.ui #750648:750649
@@ -1,7 +1,4 @@
 <ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
  <class>streamForm</class>
  <widget class="QWidget" name="streamForm" >
   <property name="geometry" >
@@ -16,28 +13,55 @@
    <string>Video Stream</string>
   </property>
   <layout class="QVBoxLayout" >
-   <property name="margin" >
-    <number>9</number>
-   </property>
    <property name="spacing" >
     <number>6</number>
    </property>
+   <property name="leftMargin" >
+    <number>9</number>
+   </property>
+   <property name="topMargin" >
+    <number>9</number>
+   </property>
+   <property name="rightMargin" >
+    <number>9</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>9</number>
+   </property>
    <item>
     <layout class="QVBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
      <property name="spacing" >
       <number>6</number>
      </property>
+     <property name="leftMargin" >
+      <number>0</number>
+     </property>
+     <property name="topMargin" >
+      <number>0</number>
+     </property>
+     <property name="rightMargin" >
+      <number>0</number>
+     </property>
+     <property name="bottomMargin" >
+      <number>0</number>
+     </property>
      <item>
       <layout class="QHBoxLayout" >
-       <property name="margin" >
-        <number>0</number>
-       </property>
        <property name="spacing" >
         <number>6</number>
        </property>
+       <property name="leftMargin" >
+        <number>0</number>
+       </property>
+       <property name="topMargin" >
+        <number>0</number>
+       </property>
+       <property name="rightMargin" >
+        <number>0</number>
+       </property>
+       <property name="bottomMargin" >
+        <number>0</number>
+       </property>
        <item>
         <widget class="QPushButton" name="playB" >
          <property name="minimumSize" >
@@ -84,6 +108,18 @@
        </item>
        <item>
         <widget class="QComboBox" name="imgFormatCombo" >
+         <property name="sizePolicy" >
+          <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize" >
+          <size>
+           <width>80</width>
+           <height>0</height>
+          </size>
+         </property>
          <property name="toolTip" >
           <string>Image Format</string>
          </property>
@@ -110,9 +146,7 @@
      <item>
       <widget class="QFrame" name="videoFrame" >
        <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>7</hsizetype>
-         <vsizetype>7</vsizetype>
+        <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
--- trunk/KDE/kdeedu/kstars/kstars/streamwg.cpp #750648:750649
@@ -68,7 +68,7 @@
 
     playPix    = KIcon( "media-playback-start" );
     pausePix   = KIcon( "media-playback-pause" );
-    capturePix = KIcon( "view-preview" );
+    capturePix = KIcon( "media-record" );
 
     foreach (const QByteArray &format, QImageWriter::supportedImageFormats())
     imgFormatCombo->addItem(QString(format));


More information about the Kstars-devel mailing list