author | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
commit | 15318cad33835e4e2dc620d033e43cd930676cdd (patch) (side-by-side diff) | |
tree | c2fa0399a2c47fda8e2cd0092c73a809d17f68eb /noncore/tools/calc2/simple | |
download | opie-15318cad33835e4e2dc620d033e43cd930676cdd.zip opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2 |
Initial revision
-rw-r--r-- | noncore/tools/calc2/simple/README | 1 | ||||
-rw-r--r-- | noncore/tools/calc2/simple/simple.pro | 14 | ||||
-rw-r--r-- | noncore/tools/calc2/simple/simple.ui | 704 | ||||
-rw-r--r-- | noncore/tools/calc2/simple/simplefactory.cpp | 51 | ||||
-rw-r--r-- | noncore/tools/calc2/simple/simplefactory.h | 46 | ||||
-rw-r--r-- | noncore/tools/calc2/simple/simpleimpl.cpp | 120 | ||||
-rw-r--r-- | noncore/tools/calc2/simple/simpleimpl.h | 65 |
7 files changed, 1001 insertions, 0 deletions
diff --git a/noncore/tools/calc2/simple/README b/noncore/tools/calc2/simple/README new file mode 100644 index 0000000..37acb64 --- a/dev/null +++ b/noncore/tools/calc2/simple/README @@ -0,0 +1 @@ +A simple interface with no operator precedence. diff --git a/noncore/tools/calc2/simple/simple.pro b/noncore/tools/calc2/simple/simple.pro new file mode 100644 index 0000000..92378a6 --- a/dev/null +++ b/noncore/tools/calc2/simple/simple.pro @@ -0,0 +1,14 @@ +TEMPLATE = lib +CONFIG -= moc +CONFIG += qt release + +# Input +INTERFACES += simple.ui +HEADERS = simpleimpl.h simplefactory.h stdinstructions.h +SOURCES = simpleimpl.cpp simplefactory.cpp + +INCLUDEPATH += $(QPEDIR)/include \ + $(QPEDIR)/calc2 +DEPENDPATH += $(QPEDIR)/include + +DESTDIR = $(QPEDIR)/plugins/calculator diff --git a/noncore/tools/calc2/simple/simple.ui b/noncore/tools/calc2/simple/simple.ui new file mode 100644 index 0000000..af12905 --- a/dev/null +++ b/noncore/tools/calc2/simple/simple.ui @@ -0,0 +1,704 @@ +<!DOCTYPE UI><UI> +<class>FormSimple</class> +<widget> + <class>QWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>FormSimple</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>73</x> + <y>0</y> + <width>240</width> + <height>320</height> + </rect> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>240</width> + <height>320</height> + </size> + </property> + <property stdset="1"> + <name>baseSize</name> + <size> + <width>240</width> + <height>240</height> + </size> + </property> + <property stdset="1"> + <name>caption</name> + <string>Simple</string> + </property> + <grid> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>0</number> + </property> + <widget row="4" column="2" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PBEval</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>160</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>=</string> + </property> + </widget> + <widget row="2" column="1" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PB5</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>5</string> + </property> + </widget> + <widget row="4" column="0" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PBDecimal</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>.</string> + </property> + </widget> + <widget row="3" column="2" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PB3</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>3</string> + </property> + </widget> + <widget row="3" column="1" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PB2</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>2</string> + </property> + </widget> + <widget row="2" column="0" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PB4</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>4</string> + </property> + </widget> + <widget row="2" column="2" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PB6</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>6</string> + </property> + </widget> + <widget row="3" column="3" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PBMul</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>*</string> + </property> + </widget> + <widget row="2" column="3" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PBSub</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>-</string> + </property> + </widget> + <widget row="1" column="3" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PBAdd</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>+</string> + </property> + </widget> + <widget row="1" column="2" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PB9</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>9</string> + </property> + </widget> + <widget row="1" column="0" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PB7</cstring> + </property> + <property stdset="1"> + <name>enabled</name> + <bool>true</bool> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>7</string> + </property> + </widget> + <widget row="3" column="0" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PB1</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>1</string> + </property> + </widget> + <widget row="4" column="1" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PB0</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>160</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>0</string> + </property> + </widget> + <widget row="4" column="3" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PBDiv</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>/</string> + </property> + <property stdset="1"> + <name>autoRepeat</name> + <bool>true</bool> + </property> + </widget> + <widget row="1" column="1" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PB8</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>8</string> + </property> + </widget> + <widget row="0" column="0" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PBMPlus</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>M+</string> + </property> + </widget> + <widget row="0" column="3" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PBCE</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>CE</string> + </property> + </widget> + <widget row="0" column="2" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PBMC</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>MC</string> + </property> + </widget> + <widget row="0" column="1" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>PBMR</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>80</width> + <height>80</height> + </size> + </property> + <property stdset="1"> + <name>text</name> + <string>MR</string> + </property> + </widget> + </grid> +</widget> +<connections> + <connection> + <sender>PB0</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>val0Clicked()</slot> + </connection> + <connection> + <sender>PB1</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>val1Clicked()</slot> + </connection> + <connection> + <sender>PB2</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>val2Clicked()</slot> + </connection> + <connection> + <sender>PB3</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>val3Clicked()</slot> + </connection> + <connection> + <sender>PB4</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>val4Clicked()</slot> + </connection> + <connection> + <sender>PB5</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>val5Clicked()</slot> + </connection> + <connection> + <sender>PB6</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>val6Clicked()</slot> + </connection> + <connection> + <sender>PB7</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>val7Clicked()</slot> + </connection> + <connection> + <sender>PB8</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>val8Clicked()</slot> + </connection> + <connection> + <sender>PB9</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>val9Clicked()</slot> + </connection> + <connection> + <sender>PBSub</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>subClicked()</slot> + </connection> + <connection> + <sender>PBMul</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>mulClicked()</slot> + </connection> + <connection> + <sender>PBDiv</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>divClicked()</slot> + </connection> + <connection> + <sender>PBDecimal</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>decimalClicked()</slot> + </connection> + <connection> + <sender>PBEval</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>evalClicked()</slot> + </connection> + <connection> + <sender>PBMC</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>MCClicked()</slot> + </connection> + <connection> + <sender>PBMPlus</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>MPlusClicked()</slot> + </connection> + <connection> + <sender>PBMR</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>MRClicked()</slot> + </connection> + <connection> + <sender>PBAdd</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>addClicked()</slot> + </connection> + <connection> + <sender>PBCE</sender> + <signal>clicked()</signal> + <receiver>FormSimple</receiver> + <slot>CEClicked()</slot> + </connection> + <slot access="public">CEClicked()</slot> + <slot access="public">MCClicked()</slot> + <slot access="public">MPlusClicked()</slot> + <slot access="public">MRClicked()</slot> + <slot access="public">addClicked()</slot> + <slot access="public">decimalClicked()</slot> + <slot access="public">divClicked()</slot> + <slot access="public">evalClicked()</slot> + <slot access="public">mulClicked()</slot> + <slot access="public">subClicked()</slot> + <slot access="public">val0Clicked()</slot> + <slot access="public">val1Clicked()</slot> + <slot access="public">val2Clicked()</slot> + <slot access="public">val3Clicked()</slot> + <slot access="public">val4Clicked()</slot> + <slot access="public">val5Clicked()</slot> + <slot access="public">val6Clicked()</slot> + <slot access="public">val7Clicked()</slot> + <slot access="public">val8Clicked()</slot> + <slot access="public">val9Clicked()</slot> +</connections> +</UI> diff --git a/noncore/tools/calc2/simple/simplefactory.cpp b/noncore/tools/calc2/simple/simplefactory.cpp new file mode 100644 index 0000000..515418f --- a/dev/null +++ b/noncore/tools/calc2/simple/simplefactory.cpp @@ -0,0 +1,51 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qtopia Environment. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "simplefactory.h" +#include "simpleimpl.h" +#include <engine.h> + +QWidget *SimpleInterface::getPlugin ( Engine *e, QWidget *parent ) { + if ( !input ) + input = new FormSimpleImpl ( e, parent ); + return input; +} + +#ifndef QT_NO_COMPONENT +QRESULT SimpleInterface::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) +{ + *iface = 0; + if ( uuid == IID_QUnknown ) + *iface = this; + else if ( uuid == IID_Calc ) + *iface = this; + + if ( *iface ) + (*iface)->addRef(); + return QS_OK; +} + +Q_EXPORT_INTERFACE() +{ + Q_CREATE_INSTANCE( SimpleInterface ) +} +#endif diff --git a/noncore/tools/calc2/simple/simplefactory.h b/noncore/tools/calc2/simple/simplefactory.h new file mode 100644 index 0000000..e1022fd --- a/dev/null +++ b/noncore/tools/calc2/simple/simplefactory.h @@ -0,0 +1,46 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qtopia Environment. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef BINARYIMPL_H +#define BINARYIMPL_H + +#include "simpleimpl.h" +#include <plugininterface.h> +#include <engine.h> + +class SimpleInterface : public CalcInterface +{ +public: + SimpleInterface(){input = 0;}; + virtual ~SimpleInterface(){}; + +#ifndef QT_NO_COMPONENT + QRESULT queryInterface( const QUuid&, QUnknownInterface** ); + Q_REFCOUNT +#endif + + QWidget *getPlugin( Engine *, QWidget *parent ); + +private: + FormSimpleImpl *input; + ulong ref; +}; + +#endif diff --git a/noncore/tools/calc2/simple/simpleimpl.cpp b/noncore/tools/calc2/simple/simpleimpl.cpp new file mode 100644 index 0000000..f71f000 --- a/dev/null +++ b/noncore/tools/calc2/simple/simpleimpl.cpp @@ -0,0 +1,120 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qtopia Environment. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include <qpushbutton.h> +#include <qlcdnumber.h> + +#include "simpleimpl.h" +#include <stdinstructions.h> + +void FormSimpleImpl::CEClicked() { + engine->hardReset(); +} + +void FormSimpleImpl::MCClicked() { + engine->memClear(); +} + +void FormSimpleImpl::MRClicked() { + engine->memRecall(); +} + +void FormSimpleImpl::MPlusClicked() { + engine->memSave(); +} + +void FormSimpleImpl::evalClicked() { + engine->eval(); +} + +void FormSimpleImpl::addClicked () +{ + engine->pushInstruction (new iAdd ()); +} + +void FormSimpleImpl::subClicked () +{ + engine->pushInstruction (new iSub ()); +} + +void FormSimpleImpl::mulClicked () +{ + engine->pushInstruction (new iMul ()); +} + +void FormSimpleImpl::divClicked () +{ + engine->pushInstruction (new iDiv ()); +} + +void FormSimpleImpl::decimalClicked () +{ + engine->pushValue ('.'); +} + +void FormSimpleImpl::val1Clicked () +{ + engine->pushValue ('1'); +} + +void FormSimpleImpl::val2Clicked () +{ + engine->pushValue ('2'); +} + +void FormSimpleImpl::val3Clicked () +{ + engine->pushValue ('3'); +} + +void FormSimpleImpl::val4Clicked () +{ + engine->pushValue ('4'); +} + +void FormSimpleImpl::val5Clicked () +{ + engine->pushValue ('5'); +} + +void FormSimpleImpl::val6Clicked () +{ + engine->pushValue ('6'); +} + +void FormSimpleImpl::val7Clicked () +{ + engine->pushValue ('7'); +} + +void FormSimpleImpl::val8Clicked () +{ + engine->pushValue ('8'); +} + +void FormSimpleImpl::val9Clicked () +{ + engine->pushValue ('9'); +} + +void FormSimpleImpl::val0Clicked () +{ + engine->pushValue ('0'); +} diff --git a/noncore/tools/calc2/simple/simpleimpl.h b/noncore/tools/calc2/simple/simpleimpl.h new file mode 100644 index 0000000..a2db154 --- a/dev/null +++ b/noncore/tools/calc2/simple/simpleimpl.h @@ -0,0 +1,65 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qtopia Environment. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef STANDARDIMPL_H +#define STANDARDIMPL_H + +#include <qpe/qmath.h> +#include <qlcdnumber.h> + +#include "simple.h" +#include "engine.h" +#include "instruction.h" + +class FormSimpleImpl:public FormSimple { +Q_OBJECT +public: + FormSimpleImpl (Engine *e, QWidget * parent = 0, const char *name = 0) + :FormSimple (parent, name) {engine = e;engine->setRepresentation(rDouble);}; + + ~FormSimpleImpl () { }; + +private: + Engine *engine; + +private slots: + void MPlusClicked(); + void MCClicked(); + void MRClicked(); + void CEClicked(); + void evalClicked(); + void addClicked (); + void decimalClicked (); + void divClicked (); + void mulClicked (); + void subClicked (); + void val0Clicked (); + void val1Clicked (); + void val2Clicked (); + void val3Clicked (); + void val4Clicked (); + void val5Clicked (); + void val6Clicked (); + void val7Clicked (); + void val8Clicked (); + void val9Clicked (); +}; + +#endif |