Logo Search packages:      
Sourcecode: qgis version File versions

QgsGrassEdit Class Reference

#include <qgsgrassedit.h>

Inheritance diagram for QgsGrassEdit:

List of all members.


Detailed Description

GRASS vector edit.

Definition at line 46 of file qgsgrassedit.h.


Public Types

enum  CatMode { CAT_MODE_NEXT = 0, CAT_MODE_MANUAL, CAT_MODE_NOCAT }
enum  EditTools {
  NONE, NEW_POINT, NEW_LINE, NEW_BOUNDARY,
  NEW_CENTROID, MOVE_VERTEX, ADD_VERTEX, DELETE_VERTEX,
  SPLIT_LINE, MOVE_LINE, DELETE_LINE, EDIT_CATS,
  EDIT_ATTRIBUTES
}
 Tools.
enum  Icons { ICON_NONE, ICON_CROSS, ICON_X, ICON_BOX }
 Icons.
enum  SymbCode {
  SYMB_BACKGROUND, SYMB_HIGHLIGHT, SYMB_DYNAMIC, SYMB_POINT,
  SYMB_LINE, SYMB_BOUNDARY_0, SYMB_BOUNDARY_1, SYMB_BOUNDARY_2,
  SYMB_CENTROID_IN, SYMB_CENTROID_OUT, SYMB_CENTROID_DUPL, SYMB_NODE_0,
  SYMB_NODE_1, SYMB_NODE_2, SYMB_COUNT
}

Public Slots

void addVertex (void)
void catModeChanged (void)
 Category mode was changed.
void changeSymbology (QListViewItem *item, const QPoint &pnt, int col)
void closeEdit (void)
 Close editing.
void columnTypeChanged (int row, int col)
void deleteLine (void)
void deleteVertex (void)
void editAttributes (void)
void editCats (void)
void fieldChanged (void)
 Field was changed.
void mouseEventReceiverClick (QgsPoint &)
 Mouse event receiver.
void mouseEventReceiverMove (QgsPoint &)
 Mouse event receiver.
void moveLine (void)
void moveVertex (void)
void newBoundary (void)
void newCentroid (void)
void newLine (void)
void newPoint (void)
void postRender (QPainter *)
 Called when rendering is finished.
void splitLine (void)

Public Member Functions

void addAttributes (int field, int cat)
 Add attributes to current mAttributes.
void addCat (int line)
 Add category to selected line.
void deleteCat (int line, int field, int cat)
 Delete category from selected line.
void increaseMaxCat (void)
 Increase max cat.
bool isValid (void)
 Close editing.
 QgsGrassEdit (QgisApp *qgisApp, QgisIface *iface, QWidget *parent=0, const char *name=0, WFlags f=0)
 Constructor.
void startTool (int)
 Set new tool and close old one if any.
 ~QgsGrassEdit ()
 Destructor.

Static Public Member Functions

static bool isRunning (void)
 Close editing.

Public Attributes

QAction * addVertexAction
QLabel * catLabel
QAction * closeEditAction
QAction * deleteLineAction
QAction * deleteVertexAction
QAction * editAttributesAction
QAction * editCatsAction
QToolBar * editLineToolBar
QToolBar * editVertexToolBar
QFrame * frame3
QFrame * frame9
QPushButton * mAddColumnButton
QToolBar * mainToolBar
QPushButton * mAlterTableButton
QTable * mAttributeTable
QLineEdit * mCatEntry
QComboBox * mCatModeBox
QComboBox * mFieldBox
QAction * moveLineAction
QAction * moveVertexAction
QSpinBox * mSnapPixels
QComboBox * mTableField
QAction * newBoundaryAction
QAction * newCentroidAction
QAction * newLineAction
QAction * newPointAction
QToolBar * newToolBar
QAction * splitLineAction
QListView * symbologyList
QWidget * tab
QWidget * tab_2
QWidget * tab_3
QWidget * tab_4
QTabWidget * tabWidget
QLabel * textLabel1
QLabel * textLabel2
QLabel * textLabel3
QLabel * textLabel4

Protected Slots

virtual void languageChange ()

Protected Attributes

QHBoxLayout * frame3Layout
QVBoxLayout * QgsGrassEditBaseLayout
QGridLayout * tabLayout
QGridLayout * tabLayout_2
QHBoxLayout * tabLayout_3
QVBoxLayout * tabLayout_4

Private Member Functions

void addColumn (void)
void alterTable (void)
void attributeTableFieldChanged (void)
void displayDynamic (struct line_pnts *Points, double x, double y, int type, int size)
void displayDynamic (double x, double y, int type, int size)
void displayDynamic (struct line_pnts *Points)
void displayElement (int line, const QPen &pen, int size, QPainter *painter=0)
void displayIcon (double x, double y, const QPen &pen, int type, int size, QPainter *painter=0)
void displayLastDynamic (void)
void displayMap (void)
 Display all lines and nodes.
void displayNode (int node, const QPen &pen, int size, QPainter *painter=0)
void displayUpdated (void)
void eraseDynamic (void)
void eraseElement (int line)
int lineSymbFromMap (int line)
int nodeSymbFromMap (int node)
void restorePosition (void)
void saveWindowLocation (void)
void setAttributeTable (int field)
void setIconPoints (QPointArray &points, int type, int size)
 Set point array to icon.
void snap (double *x, double *y)
void snap (QgsPoint &point)
double threshold (void)
void updateSymb (void)
int writeLine (int type, struct line_pnts *Points)

Private Attributes

bool mAddVertexEnd
 Appand a new vertex at the end (not insert into existing segment).
QgsGrassAttributesmAttributes
QgsMapCanvasmCanvas
 Pointer to canvas.
struct line_cats * mCats
 Working category structure.
struct line_pnts * mEditPoints
 Currently digitized line points,.
QgisIfacemIface
 Pointer to the QGIS interface object.
int mLastDynamicIcon
 Last dynamicaly drawn icon type.
double mLastDynamicIconX
double mLastDynamicIconY
QPointArray mLastDynamicPoints
 Last dynamicaly drawn points.
QgsPoint mLastPoint
 Last point where user clicked (map units).
std::vector< int > mLineSymb
 Vector of symbology codes for lines, indexes of lines start at 1, always resize nlines+1.
std::vector< MaxCat > mMaxCats
 Vector of maximum used category values for each field.
std::vector< int > mNodeSymb
 Vector of symbology codes for nodes, indexes of nodes start at 1, always resize nnodes+1.
QPixmap * mPixmap
 Canvas pixmap.
struct line_pnts * mPoints
 Working structure for line points.
QgsGrassProvidermProvider
 Pointer to vector provider.
QgisAppmQgisApp
 QGIS application.
int mSelectedLine
 Selected line or 0.
int mSelectedPart
 Selected segment or vertex (first is 0) (MOVE_VERTEX, ADD_VERTEX, DELETE_VERTEX).
int mSize
 Point / node size (later make editable array of Sizes).
bool mSuspend
 If tool is not closed and another QGIS tool is selected, suspend is set to true.
std::vector< QPen > mSymb
 Vector of pens for symbology codes.
std::vector< bool > mSymbDisplay
 Display this type.
std::vector< QString > mSymbName
 Symbology name.
int mTool
 Current tool (EditTools).
QgsCoordinateTransformmTransform
 Transformation.
bool mValid
 Status: true - active vector was successfully opened for editing.

Static Private Attributes

static bool mRunning = false
 Editing is already running.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index