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

Jasem Mutlaq mutlaqja at ikarustech.com
Wed Aug 26 14:19:15 CEST 2009


SVN commit 1015831 by mutlaqja:

Improving INDI Control Panel GUI by using a QSplitter for the device tab. This will enable the user to resize the driver messages text box dynamically.

CCMAIL:kstars-devel at kde.org



 M  +8 -7      indidevice.cpp  
 M  +3 -2      indidevice.h  


--- trunk/KDE/kdeedu/kstars/kstars/indi/indidevice.cpp #1015830:1015831
@@ -58,6 +58,7 @@
 #include <QButtonGroup>
 #include <QSocketNotifier>
 #include <QDateTime>
+#include <QSplitter>
 
 
 #include <kled.h>
@@ -91,13 +92,13 @@
     parent		= menuParent;
     deviceManager 	= InParentManager;
   
-    deviceVBox     	= new QFrame();
-    deviceLayout   	= new QVBoxLayout(deviceVBox);
-    groupContainer 	= new KTabWidget(deviceVBox);
+    deviceVBox     	= new QSplitter();
+    deviceVBox->setOrientation(Qt::Vertical);
+
+    groupContainer 	= new KTabWidget();
   
-    msgST_w        	= new KTextEdit(deviceVBox);
+    msgST_w        	= new KTextEdit();
     msgST_w->setReadOnly(true);
-    msgST_w->setMaximumHeight(100);
   
     dataBuffer 		= (unsigned char *) malloc (1);
   
@@ -107,8 +108,8 @@
   
     INDIStdSupport 	= false;
 
-    deviceLayout->addWidget(groupContainer);
-    deviceLayout->addWidget(msgST_w);
+    deviceVBox->addWidget(groupContainer);
+    deviceVBox->addWidget(msgST_w);
 
     parent->mainTabWidget->addTab(deviceVBox, label);
 }
--- trunk/KDE/kdeedu/kstars/kstars/indi/indidevice.h #1015830:1015831
@@ -38,6 +38,7 @@
 class QTextEdit;
 class QTabWidget;
 class QGridLayout;
+class QSplitter;
 
 /*************************************************************************
 ** The INDI Tree
@@ -64,8 +65,8 @@
 
     QString 	name;			/* device name */
     QString	label;			/* device label */
-    QFrame      *deviceVBox;
-    QVBoxLayout *deviceLayout;		/* device tab frame vertial layout */
+    QSplitter   *deviceVBox;
+
     QTabWidget  *groupContainer;	/* Groups within the device */
     QTextEdit	*msgST_w;		/* scrolled text for messages */
     unsigned char *dataBuffer;          /* Generic buffer */


More information about the Kstars-devel mailing list