Skip to content

Commit

Permalink
new vector
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@4842 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Feb 14, 2006
1 parent f97428e commit 021fa3e
Showing 1 changed file with 34 additions and 32 deletions.
66 changes: 34 additions & 32 deletions src/plugins/grass/qgsgrassedit.cpp
Expand Up @@ -122,6 +122,38 @@ QgsGrassEdit::QgsGrassEdit ( QgisApp *qgisApp, QgisIface *iface,
//TODO dynamic_cast ?
mProvider = (QgsGrassProvider *) vector->getDataProvider();

init();

}

QgsGrassEdit::QgsGrassEdit ( QgisApp *qgisApp, QgisIface *iface,
QgsGrassProvider *provider,
QWidget * parent, Qt::WFlags f )
:QMainWindow(parent, 0, f), QgsGrassEditBase ()
{
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit()" << std::endl;
#endif

setupUi(this);

mRunning = true;
mValid = false;
mTool = QgsGrassEdit::NONE;
mSuspend = false;
mQgisApp = qgisApp;
mIface = iface;
mNewMap = true;

mCanvas = mIface->getMapCanvas();

mProvider = provider;

init();
}

void QgsGrassEdit::init()
{
QString myIconPath = QgsApplication::themePath() + "/grass/";

QActionGroup *ag = new QActionGroup ( this );
Expand Down Expand Up @@ -221,38 +253,6 @@ QgsGrassEdit::QgsGrassEdit ( QgisApp *qgisApp, QgisIface *iface,
tb->addAction ( mCloseEditAction );
connect ( mCloseEditAction, SIGNAL(triggered()), this, SLOT(closeEdit()) );

init();

mNewPointAction->setOn(true);
startTool(QgsGrassEdit::NEW_POINT);
}

QgsGrassEdit::QgsGrassEdit ( QgisApp *qgisApp, QgisIface *iface,
QgsGrassProvider *provider,
QWidget * parent, Qt::WFlags f )
:QMainWindow(parent, 0, f), QgsGrassEditBase ()
{
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit()" << std::endl;
#endif

mRunning = true;
mValid = false;
mTool = QgsGrassEdit::NONE;
mSuspend = false;
mQgisApp = qgisApp;
mIface = iface;
mNewMap = true;

mCanvas = mIface->getMapCanvas();

mProvider = provider;

init();
}

void QgsGrassEdit::init()
{
if ( !(mProvider->isGrassEditable()) ) {
QMessageBox::warning( 0, "Warning", "You are not owner of the mapset, "
"cannot open the vector for editing." );
Expand Down Expand Up @@ -453,6 +453,8 @@ void QgsGrassEdit::init()

// TODO: how to get keyboard events from canvas (shortcuts)

mNewPointAction->setOn(true); // Start NEW_POINT tool

restorePosition();

mValid = true;
Expand Down

0 comments on commit 021fa3e

Please sign in to comment.