Skip to content

Commit

Permalink
Gui cleaunups and use buttonbox
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@8524 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed May 26, 2008
1 parent f646c01 commit 1b89618
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/app/qgsattributetabledisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ QgsAttributeTableDisplay::QgsAttributeTableDisplay(QgsVectorLayer* layer, QgisAp
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
Expand Down Expand Up @@ -175,7 +177,7 @@ void QgsAttributeTableDisplay::startEditing()
{
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
Expand Down Expand Up @@ -213,7 +215,7 @@ void QgsAttributeTableDisplay::stopEditing()
}
btnStartEditing->setEnabled(true);
btnStopEditing->setEnabled(false);
btnClose->setEnabled(true);
buttonBox->button(QDialogButtonBox::Close)->setEnabled(true);
mAddAttributeButton->setEnabled(false);
mDeleteAttributeButton->setEnabled(false);
table()->setReadOnly(true);
Expand Down Expand Up @@ -400,10 +402,6 @@ void QgsAttributeTableDisplay::saveWindowLocation()
settings.setValue("/Windows/AttributeTable/geometry", saveGeometry());
}

void QgsAttributeTableDisplay::on_btnHelp_clicked()
{
showHelp();
}
void QgsAttributeTableDisplay::showHelp()
{
QgsContextHelp::run(context_id);
Expand Down

0 comments on commit 1b89618

Please sign in to comment.