Skip to content
Permalink
Browse files

Gui cleaunups and use buttonbox

git-svn-id: http://svn.osgeo.org/qgis/trunk@8524 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed May 26, 2008
1 parent f646c01 commit 1b8961839685a39a8c3c2c764066c4076ce09be3
Showing with 5 additions and 7 deletions.
  1. +5 −7 src/app/qgsattributetabledisplay.cpp
@@ -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
@@ -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
@@ -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);
@@ -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);

0 comments on commit 1b89618

Please sign in to comment.
You can’t perform that action at this time.