kspread Library API Documentation

kspread_dlg_goalseek.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002-2003 Norbert Andres <nandres@web.de>
00003              (C) 2002-2003 Philipp Mueller <philipp.mueller@gmx.de>
00004              (C) 2002 Laurent Montel <montel@kde.org>
00005              (C) 2002 John Dailey <dailey@vt.edu>
00006              (C) 2002 Ariya Hidayat <ariya@kde.org>
00007              (C) 2002 Werner Trobin <trobin@kde.org>
00008              (C) 2002 Harri Porten <porten@kde.org>
00009 
00010    This library is free software; you can redistribute it and/or
00011    modify it under the terms of the GNU Library General Public
00012    License as published by the Free Software Foundation; either
00013    version 2 of the License, or (at your option) any later version.
00014 
00015    This library is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018    Library General Public License for more details.
00019 
00020    You should have received a copy of the GNU Library General Public License
00021    along with this library; see the file COPYING.LIB.  If not, write to
00022    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00023    Boston, MA 02111-1307, USA.
00024 */
00025 
00026 #ifndef __kspread_dlg_goalseek__
00027 #define __kspread_dlg_goalseek__
00028 
00029 #include <kdialog.h>
00030 #include <qpoint.h>
00031 #include <qrect.h>
00032 
00033 class KSpreadCell;
00034 class KSpreadPoint;
00035 class KSpreadSheet;
00036 class KSpreadView;
00037 
00038 class QFrame;
00039 class QGridLayout;
00040 class QHBoxLayout;
00041 class QLabel;
00042 class QLineEdit;
00043 class QPushButton;
00044 class QVBoxLayout;
00045 
00046 class KSpreadGoalSeekDlg : public KDialog
00047 {
00048   Q_OBJECT
00049 
00050  public:
00051   KSpreadGoalSeekDlg( KSpreadView * parent, QPoint const & marker, const char * name = 0,
00052                       bool modal = FALSE, WFlags fl = 0 );
00053   ~KSpreadGoalSeekDlg();
00054 
00058   bool eventFilter( QObject* obj, QEvent* ev );
00059 
00060  public slots:
00061   void buttonOkClicked();
00062   void buttonCancelClicked();
00063   void slotSelectionChanged( KSpreadSheet * _sheet, const QRect & _selection );
00064 
00065  protected:
00066   virtual void closeEvent ( QCloseEvent * );
00067 
00068   QGridLayout * KSpreadGoalSeekDlgLayout;
00069   QGridLayout * m_startFrameLayout;
00070   QGridLayout * m_resultFrameLayout;
00071 
00072  private:
00073   KSpreadView * m_pView;
00074   KSpreadCell * m_sourceCell;
00075   KSpreadCell * m_targetCell;
00076   double        m_result;
00077   int           m_maxIter;
00078   bool          m_restored;
00079   double        m_oldSource;
00080 
00081   QString       m_oldText;
00082   QString       m_sheetName;
00083 
00084   QFrame      * m_startFrame;
00085   QLineEdit   * m_targetValueEdit;
00086   QLineEdit   * m_targetEdit;
00087   QLineEdit   * m_sourceEdit;
00088   QPushButton * m_buttonOk;
00089   QPushButton * m_buttonCancel;
00090   QFrame      * m_resultFrame;
00091   QLabel      * m_newValueDesc;
00092   QLabel      * m_currentValueLabel;
00093   QLabel      * m_newValue;
00094   QLabel      * m_currentValue;
00095   QLabel      * m_resultText;
00096 
00102   QLineEdit   * m_focus;
00103 
00104   QPoint        m_anchor;
00105   QPoint        m_marker;
00106   QRect         m_selection;
00107 
00108   void startCalc(double _start, double _goal);
00109   void chooseCleanup();
00110 };
00111 
00112 #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