kspread
kspread_dlg_formula.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __kspread_dlg_formula__
00028 #define __kspread_dlg_formula__
00029
00030 #include <qframe.h>
00031
00032 #include <kcompletion.h>
00033 #include <kdialogbase.h>
00034
00035 class QComboBox;
00036 class QLabel;
00037 class QLineEdit;
00038 class QListBox;
00039 class QPushButton;
00040 class QTabWidget;
00041 class QTextBrowser;
00042 class KLineEdit;
00043
00044 namespace KSpread
00045 {
00046 class FunctionDescription;
00047 class Sheet;
00048 class View;
00049
00050 class FormulaDialog : public KDialogBase
00051 {
00052 Q_OBJECT
00053 public:
00054 FormulaDialog( View* parent, const char* name,const QString& formulaName=0);
00055 ~FormulaDialog();
00056 private:
00061 QString createParameter( const QString& _text, int param );
00066 QString createFormula();
00067
00068 private slots:
00072 void slotOk();
00076 void slotClose();
00081 void slotSelected( const QString& function );
00087 void slotShowFunction( const QString& function );
00093 void slotDoubleClicked( QListBoxItem* item );
00097 void slotActivated(const QString& category );
00101 void slotChangeText(const QString& text );
00106 void slotSelectionChanged();
00111 void slotSelectButton();
00115 void slotSearchText(const QString& text );
00119 void slotPressReturn();
00120
00121 public:
00125 bool eventFilter( QObject* obj, QEvent* ev );
00126 protected:
00127 virtual void closeEvent ( QCloseEvent * );
00128 private:
00129 View* m_pView;
00130
00131 QTabWidget* m_tabwidget;
00132 QTextBrowser* m_browser;
00133 QWidget* m_input;
00134
00135 QPushButton *selectFunction;
00136 QComboBox *typeFunction;
00137 QListBox *functions;
00138 QLineEdit *result;
00139
00140 KLineEdit *searchFunct;
00141 KCompletion listFunct;
00142
00143 QLabel* label1;
00144 QLabel* label2;
00145 QLabel* label3;
00146 QLabel* label4;
00147 QLabel* label5;
00148 QLineEdit *firstElement;
00149 QLineEdit *secondElement;
00150 QLineEdit *thirdElement;
00151 QLineEdit *fourElement;
00152 QLineEdit *fiveElement;
00158 QLineEdit* m_focus;
00159
00160 int m_column;
00161 int m_row;
00162 QString m_oldText;
00163
00164 QString m_funcName;
00165 QString m_sheetName;
00166
00167 QString m_rightText;
00168 QString m_leftText;
00172 bool refresh_result;
00173
00174 KSpread::FunctionDescription* m_desc;
00175 };
00176
00177 }
00178
00179 #endif
|