Remeber state of =show= checkbox

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@1417 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2004-05-16 21:30:40 +00:00
parent 3e6ae6d1ae
commit 5a4dd15429
4 changed files with 12 additions and 11 deletions

View File

@ -119,10 +119,11 @@ void Plugin::run()
//overides function byt the same name created in .ui
myPluginGui->setRotation(mRotationInt);
myPluginGui->setPlacement(mPlacement);
myPluginGui->setEnabled(mEnable);
//listen for when the layer has been made so we can draw it
connect(myPluginGui, SIGNAL(rotationChanged(int)), this, SLOT(rotationChanged(int)));
connect(myPluginGui, SIGNAL(changePlacement(QString)), this, SLOT(setPlacement(QString)));
connect(myPluginGui, SIGNAL(enableNorthArrow(bool)), this, SLOT(setEnable(bool)));
connect(myPluginGui, SIGNAL(enableNorthArrow(bool)), this, SLOT(setEnabled(bool)));
myPluginGui->show();
}
@ -190,9 +191,10 @@ if (mEnable)
{
#ifdef QGISDEBUG
std::cout << "Rendering n-arrow at bottom left: x = " << xShift
<< " y = " << myHeight-(myQPixmap.height()-yShift) << std::endl;
<< " y = " << myHeight-(myQPixmap.height()-yShift)
<< "Rotation : " << mRotationInt << std::endl;
#endif
myQPainter.drawPixmap(xShift,myHeight-(myQPixmap.height()-yShift),myQPixmap);
myQPainter.drawPixmap(xShift,myHeight-(myQPixmap.height()+yShift),myQPixmap);
}
else if (mPlacement==tr("Top Right"))
{
@ -263,7 +265,7 @@ void Plugin::setPlacement(QString theQString)
mPlacement = theQString;
}
void Plugin::setEnable(bool theBool)
void Plugin::setEnabled(bool theBool)
{
mEnable = theBool;
}

View File

@ -64,7 +64,7 @@ class Plugin:public QObject, public QgisPlugin
//! set north arrow placement
void setPlacement(QString);
//! enable or disable north arrow
void setEnable(bool);
void setEnabled(bool);
private:

View File

@ -71,11 +71,10 @@ void PluginGui::setPlacement(QString thePlacementQString)
cboPlacement->setCurrentText(tr(thePlacementQString));
}
//void PluginGui::setEnable(bool theBool)
//{
// enableNorthArrow(theBool);
// cboxShow->isChecked(theBool);
//}
void PluginGui::setEnabled(bool theBool)
{
cboxShow->setChecked(theBool);
}
//overides function byt the same name created in .ui

View File

@ -42,7 +42,7 @@ signals:
public slots:
void setRotation(int);
void setPlacement(QString thePlacementQString);
//void setEnable(bool);
void setEnabled(bool);
private slots:
//overides function byt the same name created in .ui