kspread
kspread_dlg_goalseek.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 #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 QFrame;
00034 class QGridLayout;
00035 class QHBoxLayout;
00036 class QLabel;
00037 class QLineEdit;
00038 class QPushButton;
00039 class QVBoxLayout;
00040
00041 namespace KSpread
00042 {
00043 class Cell;
00044 class Point;
00045 class Sheet;
00046 class View;
00047
00048 class GoalSeekDialog : public KDialog
00049 {
00050 Q_OBJECT
00051
00052 public:
00053 GoalSeekDialog( View * parent, QPoint const & marker, const char * name = 0,
00054 bool modal = FALSE, WFlags fl = 0 );
00055 ~GoalSeekDialog();
00056
00060 bool eventFilter( QObject* obj, QEvent* ev );
00061
00062 public slots:
00063 void buttonOkClicked();
00064 void buttonCancelClicked();
00065 void slotSelectionChanged();
00066
00067 protected:
00068 virtual void closeEvent ( QCloseEvent * );
00069
00070 QGridLayout * GoalSeekDialogLayout;
00071 QGridLayout * m_startFrameLayout;
00072 QGridLayout * m_resultFrameLayout;
00073
00074 private:
00075 View * m_pView;
00076 Cell * m_sourceCell;
00077 Cell * m_targetCell;
00078 double m_result;
00079 int m_maxIter;
00080 bool m_restored;
00081 double m_oldSource;
00082
00083 QString m_oldText;
00084 QString m_sheetName;
00085
00086 QFrame * m_startFrame;
00087 QLineEdit * m_targetValueEdit;
00088 QLineEdit * m_targetEdit;
00089 QLineEdit * m_sourceEdit;
00090 QPushButton * m_buttonOk;
00091 QPushButton * m_buttonCancel;
00092 QFrame * m_resultFrame;
00093 QLabel * m_newValueDesc;
00094 QLabel * m_currentValueLabel;
00095 QLabel * m_newValue;
00096 QLabel * m_currentValue;
00097 QLabel * m_resultText;
00098
00104 QLineEdit * m_focus;
00105
00106 QPoint m_anchor;
00107 QPoint m_marker;
00108 QRect m_selection;
00109
00110 void startCalc(double _start, double _goal);
00111 void chooseCleanup();
00112 };
00113
00114 }
00115
00116 #endif
|