📄 gwcalc.h
字号:
// gwCalc.h by Dr. Gerhard Wanderer (gerhard.wanderer@i-dail.de)// $Id: gwCalc.h,v 1.3 2002/12/17 15:31:55 gerhard Exp gerhard $#ifndef GWCALC_H#define GWCALC_Hextern "C" {#include "calculator.h" }#include <qvariant.h>#include <qwidget.h>#include <qmultilineedit.h>#include <qdialog.h>#include <qtableview.h>#include <qlineedit.h>#include <qscrollbar.h>#include <qlistbox.h>class QLabel;class QPushButton;class QLCDNumber;class QMultiLineEdit;class QPixmap;class QLabel;class QPalette;class QWidget;class QDialog;class QLineEdit;class QScrollBar;class QListBox;class QComboBox;#ifdef ZAURUS# define FONT08 8# define FONT10 10# define FONT12 12# define FONT16 16# define FONT18 18# define FONT20 20#endif#ifdef LAPTOP# define FONT08 6# define FONT10 7# define FONT12 7# define FONT16 9# define FONT18 10# define FONT20 12#else# define FONT08 8# define FONT10 10# define FONT12 12# define FONT16 16# define FONT18 18# define FONT20 20#endif#ifdef ZAURUS# define MAINWIDTH 240# define MAINHEIGHT 290# define BTNSIZE 35# define FKTBTN 30# define LCD_OF 23# define LCD_MX 177# define LCD_MY 26# define LCD_EX 35# define CHRBTN 17# define SWBTN 16# define TOPLINE 100# define DEFLINE 133# define DEFHEIGHT 45# define VARHEIGHT 20# define VARANZ 9#else# define MAINWIDTH 300# define MAINHEIGHT 315# define BTNSIZE 42# define FKTBTN 40# define LCD_OF 30# define LCD_MX 218# define LCD_MY 26# define LCD_EX 45# define CHRBTN 21# define TOPLINE 102# define SWBTN 18# define DEFLINE 165# define DEFHEIGHT 125# define VARHEIGHT 23# define VARANZ 11#endif// my own Multiline Edit class to get access to backspace functionclass gwCalcEdit : public QMultiLineEdit { public: gwCalcEdit (QWidget *parent = 0); void gwCalcEditDel (void);};// Variable List Dialogclass VarList : public QDialog{ Q_OBJECT public: VarList(int x, int y); ~VarList(); void AddVar(char *name, double cont, int ref); void AddVarFinish(int refcnt); char* GetVar(int pos, double *cont, int* ref); int GetRefCnt(); public slots: void setPosition(int beg); void getValues (); private: QPushButton *s01, *s02; double vvalue[100]; int vref[100]; char *vname[100]; QLineEdit *n[12], *v[12]; QScrollBar *sb; int count, vbeg, initial; int RefCnt;};// History List Dialogclass HistList : public QDialog{ Q_OBJECT public: HistList(int x, int y); QListBox *lb; QPushButton *s01, *s02; private:};// Configuration Dialogclass ConfigEdit : public QDialog{ Q_OBJECT public: ConfigEdit(int x, int y); QLabel *ql1, *ql2, *ql3; QComboBox *am, *an, *fmt; QPushButton *s01, *s02; private:};// Function List Dialogclass FuncList : public QDialog{ Q_OBJECT public: FuncList(int x, int y); void setList(CALCFKT*, int); int getNumber(void); public slots: void setPosition(int beg); void Activate (int); void InsertButtonS01(); void InsertButtonS02(); void InsertButtonS03(); void InsertButtonS04(); void InsertButtonS05(); private: QLabel *ql1, *ql2, *ql3, *ql4; gwCalcEdit *inpfeld; QLineEdit *f, *p[6]; QScrollBar *fsb, *psb; QComboBox *fkt; QPushButton *s01, *s02, *s03, *s04, *s05; char *va[100]; CALCFKT *c; int count, vbeg, initial; int canz; int cur; int change;};// Main Widgetclass gwCalcMain : public QWidget{ Q_OBJECT public: gwCalcMain(); public slots: void InsertButtonB01(); void InsertButtonB02(); void InsertButtonB03(); void InsertButtonB04(); void InsertButtonB05(); void InsertButtonB06(); void InsertButtonB07(); void InsertButtonB08(); void InsertButtonB09(); void InsertButtonB10(); void InsertButtonB11(); void InsertButtonB12(); void InsertButtonB13(); void InsertButtonB14(); void InsertButtonB15(); void InsertButtonB16(); void InsertButtonB17(); void InsertButtonB18(); void InsertButtonB19(); void InsertButtonB20(); void InsertButtonB21(); void InsertButtonB23(); void InsertButtonB24(); void InsertButtonF01(); void InsertButtonF02(); void InsertButtonF03(); void InsertButtonF04(); void InsertButtonF05(); void InsertButtonF06(); void InsertButtonF07(); void InsertButtonF08(); void InsertButtonF09(); void InsertButtonF10(); void InsertButtonF11(); void InsertButtonF12(); void InsertButtonP01(); void InsertButtonP02(); void InsertButtonP03(); void InsertButtonP04(); void InsertButtonS01(); void InsertButtonS02(); void InsertButtonS03(); void InsertButtonS04(); void InsertButtonS05(); void InsertButtonS06(); void InsertButtonS07(); void InsertButtonS08(); void InputReturn(); private: QPushButton *s01, *s02, *s03, *s04, *s05, *s06, *s07, *s08; QPushButton *p01, *p02, *p03, *p04; QPushButton *b01, *b02, *b03, *b04, *b05, *b06, *b07, *b08; QPushButton *b09, *b10, *b11, *b12, *b13, *b14, *b15, *b16; QPushButton *b17, *b18, *b19, *b20, *b21, *b22, *b23, *b24; QPushButton *f01, *f02, *f03, *f04, *f05, *f06, *f07, *f08; QPushButton *f09, *f10, *f11, *f12; QLabel *lcd, *lcdexp; gwCalcEdit *inpfeld; QLabel *ql01, *ql02; QPixmap *qp01a, *qp02a, *qp03a, *qp04a, *qp05a, *qp06a; QPixmap *qp07a, *qp08a, *qp09a, *qp10a, *qp11a, *qp12a; QPixmap *qp01b, *qp02b, *qp03b, *qp04b, *qp05b, *qp06b; QPixmap *qp07b, *qp08b, *qp09b, *qp10b, *qp11b, *qp12b; QPixmap *qp01c, *qp02c, *qp03c, *qp04c, *qp05c, *qp06c; QPixmap *qp07c, *qp08c, *qp09c, *qp10c, *qp11c, *qp12c; QPixmap *qleer; QPalette *cswitch, *cexe, *cclr, *cfkt; VarList *vars; HistList *hvars; FuncList *fkts; ConfigEdit *cedit; double ans; int ifkt; int iinv; int ihyp; };#endif // GWCALC_H// Local Variables: ***// mode:c++ ***// End: ***
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -