Skip to content
Permalink
Browse files

add log, ln and != button in the raster calculator

  • Loading branch information
Gustry authored and nyalldawson committed Jun 23, 2015
1 parent 83f3a58 commit 488f3947eb57a4680d561b293631ca29369df365
Showing with 107 additions and 81 deletions.
  1. +15 −0 src/app/qgsrastercalcdialog.cpp
  2. +3 −0 src/app/qgsrastercalcdialog.h
  3. +89 −81 src/ui/qgsrastercalcdialogbase.ui
@@ -386,6 +386,21 @@ void QgsRasterCalcDialog::on_mATanButton_clicked()
mExpressionTextEdit->insertPlainText( " atan ( " );
}

void QgsRasterCalcDialog::on_mLnButton_clicked()
{
mExpressionTextEdit->insertPlainText( " ln ( " );
}

void QgsRasterCalcDialog::on_mLogButton_clicked()
{
mExpressionTextEdit->insertPlainText( " log10 ( " );
}

void QgsRasterCalcDialog::on_mNotEqualButton_clicked()
{
mExpressionTextEdit->insertPlainText( " != " );
}

void QgsRasterCalcDialog::on_mOpenBracketPushButton_clicked()
{
mExpressionTextEdit->insertPlainText( " ( " );
@@ -64,6 +64,9 @@ class APP_EXPORT QgsRasterCalcDialog: public QDialog, private Ui::QgsRasterCalcD
void on_mSinButton_clicked();
void on_mASinButton_clicked();
void on_mExpButton_clicked();
void on_mLnButton_clicked();
void on_mLogButton_clicked();
void on_mNotEqualButton_clicked();
void on_mTanButton_clicked();
void on_mACosButton_clicked();
void on_mATanButton_clicked();
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>677</width>
<height>589</height>
<height>637</height>
</rect>
</property>
<property name="windowTitle">
@@ -243,7 +243,7 @@
</widget>
</item>
<item row="4" column="1" colspan="3">
<widget class="QgsProjectionSelectionWidget" name="mCrsSelector" native="true">
<widget class="QgsProjectionSelectionWidget" name="mCrsSelector">
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
@@ -282,38 +282,45 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="1" column="3">
<item row="1" column="6">
<widget class="QPushButton" name="mASinButton">
<property name="text">
<string>asin</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="mMultiplyPushButton">
<item row="0" column="4">
<widget class="QPushButton" name="mCosButton">
<property name="text">
<string>*</string>
<string>cos</string>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QPushButton" name="mNotEqualButton">
<property name="text">
<string>!=</string>
</property>
</widget>
</item>
<item row="2" column="6">
<widget class="QPushButton" name="mOrButton">
<widget class="QPushButton" name="mLesserEqualButton">
<property name="text">
<string>OR</string>
<string>&lt;=</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="mDividePushButton">
<item row="0" column="6">
<widget class="QPushButton" name="mSinButton">
<property name="text">
<string>/</string>
<string>sin</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="mMinusPushButton">
<item row="1" column="8">
<widget class="QPushButton" name="mATanButton">
<property name="text">
<string>-</string>
<string>atan</string>
</property>
</widget>
</item>
@@ -324,59 +331,65 @@
</property>
</widget>
</item>
<item row="0" column="6">
<widget class="QPushButton" name="mOpenBracketPushButton">
<item row="0" column="8">
<widget class="QPushButton" name="mTanButton">
<property name="text">
<string>(</string>
<string>tan</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="mSqrtButton">
<item row="1" column="4">
<widget class="QPushButton" name="mACosButton">
<property name="text">
<string>sqrt</string>
<string>acos</string>
</property>
</widget>
</item>
<item row="1" column="5">
<widget class="QPushButton" name="mATanButton">
<item row="2" column="10">
<widget class="QPushButton" name="mAndButton">
<property name="text">
<string>atan</string>
<string>AND</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="mGreaterButton">
<property name="text">
<string>&gt;</string>
<item row="0" column="14">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="mCosButton">
<item row="2" column="8">
<widget class="QPushButton" name="mGreaterEqualButton">
<property name="text">
<string>cos</string>
<string>&gt;=</string>
</property>
</widget>
</item>
<item row="2" column="5">
<widget class="QPushButton" name="mAndButton">
<item row="1" column="0">
<widget class="QPushButton" name="mMinusPushButton">
<property name="text">
<string>AND</string>
<string>-</string>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QPushButton" name="mExpButton">
<item row="1" column="1">
<widget class="QPushButton" name="mDividePushButton">
<property name="text">
<string>^</string>
<string>/</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QPushButton" name="mLesserEqualButton">
<item row="2" column="1">
<widget class="QPushButton" name="mGreaterButton">
<property name="text">
<string>&lt;=</string>
<string>&gt;</string>
</property>
</widget>
</item>
@@ -387,60 +400,68 @@
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QPushButton" name="mGreaterEqualButton">
<item row="0" column="1">
<widget class="QPushButton" name="mMultiplyPushButton">
<property name="text">
<string>&gt;=</string>
<string>*</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QPushButton" name="mSinButton">
<item row="0" column="0">
<widget class="QPushButton" name="mPlusPushButton">
<property name="text">
<string>sin</string>
<string>+</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="mPlusPushButton">
<item row="2" column="11">
<widget class="QPushButton" name="mOrButton">
<property name="text">
<string>+</string>
<string>OR</string>
</property>
</widget>
</item>
<item row="0" column="5">
<widget class="QPushButton" name="mACosButton">
<item row="0" column="10">
<widget class="QPushButton" name="mLogButton">
<property name="text">
<string>acos</string>
<string>log10</string>
</property>
</widget>
</item>
<item row="1" column="6">
<item row="1" column="10">
<widget class="QPushButton" name="mLnButton">
<property name="text">
<string>ln</string>
</property>
</widget>
</item>
<item row="0" column="11">
<widget class="QPushButton" name="mOpenBracketPushButton">
<property name="text">
<string>(</string>
</property>
</widget>
</item>
<item row="1" column="11">
<widget class="QPushButton" name="mCloseBracketPushButton">
<property name="text">
<string>)</string>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QPushButton" name="mTanButton">
<item row="0" column="2">
<widget class="QPushButton" name="mSqrtButton">
<property name="text">
<string>tan</string>
<string>sqrt</string>
</property>
</widget>
</item>
<item row="0" column="7">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>20</height>
</size>
<item row="1" column="2">
<widget class="QPushButton" name="mExpButton">
<property name="text">
<string>^</string>
</property>
</spacer>
</widget>
</item>
</layout>
</widget>
@@ -502,7 +523,7 @@
<customwidget>
<class>QgsProjectionSelectionWidget</class>
<extends>QWidget</extends>
<header location="global">qgsprojectionselectionwidget.h</header>
<header>qgsprojectionselectionwidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
@@ -520,25 +541,12 @@
<tabstop>mAddResultToProjectCheckBox</tabstop>
<tabstop>mPlusPushButton</tabstop>
<tabstop>mMultiplyPushButton</tabstop>
<tabstop>mSqrtButton</tabstop>
<tabstop>mSinButton</tabstop>
<tabstop>mExpButton</tabstop>
<tabstop>mACosButton</tabstop>
<tabstop>mOpenBracketPushButton</tabstop>
<tabstop>mMinusPushButton</tabstop>
<tabstop>mDividePushButton</tabstop>
<tabstop>mCosButton</tabstop>
<tabstop>mASinButton</tabstop>
<tabstop>mTanButton</tabstop>
<tabstop>mATanButton</tabstop>
<tabstop>mCloseBracketPushButton</tabstop>
<tabstop>mLessButton</tabstop>
<tabstop>mGreaterButton</tabstop>
<tabstop>mEqualButton</tabstop>
<tabstop>mLesserEqualButton</tabstop>
<tabstop>mGreaterEqualButton</tabstop>
<tabstop>mAndButton</tabstop>
<tabstop>mOrButton</tabstop>
<tabstop>mExpressionTextEdit</tabstop>
</tabstops>
<resources/>

0 comments on commit 488f394

Please sign in to comment.
You can’t perform that action at this time.