[QGIS Commit] r8524 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon May 26 11:49:58 EDT 2008


Author: timlinux
Date: 2008-05-26 11:49:58 -0400 (Mon, 26 May 2008)
New Revision: 8524

Modified:
   trunk/qgis/src/app/qgsattributetabledisplay.cpp
Log:
Gui cleaunups and use buttonbox


Modified: trunk/qgis/src/app/qgsattributetabledisplay.cpp
===================================================================
--- trunk/qgis/src/app/qgsattributetabledisplay.cpp	2008-05-26 15:42:29 UTC (rev 8523)
+++ trunk/qgis/src/app/qgsattributetabledisplay.cpp	2008-05-26 15:49:58 UTC (rev 8524)
@@ -59,7 +59,9 @@
   connect(mSearchButton, SIGNAL(clicked()), this, SLOT(search()));
   connect(mSearchShowResults, SIGNAL(activated(int)), this, SLOT(searchShowResultsChanged(int)));
   connect(btnAdvancedSearch, SIGNAL(clicked()), this, SLOT(advancedSearch()));
-  connect(btnClose, SIGNAL(clicked()), this, SLOT(close()));
+  connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(showHelp()));
+  connect(buttonBox->button(QDialogButtonBox::Close), SIGNAL(clicked()), 
+      this, SLOT(close()));
   connect(tblAttributes, SIGNAL(featureAttributeChanged(int,int)), this, SLOT(changeFeatureAttribute(int,int)));
   
   //disable those buttons until start editing has been pressed and provider supports it
@@ -175,7 +177,7 @@
     {
       btnStartEditing->setEnabled(false);
       btnStopEditing->setEnabled(true);
-      btnClose->setEnabled(false);
+      buttonBox->button(QDialogButtonBox::Close)->setEnabled(false);
       //make the dialog modal when in editable
       //otherwise map editing and table editing
       //may disturb each other
@@ -213,7 +215,7 @@
   }
   btnStartEditing->setEnabled(true);
   btnStopEditing->setEnabled(false);
-  btnClose->setEnabled(true);
+  buttonBox->button(QDialogButtonBox::Close)->setEnabled(true);
   mAddAttributeButton->setEnabled(false);
   mDeleteAttributeButton->setEnabled(false);
   table()->setReadOnly(true);
@@ -400,10 +402,6 @@
   settings.setValue("/Windows/AttributeTable/geometry", saveGeometry());
 } 
 
-void QgsAttributeTableDisplay::on_btnHelp_clicked()
-{
-  showHelp();
-}
 void QgsAttributeTableDisplay::showHelp()
 {
   QgsContextHelp::run(context_id);



More information about the QGIS-commit mailing list