-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
expression button and expression capability added to the field model
- Loading branch information
Showing
14 changed files
with
525 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
class QgsFieldExpressionWidget : QWidget | ||
{ | ||
%TypeHeaderCode | ||
#include "qgsfieldexpressionwidget.h" | ||
%End | ||
|
||
public: | ||
/** | ||
* @brief QgsFieldExpressionWidget creates a widget with a combo box to display the fields and expression and a button to open the expression dialog | ||
*/ | ||
explicit QgsFieldExpressionWidget( QWidget *parent /TransferThis/ = 0 ); | ||
|
||
//! define the title used in the expression dialog | ||
void setExpressionDialogTitle( QString title ); | ||
|
||
//! set the geometry calculator used in the expression dialog | ||
void setGeomCalculator( const QgsDistanceArea &da ); | ||
|
||
//! return a pointer to the combo box in the widget | ||
QgsFieldComboBox* fieldComboBox(); | ||
|
||
//! return a pointer to the tool button used in the widget | ||
QToolButton* toolButton(); | ||
|
||
/** | ||
* @brief currentField returns the currently selected field or expression if allowed | ||
* @param isExpression determines if the string returned is the name of a field or an expression | ||
*/ | ||
QString currentField( bool *isExpression = 0 ); | ||
|
||
//! Returns the currently used layer | ||
QgsVectorLayer* layer(); | ||
|
||
public slots: | ||
//! set the layer used to display the fields and expression | ||
void setLayer( QgsMapLayer* layer ); | ||
|
||
//! sets the current field or expression in the widget | ||
void setField( QString fieldName ); | ||
|
||
//! open the expression dialog to edit the current or add a new expression | ||
void editExpression(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.