[QGIS Commit] r12066 - in trunk/qgis/src: app ui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Nov 10 07:53:31 EST 2009


Author: macho
Date: 2009-11-10 07:53:28 -0500 (Tue, 10 Nov 2009)
New Revision: 12066

Modified:
   trunk/qgis/src/app/qgsidentifyresults.cpp
   trunk/qgis/src/app/qgsidentifyresults.h
   trunk/qgis/src/ui/qgsidentifyresultsbase.ui
Log:
ui cleanup in identifyresults - jef can you look if everything is correct?


Modified: trunk/qgis/src/app/qgsidentifyresults.cpp
===================================================================
--- trunk/qgis/src/app/qgsidentifyresults.cpp	2009-11-10 12:30:00 UTC (rev 12065)
+++ trunk/qgis/src/app/qgsidentifyresults.cpp	2009-11-10 12:53:28 UTC (rev 12066)
@@ -91,15 +91,15 @@
     mDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
     mDock->setWidget( this );
     QgisApp::instance()->addDockWidget( Qt::LeftDockWidgetArea, mDock );
-    buttonCancel->hide();
   }
   lstResults->setColumnCount( 2 );
   setColumnText( 0, tr( "Feature" ) );
   setColumnText( 1, tr( "Value" ) );
 
-  connect( buttonCancel, SIGNAL( clicked() ),
-           this, SLOT( close() ) );
+  connect( buttonBox,SIGNAL( helpRequested() ), this, SLOT( helpClicked() ) );
 
+  connect( buttonBox, SIGNAL( clicked() ), this, SLOT( close() ) );
+
   connect( lstResults, SIGNAL( itemExpanded( QTreeWidgetItem* ) ),
            this, SLOT( itemExpanded( QTreeWidgetItem* ) ) );
 
@@ -644,8 +644,8 @@
 
   return featItem;
 }
-
-void QgsIdentifyResults::on_buttonHelp_clicked()
+// Slot for showing help
+void QgsIdentifyResults::helpClicked()
 {
   QgsContextHelp::run( context_id );
 }

Modified: trunk/qgis/src/app/qgsidentifyresults.h
===================================================================
--- trunk/qgis/src/app/qgsidentifyresults.h	2009-11-10 12:30:00 UTC (rev 12065)
+++ trunk/qgis/src/app/qgsidentifyresults.h	2009-11-10 12:53:28 UTC (rev 12066)
@@ -84,7 +84,7 @@
     void featureDeleted( int fid );
 
     //! Context help
-    void on_buttonHelp_clicked();
+    void helpClicked();
 
     /* Called when an item is expanded so that we can ensure that the
        column width if expanded to show it */

Modified: trunk/qgis/src/ui/qgsidentifyresultsbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsidentifyresultsbase.ui	2009-11-10 12:30:00 UTC (rev 12065)
+++ trunk/qgis/src/ui/qgsidentifyresultsbase.ui	2009-11-10 12:53:28 UTC (rev 12066)
@@ -39,6 +39,13 @@
     </widget>
    </item>
    <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
+     </property>
+    </widget>
+   </item>
+   <item>
     <layout class="QHBoxLayout">
      <property name="spacing">
       <number>6</number>
@@ -46,53 +53,28 @@
      <property name="margin">
       <number>0</number>
      </property>
-     <item>
-      <widget class="QPushButton" name="buttonHelp">
-       <property name="text">
-        <string>Help</string>
-       </property>
-       <property name="shortcut">
-        <string>F1</string>
-       </property>
-       <property name="autoDefault">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType">
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>20</width>
-         <height>0</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="buttonCancel">
-       <property name="text">
-        <string>Close</string>
-       </property>
-       <property name="shortcut">
-        <string/>
-       </property>
-       <property name="autoDefault">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
     </layout>
    </item>
   </layout>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>QgsIdentifyResultsBase</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>261</x>
+     <y>298</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>204</x>
+     <y>313</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>



More information about the QGIS-commit mailing list