[PC-BSD Commits] r8132 - pcbsd/current/src-qt4/pc-sysinstaller

svn at pcbsd.org svn at pcbsd.org
Thu Dec 2 08:29:51 PST 2010


Author: kris
Date: 2010-12-02 08:29:51 -0800 (Thu, 02 Dec 2010)
New Revision: 8132

Modified:
   pcbsd/current/src-qt4/pc-sysinstaller/sys-pkgmgmt.cpp
   pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h
   pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui
Log:

Do some mouse-tracking kung-fu so we can display the meta-pkgs description in a status bar below, without
having to wait for a tooltip to show up



Modified: pcbsd/current/src-qt4/pc-sysinstaller/sys-pkgmgmt.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sys-pkgmgmt.cpp	2010-12-02 16:10:58 UTC (rev 8131)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sys-pkgmgmt.cpp	2010-12-02 16:29:51 UTC (rev 8132)
@@ -48,9 +48,27 @@
         }
     }
 
+    treeWidgetDesktopPackages->setMouseTracking(TRUE);
     connect(treeWidgetDesktopPackages, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotDeskPkgsChanged(QTreeWidgetItem *, int)));
+    connect(treeWidgetDesktopPackages, SIGNAL(itemEntered(QTreeWidgetItem *, int)), this, SLOT(slotShowLabelDesc(QTreeWidgetItem *, int)));
 }
 
+// Slot to show meta-pkg description on mouseover
+void SysInstaller::slotShowLabelDesc(QTreeWidgetItem *aItem, int aCol)
+{
+	labelPkgDesc->setText("");
+
+	if (!aItem)
+  	  return;
+
+	for (int z=0; z < listDeskPkgs.count(); ++z) {
+		if ( aItem->text(0) == listDeskPkgs.at(z).at(0) ) {
+			labelPkgDesc->setText(listDeskPkgs.at(z).at(1));
+			break;
+		}
+	}
+}
+
 // The User changed the tree widget checked / unchecked stuff sanity check
 void SysInstaller::slotDeskPkgsChanged(QTreeWidgetItem *aItem, int aCol)
 {

Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h	2010-12-02 16:10:58 UTC (rev 8131)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h	2010-12-02 16:29:51 UTC (rev 8132)
@@ -118,6 +118,7 @@
 
     // Desktop Packages Slot
     void slotDeskPkgsChanged(QTreeWidgetItem *aItem, int aCol);
+    void slotShowLabelDesc(QTreeWidgetItem *aItem, int aCol);
 
     // Grab checked / unchecked status of hostname
     void slotHostnameClicked();

Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui	2010-12-02 16:10:58 UTC (rev 8131)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui	2010-12-02 16:29:51 UTC (rev 8132)
@@ -993,7 +993,7 @@
                 </palette>
                </property>
                <property name="currentIndex">
-                <number>9</number>
+                <number>5</number>
                </property>
                <widget class="QWidget" name="aiStep0">
                 <property name="palette">
@@ -9363,7 +9363,7 @@
                       </column>
                      </widget>
                     </item>
-                    <item row="2" column="0">
+                    <item row="3" column="0">
                      <widget class="QLabel" name="label_25">
                       <property name="text">
                        <string>Please select the software you wish to have installed. At least one desktop must be selected, and changes may be made after installation.</string>
@@ -9392,6 +9392,19 @@
                       </property>
                      </widget>
                     </item>
+                    <item row="2" column="0">
+                     <widget class="QLabel" name="labelPkgDesc">
+                      <property name="frameShape">
+                       <enum>QFrame::StyledPanel</enum>
+                      </property>
+                      <property name="frameShadow">
+                       <enum>QFrame::Plain</enum>
+                      </property>
+                      <property name="text">
+                       <string/>
+                      </property>
+                     </widget>
+                    </item>
                    </layout>
                   </widget>
                  </item>



More information about the Commits mailing list