Skip to content

Commit aee2f8f

Browse files
author
timlinux
committed
Gui cleaunups and use buttonbox
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8524 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent edf3169 commit aee2f8f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/app/qgsattributetabledisplay.cpp

+5-7
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ QgsAttributeTableDisplay::QgsAttributeTableDisplay(QgsVectorLayer* layer, QgisAp
5959
connect(mSearchButton, SIGNAL(clicked()), this, SLOT(search()));
6060
connect(mSearchShowResults, SIGNAL(activated(int)), this, SLOT(searchShowResultsChanged(int)));
6161
connect(btnAdvancedSearch, SIGNAL(clicked()), this, SLOT(advancedSearch()));
62-
connect(btnClose, SIGNAL(clicked()), this, SLOT(close()));
62+
connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(showHelp()));
63+
connect(buttonBox->button(QDialogButtonBox::Close), SIGNAL(clicked()),
64+
this, SLOT(close()));
6365
connect(tblAttributes, SIGNAL(featureAttributeChanged(int,int)), this, SLOT(changeFeatureAttribute(int,int)));
6466

6567
//disable those buttons until start editing has been pressed and provider supports it
@@ -175,7 +177,7 @@ void QgsAttributeTableDisplay::startEditing()
175177
{
176178
btnStartEditing->setEnabled(false);
177179
btnStopEditing->setEnabled(true);
178-
btnClose->setEnabled(false);
180+
buttonBox->button(QDialogButtonBox::Close)->setEnabled(false);
179181
//make the dialog modal when in editable
180182
//otherwise map editing and table editing
181183
//may disturb each other
@@ -213,7 +215,7 @@ void QgsAttributeTableDisplay::stopEditing()
213215
}
214216
btnStartEditing->setEnabled(true);
215217
btnStopEditing->setEnabled(false);
216-
btnClose->setEnabled(true);
218+
buttonBox->button(QDialogButtonBox::Close)->setEnabled(true);
217219
mAddAttributeButton->setEnabled(false);
218220
mDeleteAttributeButton->setEnabled(false);
219221
table()->setReadOnly(true);
@@ -400,10 +402,6 @@ void QgsAttributeTableDisplay::saveWindowLocation()
400402
settings.setValue("/Windows/AttributeTable/geometry", saveGeometry());
401403
}
402404

403-
void QgsAttributeTableDisplay::on_btnHelp_clicked()
404-
{
405-
showHelp();
406-
}
407405
void QgsAttributeTableDisplay::showHelp()
408406
{
409407
QgsContextHelp::run(context_id);

0 commit comments

Comments
 (0)