00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KINPUTDIALOG_H
00021 #define KINPUTDIALOG_H
00022
00023
00024
00025 #include <kdialogbase.h>
00026
00027 class TQValidator;
00028
00029 class KLineEdit;
00030 class KIntSpinBox;
00031 class KDoubleSpinBox;
00032 class KComboBox;
00033 class KTextEdit;
00034 class KInputDialogPrivate;
00035
00048 class TDEUI_EXPORT KInputDialog : public KDialogBase
00049 {
00050 Q_OBJECT
00051
00052 private:
00053
00058 KInputDialog( const TQString &caption, const TQString &label,
00059 const TQString &value, TQWidget *parent, const char *name,
00060 TQValidator *validator, const TQString &mask );
00061 KInputDialog( const TQString &caption, const TQString &label,
00062 const TQString &value, TQWidget *parent, const char *name );
00063 KInputDialog( const TQString &caption, const TQString &label, int value,
00064 int minValue, int maxValue, int step, int base, TQWidget *parent,
00065 const char *name );
00066 KInputDialog( const TQString &caption, const TQString &label, double value,
00067 double minValue, double maxValue, double step, int decimals,
00068 TQWidget *parent, const char *name );
00069 KInputDialog( const TQString &caption, const TQString &label,
00070 const TQStringList &list, int current, bool editable, TQWidget *parent,
00071 const char *name );
00072 KInputDialog( const TQString &caption, const TQString &label,
00073 const TQStringList &list, const TQStringList &select, bool editable,
00074 TQWidget *parent, const char *name );
00075
00076 ~KInputDialog();
00077
00078 KLineEdit *lineEdit() const;
00079 KIntSpinBox *intSpinBox() const;
00080 KDoubleSpinBox *doubleSpinBox() const;
00081 KComboBox *comboBox() const;
00082 TDEListBox *listBox() const;
00083 KTextEdit *textEdit() const;
00084
00085 private slots:
00086
00087 void slotEditTextChanged( const TQString& );
00088 void slotUpdateButtons( const TQString& );
00089
00090 public:
00091
00119 static TQString getText( const TQString &caption, const TQString &label,
00120 const TQString &value=TQString::null, bool *ok=0, TQWidget *parent=0,
00121 const char *name=0, TQValidator *validator=0,
00122 const TQString &mask=TQString::null );
00123
00132 static TQString text( const TQString &caption, const TQString &label,
00133 const TQString &value=TQString::null, bool *ok=0, TQWidget *parent=0,
00134 const char *name=0, TQValidator *validator=0,
00135 const TQString &mask=TQString::null,
00136 const TQString& whatsThis=TQString::null );
00137
00156 static TQString getMultiLineText( const TQString &caption,
00157 const TQString &label, const TQString &value=TQString::null,
00158 bool *ok=0, TQWidget *parent=0, const char *name=0 );
00159
00184 static int getInteger( const TQString &caption, const TQString &label,
00185 int value=0, int minValue=-2147483647, int maxValue=2147483647,
00186 int step=1, int base=10, bool *ok=0, TQWidget *parent=0,
00187 const char *name=0 );
00188
00193 static int getInteger( const TQString &caption, const TQString &label,
00194 int value=0, int minValue=-2147483647, int maxValue=2147483647,
00195 int step=1, bool *ok=0, TQWidget *parent=0, const char *name=0 );
00196
00220 static double getDouble( const TQString &caption, const TQString &label,
00221 double value=0, double minValue=-2147483647,
00222 double maxValue=2147483647, double step=0.1, int decimals=1,
00223 bool *ok=0, TQWidget *parent=0, const char *name=0 );
00224
00229 static double getDouble( const TQString &caption, const TQString &label,
00230 double value=0, double minValue=-2147483647,
00231 double maxValue=2147483647, int decimals=1, bool *ok=0,
00232 TQWidget *parent=0, const char *name=0 );
00233
00254 static TQString getItem( const TQString &caption, const TQString &label,
00255 const TQStringList &list, int current=0, bool editable=false,
00256 bool *ok=0, TQWidget *parent=0, const char *name=0 );
00257
00278 static TQStringList getItemList( const TQString &caption,
00279 const TQString &label, const TQStringList &list=TQStringList(),
00280 const TQStringList &select=TQStringList(), bool multiple=false,
00281 bool *ok=0, TQWidget *parent=0, const char *name=0 );
00282
00283 private:
00284
00285 KInputDialogPrivate* const d;
00286 friend class KInputDialogPrivate;
00287 };
00288
00289 #endif // KINPUTDIALOG_H
00290
00291
00292