kspread

kspread_dlg_formula.h
1/* This file is part of the KDE project
2 Copyright (C) 2002-2003 Ariya Hidayat <ariya@kde.org>
3 (C) 2002-2003 Norbert Andres <nandres@web.de>
4 (C) 1999-2003 Laurent Montel <montel@kde.org>
5 (C) 2002 Philipp Mueller <philipp.mueller@gmx.de>
6 (C) 2002 John Dailey <dailey@vt.edu>
7 (C) 2002 Daniel Herring <herring@eecs.ku.edu>
8 (C) 2000-2001 Werner Trobin <trobin@kde.org>
9 (C) 1998-2000 Torben Weis <weis@kde.org>
10
11 This library is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Library General Public
13 License as published by the Free Software Foundation; either
14 version 2 of the License, or (at your option) any later version.
15
16 This library is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Library General Public License for more details.
20
21 You should have received a copy of the GNU Library General Public License
22 along with this library; see the file COPYING.LIB. If not, write to
23 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA.
25*/
26
27#ifndef __kspread_dlg_formula__
28#define __kspread_dlg_formula__
29
30#include <tqframe.h>
31
32#include <kcompletion.h>
33#include <kdialogbase.h>
34
35class TQComboBox;
36class TQLabel;
37class TQLineEdit;
38class TQListBox;
39class TQPushButton;
40class TQTabWidget;
41class TQTextBrowser;
42class KLineEdit;
43
44namespace KSpread
45{
46class FunctionDescription;
47class Sheet;
48class View;
49
50class FormulaDialog : public KDialogBase
51{
52 TQ_OBJECT
53
54public:
55 FormulaDialog( View* parent, const char* name,const TQString& formulaName=0);
56 ~FormulaDialog();
57private:
62 TQString createParameter( const TQString& _text, int param );
67 TQString createFormula();
68
69private slots:
73 void slotOk();
77 void slotClose();
82 void slotSelected( const TQString& function );
88 void slotShowFunction( const TQString& function );
94 void slotDoubleClicked( TQListBoxItem* item );
98 void slotActivated(const TQString& category );
102 void slotChangeText(const TQString& text );
107 void slotSelectionChanged();
112 void slotSelectButton();
116 void slotSearchText(const TQString& text );
120 void slotPressReturn();
121
122public:
126 bool eventFilter( TQObject* obj, TQEvent* ev );
127protected:
128 virtual void closeEvent ( TQCloseEvent * );
129private:
130 View* m_pView;
131
132 TQTabWidget* m_tabwidget;
133 TQTextBrowser* m_browser;
134 TQWidget* m_input;
135
136 TQPushButton *selectFunction;
137 TQComboBox *typeFunction;
138 TQListBox *functions;
139 TQLineEdit *result;
140
141 KLineEdit *searchFunct;
142 TDECompletion listFunct;
143
144 TQLabel* label1;
145 TQLabel* label2;
146 TQLabel* label3;
147 TQLabel* label4;
148 TQLabel* label5;
149 TQLineEdit *firstElement;
150 TQLineEdit *secondElement;
151 TQLineEdit *thirdElement;
152 TQLineEdit *fourElement;
153 TQLineEdit *fiveElement;
159 TQLineEdit* m_focus;
160
161 int m_column;
162 int m_row;
163 TQString m_oldText;
164
165 TQString m_funcName;
166 TQString m_sheetName;
167
168 TQString m_rightText;
169 TQString m_leftText;
173 bool refresh_result;
174
175 KSpread::FunctionDescription* m_desc;
176};
177
178} // namespace KSpread
179
180#endif
The View class displays a KSpread document.
The KSpread namespace.
Definition commands.h:39