kspread_dlg_goalseek.h
00001
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 #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
This file is part of the documentation for kspread Library Version 1.4.2.