Skip to content

Commit

Permalink
Added more functions to function tree
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Sep 3, 2011
1 parent 72c045a commit c6da52c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
22 changes: 21 additions & 1 deletion src/gui/qgsexpressionbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
qgisexpressionbuilder.cpp - A genric expression string builder widget.
--------------------------------------
Date : 29-May-2011
Copyright : (C) 2006 by Nathan Woodrow
Copyright : (C) 2011 by Nathan Woodrow
Email : nathan.woodrow at gmail dot com
***************************************************************************
* *
Expand Down Expand Up @@ -48,6 +48,26 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget(QgsVectorLayer *layer)
this->registerItem("Geometry","Y"," $y ");
this->registerItem("Geometry","XAt"," xat( ");
this->registerItem("Geometry","YAt"," yat( ");

this->registerItem("String","Lower Case"," lower( ");
this->registerItem("String","Upper Case"," upper( ");
this->registerItem("String","Length"," length( ");
this->registerItem("String","Replace"," replace(,,, ");
this->registerItem("String","Regex Replace"," regexp_replace(,,, ");
this->registerItem("String","Substring"," substr(,,, ");

this->registerItem("Math","Square Root"," sqrt( ");
this->registerItem("Math","SIN"," sin( ");
this->registerItem("Math","COS"," cos( ");
this->registerItem("Math","TAN"," tan( ");
this->registerItem("Math","ASIN"," asin( ");
this->registerItem("Math","ACOS"," acos( ");
this->registerItem("Math","ATAN"," atan( ");
this->registerItem("Math","ATAN2"," atan2(, ");

this->registerItem("Casting","To integer"," toint( ");
this->registerItem("Casting","To real"," toreal( ");
this->registerItem("Casting","To string"," tostring( ");
}

QgsExpressionBuilderWidget::~QgsExpressionBuilderWidget()
Expand Down
19 changes: 14 additions & 5 deletions src/ui/qgslabelingguibase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
</item>
<item>
<widget class="QgsLabelPreview" name="lblFontPreview">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
Expand Down Expand Up @@ -66,7 +69,7 @@
<bool>false</bool>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<property name="iconSize">
<size>
Expand All @@ -76,7 +79,7 @@
</property>
<widget class="QWidget" name="tab_3">
<attribute name="icon">
<iconset resource="../../images/images.qrc">
<iconset>
<normaloff>:/images/themes/default/propertyicons/labels.png</normaloff>:/images/themes/default/propertyicons/labels.png</iconset>
</attribute>
<attribute name="title">
Expand Down Expand Up @@ -387,7 +390,7 @@
</widget>
<widget class="QWidget" name="tab">
<attribute name="icon">
<iconset resource="../../images/images.qrc">
<iconset>
<normaloff>:/images/themes/default/propertyicons/general.png</normaloff>:/images/themes/default/propertyicons/general.png</iconset>
</attribute>
<attribute name="title">
Expand All @@ -397,11 +400,17 @@
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea_2">
<property name="autoFillBackground">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
Expand Down Expand Up @@ -847,7 +856,7 @@
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="icon">
<iconset resource="../../images/images.qrc">
<iconset>
<normaloff>:/images/themes/gis/mActionOpenTable.png</normaloff>:/images/themes/gis/mActionOpenTable.png</iconset>
</attribute>
<attribute name="title">
Expand Down

0 comments on commit c6da52c

Please sign in to comment.