Skip to content

Commit

Permalink
slots moved to public
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@4843 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Feb 14, 2006
1 parent 021fa3e commit eb73b9b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 23 deletions.
34 changes: 23 additions & 11 deletions src/plugins/grass/qgsgrassedit.cpp
Expand Up @@ -154,6 +154,17 @@ QgsGrassEdit::QgsGrassEdit ( QgisApp *qgisApp, QgisIface *iface,

void QgsGrassEdit::init()
{
if ( !(mProvider->isGrassEditable()) ) {
QMessageBox::warning( 0, "Warning", "You are not owner of the mapset, "
"cannot open the vector for editing." );
return;
}

if ( !(mProvider->startEdit()) ) {
QMessageBox::warning( 0, "Warning", "Cannot open vector for update." );
return;
}

QString myIconPath = QgsApplication::themePath() + "/grass/";

QActionGroup *ag = new QActionGroup ( this );
Expand Down Expand Up @@ -253,17 +264,6 @@ void QgsGrassEdit::init()
tb->addAction ( mCloseEditAction );
connect ( mCloseEditAction, SIGNAL(triggered()), this, SLOT(closeEdit()) );

if ( !(mProvider->isGrassEditable()) ) {
QMessageBox::warning( 0, "Warning", "You are not owner of the mapset, "
"cannot open the vector for editing." );
return;
}

if ( !(mProvider->startEdit()) ) {
QMessageBox::warning( 0, "Warning", "Cannot open vector for update." );
return;
}

mEditPoints = Vect_new_line_struct ();
mPoints = Vect_new_line_struct ();
mCats = Vect_new_cats_struct ();
Expand Down Expand Up @@ -462,6 +462,9 @@ void QgsGrassEdit::init()

void QgsGrassEdit::attributeTableFieldChanged ( void )
{
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit::attributeTableFieldChanged" << std::endl;
#endif
int field = mTableField->currentText().toInt();

setAttributeTable ( field );
Expand Down Expand Up @@ -518,6 +521,9 @@ void QgsGrassEdit::setAttributeTable ( int field )

void QgsGrassEdit::addColumn ( void )
{
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit::addColumn()" << std::endl;
#endif
int r = mAttributeTable->numRows();
mAttributeTable->setNumRows( r+1 );
mAttributeTable->setRowReadOnly ( r, false );
Expand Down Expand Up @@ -890,6 +896,9 @@ void QgsGrassEdit::closeEvent(QCloseEvent *e)

void QgsGrassEdit::catModeChanged ( void )
{
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit::catModeChanged()" << std::endl;
#endif
int mode = mCatModeBox->currentItem();

int field = mFieldBox->currentText().toInt();
Expand Down Expand Up @@ -917,6 +926,9 @@ void QgsGrassEdit::catModeChanged ( void )

void QgsGrassEdit::fieldChanged ( void )
{
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit::fieldChanged()" << std::endl;
#endif
int mode = mCatModeBox->currentItem();
int field = mFieldBox->currentText().toInt();

Expand Down
24 changes: 12 additions & 12 deletions src/plugins/grass/qgsgrassedit.h
Expand Up @@ -176,6 +176,18 @@ public slots:
void on_mFieldBox_activated() { fieldChanged(); }
void fieldChanged();

// Change attribute table
void on_mTableField_activated() { attributeTableFieldChanged(); }
void attributeTableFieldChanged();

// Add column
void on_mAddColumnButton_clicked() { addColumn(); }
void addColumn();

// Alter table
void on_mAlterTableButton_clicked() { alterTable(); }
void alterTable();

//! Close editing
void closeEdit();

Expand Down Expand Up @@ -358,18 +370,6 @@ public slots:
// Set attribute table
void setAttributeTable(int field);

// Change attribute table
void on_mTableField_activated() { attributeTableFieldChanged(); }
void attributeTableFieldChanged();

// Add column
void on_mAddColumnButton_clicked() { addColumn(); }
void addColumn();

// Alter table
void on_mAlterTableButton_clicked() { alterTable(); }
void alterTable();

// Pront which should be displayed in status bar when mouse is in canvas
QString mCanvasPrompt;

Expand Down

0 comments on commit eb73b9b

Please sign in to comment.