QGIS API Documentation
2.4.0-Chugiak
|
#include <qgsattributedialog.h>
Public Slots | |
void | accept () |
int | exec () |
Show the dialog and block the application until the dialog is closed. Ownership of this object is not changed. More... | |
void | show () |
Show the dialog non-blocking. More... | |
Public Member Functions | |
QgsAttributeDialog (QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QgsDistanceArea myDa, QWidget *parent=0, bool showDialogButtons=true) | |
Create an attribute dialog for a given layer and feature. More... | |
QgsAttributeDialog (QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget *parent=0, bool showDialogButtons=true, QgsAttributeEditorContext context=QgsAttributeEditorContext()) | |
Create an attribute dialog for a given layer and feature. More... | |
~QgsAttributeDialog () | |
void | saveGeometry () |
Saves the size and position for the next time this dialog box will be used. More... | |
void | restoreGeometry () |
Restores the size and position from the last time this dialog box was used. More... | |
void | setHighlight (QgsHighlight *h) |
setHighlight More... | |
QDialog * | dialog () |
QgsAttributeForm * | attributeForm () |
const QgsFeature * | feature () |
bool | editable () |
Is this dialog editable? More... | |
void | setIsAddDialog (bool isAddDialog) |
Toggles the form mode between edit feature and add feature. More... | |
void | setEditCommandMessage (const QString &message) |
Sets the edit command message (Undo) that will be used when the dialog is accepted. More... | |
Protected Member Functions | |
bool | eventFilter (QObject *obj, QEvent *e) |
Private Slots | |
void | onDialogFinished (int result) |
Private Member Functions | |
void | init (QgsVectorLayer *layer, QgsFeature *feature, QgsAttributeEditorContext &context, QWidget *parent) |
Private Attributes | |
QPointer< QDialog > | mDialog |
QString | mSettingsPath |
QgsHighlight * | mHighlight |
int | mFormNr |
bool | mShowDialogButtons |
QString | mReturnvarname |
QgsAttributeForm * | mAttributeForm |
bool | mEditable |
Static Private Attributes | |
static int | sFormCounter |
static QString | sSettingsPath |
Definition at line 36 of file qgsattributedialog.h.
QgsAttributeDialog::QgsAttributeDialog | ( | QgsVectorLayer * | vl, |
QgsFeature * | thepFeature, | ||
bool | featureOwner, | ||
QgsDistanceArea | myDa, | ||
QWidget * | parent = 0 , |
||
bool | showDialogButtons = true |
||
) |
Create an attribute dialog for a given layer and feature.
vl | The layer for which the dialog will be generated |
thepFeature | A feature for which the dialog will be generated |
featureOwner | Set to true, if the dialog should take ownership of the feature |
myDa | A QgsDistanceArea which will be used for expressions |
parent | A parent widget for the dialog |
showDialogButtons | True: Show the dialog buttons accept/cancel |
Definition at line 27 of file qgsattributedialog.cpp.
References QgsAttributeForm::hideButtonBox(), init(), mAttributeForm, and QgsAttributeEditorContext::setDistanceArea().
QgsAttributeDialog::QgsAttributeDialog | ( | QgsVectorLayer * | vl, |
QgsFeature * | thepFeature, | ||
bool | featureOwner, | ||
QWidget * | parent = 0 , |
||
bool | showDialogButtons = true , |
||
QgsAttributeEditorContext | context = QgsAttributeEditorContext() |
||
) |
Create an attribute dialog for a given layer and feature.
vl | The layer for which the dialog will be generated |
thepFeature | A feature for which the dialog will be generated |
featureOwner | Set to true, if the dialog should take ownership of the feature |
parent | A parent widget for the dialog |
showDialogButtons | True: Show the dialog buttons accept/cancel |
context | The context in which this dialog is created |
Definition at line 42 of file qgsattributedialog.cpp.
References QgsAttributeForm::hideButtonBox(), init(), and mAttributeForm.
QgsAttributeDialog::~QgsAttributeDialog | ( | ) |
Definition at line 55 of file qgsattributedialog.cpp.
References mDialog, and mHighlight.
|
slot |
Definition at line 91 of file qgsattributedialog.cpp.
References mAttributeForm, and QgsAttributeForm::save().
Referenced by init().
|
inline |
Definition at line 88 of file qgsattributedialog.h.
|
inline |
Definition at line 86 of file qgsattributedialog.h.
|
inline |
Is this dialog editable?
Definition at line 97 of file qgsattributedialog.h.
|
protected |
Definition at line 122 of file qgsattributedialog.cpp.
References mDialog, and mHighlight.
|
slot |
Show the dialog and block the application until the dialog is closed. Ownership of this object is not changed.
Definition at line 96 of file qgsattributedialog.cpp.
References mDialog, and QgsDebugMsg.
|
inline |
Definition at line 90 of file qgsattributedialog.h.
|
private |
Definition at line 150 of file qgsattributedialog.cpp.
References accept(), mAttributeForm, mDialog, onDialogFinished(), restoreGeometry(), and tr.
Referenced by QgsAttributeDialog().
|
privateslot |
Definition at line 144 of file qgsattributedialog.cpp.
References saveGeometry().
Referenced by init().
void QgsAttributeDialog::restoreGeometry | ( | ) |
Restores the size and position from the last time this dialog box was used.
Definition at line 75 of file qgsattributedialog.cpp.
References mDialog, and mSettingsPath.
Referenced by init().
void QgsAttributeDialog::saveGeometry | ( | ) |
Saves the size and position for the next time this dialog box will be used.
Definition at line 66 of file qgsattributedialog.cpp.
References mDialog, and mSettingsPath.
Referenced by onDialogFinished().
|
inline |
Sets the edit command message (Undo) that will be used when the dialog is accepted.
message | The message |
Definition at line 113 of file qgsattributedialog.h.
void QgsAttributeDialog::setHighlight | ( | QgsHighlight * | h | ) |
setHighlight
h | The highlight. Ownership is taken. |
Definition at line 84 of file qgsattributedialog.cpp.
References mHighlight.
|
inline |
Toggles the form mode between edit feature and add feature.
If set to true, the dialog will be editable even with an invalid feature. If set to true, the dialog will add a new feature when the form is accepted.
isAddDialog | If set to true, turn this dialog into an add feature dialog. |
Definition at line 106 of file qgsattributedialog.h.
|
slot |
Show the dialog non-blocking.
Reparents this dialog to be a child of the dialog form and is deleted when closed.
Definition at line 109 of file qgsattributedialog.cpp.
References mDialog.
|
private |
Definition at line 143 of file qgsattributedialog.h.
Referenced by accept(), init(), and QgsAttributeDialog().
|
private |
Definition at line 136 of file qgsattributedialog.h.
Referenced by eventFilter(), exec(), init(), restoreGeometry(), saveGeometry(), show(), and ~QgsAttributeDialog().
|
private |
Definition at line 146 of file qgsattributedialog.h.
|
private |
Definition at line 140 of file qgsattributedialog.h.
|
private |
Definition at line 139 of file qgsattributedialog.h.
Referenced by eventFilter(), setHighlight(), and ~QgsAttributeDialog().
|
private |
Definition at line 142 of file qgsattributedialog.h.
|
private |
Definition at line 137 of file qgsattributedialog.h.
Referenced by restoreGeometry(), and saveGeometry().
|
private |
Definition at line 141 of file qgsattributedialog.h.
|
staticprivate |
Definition at line 148 of file qgsattributedialog.h.
|
staticprivate |
Definition at line 149 of file qgsattributedialog.h.