kspread Library API Documentation

kspread_dlg_formula.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002-2003 Ariya Hidayat <ariya@kde.org>
00003              (C) 2002-2003 Norbert Andres <nandres@web.de>
00004              (C) 1999-2003 Laurent Montel <montel@kde.org>
00005              (C) 2002 Philipp Mueller <philipp.mueller@gmx.de>
00006              (C) 2002 John Dailey <dailey@vt.edu>
00007              (C) 2002 Daniel Herring <herring@eecs.ku.edu>
00008              (C) 2000-2001 Werner Trobin <trobin@kde.org>
00009              (C) 1998-2000 Torben Weis <weis@kde.org>
00010 
00011    This library is free software; you can redistribute it and/or
00012    modify it under the terms of the GNU Library General Public
00013    License as published by the Free Software Foundation; either
00014    version 2 of the License, or (at your option) any later version.
00015 
00016    This library is distributed in the hope that it will be useful,
00017    but WITHOUT ANY WARRANTY; without even the implied warranty of
00018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019    Library General Public License for more details.
00020 
00021    You should have received a copy of the GNU Library General Public License
00022    along with this library; see the file COPYING.LIB.  If not, write to
00023    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00024    Boston, MA 02111-1307, USA.
00025 */
00026 
00027 #ifndef __kspread_dlg_formula__
00028 #define __kspread_dlg_formula__
00029 
00030 #include <qframe.h>
00031 #include <kdialogbase.h>
00032 
00033 #include <kcompletion.h>
00034 
00035 class QTextBrowser;
00036 class QTabWidget;
00037 
00038 class KSpreadView;
00039 class KSpreadSheet;
00040 class KSpreadCell;
00041 class KSpreadFunctionDescription;
00042 class QLineEdit;
00043 class QLabel;
00044 class QListBox;
00045 class QComboBox;
00046 class QPushButton;
00047 class KLineEdit;
00048 
00049 class KSpreadDlgFormula : public KDialogBase
00050 {
00051     Q_OBJECT
00052 public:
00053     KSpreadDlgFormula( KSpreadView* parent, const char* name,const QString& formulaName=0);
00054     ~KSpreadDlgFormula();
00055 private:
00060     QString createParameter( const QString& _text, int param );
00065     QString createFormula();
00066 
00067 private slots:
00071     void slotOk();
00075     void slotClose();
00080     void slotSelected( const QString& function );
00086     void slotShowFunction( const QString& function );
00092     void slotDoubleClicked( QListBoxItem* item );
00096     void slotActivated(const QString& category );
00100     void slotChangeText(const QString& text );
00105     void slotSelectionChanged( KSpreadSheet* _sheet, const QRect& _selection );
00110     void slotSelectButton();
00114     void slotSearchText(const QString& text );
00118     void slotPressReturn();
00119 
00120 public:
00124     bool eventFilter( QObject* obj, QEvent* ev );
00125 protected:
00126        virtual void closeEvent ( QCloseEvent * );
00127 private:
00128     KSpreadView* m_pView;
00129 
00130     QTabWidget* m_tabwidget;
00131     QTextBrowser* m_browser;
00132     QWidget* m_input;
00133 
00134     QPushButton *selectFunction;
00135     QComboBox *typeFunction;
00136     QListBox *functions;
00137     QLineEdit *result;
00138 
00139     KLineEdit *searchFunct;
00140     KCompletion listFunct;
00141 
00142     QLabel* label1;
00143     QLabel* label2;
00144     QLabel* label3;
00145     QLabel* label4;
00146     QLabel* label5;
00147     QLineEdit *firstElement;
00148     QLineEdit *secondElement;
00149     QLineEdit *thirdElement;
00150     QLineEdit *fourElement;
00151     QLineEdit *fiveElement;
00157     QLineEdit* m_focus;
00158 
00159     int m_column;
00160     int m_row;
00161     QString m_oldText;
00162 
00163     QString m_funcName;
00164     QString m_sheetName;
00165 
00166     QString m_rightText;
00167     QString m_leftText;
00171     bool refresh_result;
00172 
00173     KSpreadFunctionDescription* m_desc;
00174 };
00175 
00176 #endif
KDE Logo
This file is part of the documentation for kspread Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:42:54 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003