kspread
kspread_dlg_conditional.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __kspread_dlg_conditional__
00024 #define __kspread_dlg_conditional__
00025
00026 #include <kdialogbase.h>
00027 #include <qwidget.h>
00028
00029 #include "kspread_condition.h"
00030
00031 class QComboBox;
00032 class KLineEdit;
00033
00034 namespace KSpread
00035 {
00036 class Style;
00037 class View;
00038
00039 class ConditionalWidget : public QWidget
00040 {
00041 Q_OBJECT
00042
00043 public:
00044 ConditionalWidget( QWidget * parent = 0, const char * name = 0, WFlags fl = 0 );
00045 ~ConditionalWidget();
00046
00047 QComboBox * m_condition_1;
00048 QComboBox * m_style_1;
00049 KLineEdit * m_firstValue_1;
00050 KLineEdit * m_secondValue_1;
00051
00052 QComboBox * m_condition_2;
00053 QComboBox * m_style_2;
00054 KLineEdit * m_firstValue_2;
00055 KLineEdit * m_secondValue_2;
00056
00057 QComboBox * m_condition_3;
00058 QComboBox * m_style_3;
00059 KLineEdit * m_firstValue_3;
00060 KLineEdit * m_secondValue_3;
00061
00062 public slots:
00063 void slotTextChanged1( const QString & );
00064 void slotTextChanged2( const QString & );
00065 void slotTextChanged3( const QString & );
00066 };
00067
00068
00069 class ConditionalDialog : public KDialogBase
00070 {
00071 Q_OBJECT
00072 public:
00073 ConditionalDialog( View * parent, const char * name,
00074 const QRect & marker );
00075
00076 void init();
00077
00078 public slots:
00079 void slotOk();
00080
00081 protected:
00082 View * m_view;
00083 ConditionalWidget * m_dlg;
00084 QRect m_marker;
00085 Conditional::Type m_result;
00086
00087 private:
00088 void init( Conditional const & tmp, int numCondition );
00089 Conditional::Type typeOfCondition( QComboBox const * const cb ) const;
00090
00091 bool checkInputData( KLineEdit const * const edit1,
00092 KLineEdit const * const edit2 );
00093 bool checkInputData();
00094 bool getCondition( Conditional & newCondition, const QComboBox * cb,
00095 const KLineEdit * edit1, const KLineEdit * edit2,
00096 const QComboBox * sb, Style * style );
00097
00098 };
00099
00100 }
00101
00102 #endif
00103
|