kdeui Library API Documentation

kinputdialog.h

00001 /*
00002   Copyright (C) 2003 Nadeem Hasan <nhasan@kde.org>
00003 
00004   This library is free software; you can redistribute it and/or
00005   modify it under the terms of the GNU Library General Public
00006   License as published by the Free Software Foundation; either
00007   version 2 of the License, or (at your option) any later version.
00008 
00009   This library is distributed in the hope that it will be useful,
00010   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012   Library General Public License for more details.
00013 
00014   You should have received a copy of the GNU Library General Public License
00015   along with this library; see the file COPYING.LIB.  If not, write to
00016   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017   Boston, MA 02111-1307, USA.
00018 */
00019 
00020 #ifndef KINPUTDIALOG_H
00021 #define KINPUTDIALOG_H
00022 
00023 class QValidator;
00024 
00025 class KLineEdit;
00026 class KIntSpinBox;
00027 class KDoubleSpinBox;
00028 class KComboBox;
00029 class KInputDialogPrivate;
00030 
00031 #include <kdialogbase.h>
00032 
00045 class KInputDialog : public KDialogBase
00046 {
00047   Q_OBJECT
00048 
00049   private:
00050 
00055     KInputDialog( const QString &caption, const QString &label,
00056       const QString &value, QWidget *parent, const char *name,
00057       QValidator *validator, const QString &mask );
00058     KInputDialog( const QString &caption, const QString &label, int value,
00059       int minValue, int maxValue, int step, int base, QWidget *parent,
00060       const char *name );
00061     KInputDialog( const QString &caption, const QString &label, double value,
00062       double minValue, double maxValue, double step, int decimals,
00063       QWidget *parent, const char *name );
00064     KInputDialog( const QString &caption, const QString &label,
00065       const QStringList &list, int current, bool editable, QWidget *parent,
00066       const char *name );
00067     KInputDialog( const QString &caption, const QString &label,
00068       const QStringList &list, const QStringList &select, bool editable,
00069       QWidget *parent, const char *name );
00070 
00071     ~KInputDialog();
00072 
00073     KLineEdit *lineEdit() const;
00074     KIntSpinBox *intSpinBox() const;
00075     KDoubleSpinBox *doubleSpinBox() const;
00076     KComboBox *comboBox() const;
00077     KListBox *listBox() const;
00078 
00079   private slots:
00080 
00081     void slotEditTextChanged( const QString& );
00082     void slotUpdateButtons( const QString& );
00083 
00084   public:
00085 
00114     static QString getText( const QString &caption, const QString &label,
00115         const QString &value=QString::null, bool *ok=0, QWidget *parent=0,
00116         const char *name=0, QValidator *validator=0,
00117         const QString &mask=QString::null );
00118 
00143     static int getInteger( const QString &caption, const QString &label,
00144         int value=0, int minValue=-2147483647, int maxValue=2147483647,
00145         int step=1, int base=10, bool *ok=0, QWidget *parent=0,
00146         const char *name=0 );
00147 
00152     static int getInteger( const QString &caption, const QString &label,
00153         int value=0, int minValue=-2147483647, int maxValue=2147483647,
00154         int step=1, bool *ok=0, QWidget *parent=0, const char *name=0 );
00155 
00179     static double getDouble( const QString &caption, const QString &label,
00180         double value=0, double minValue=-2147483647, 
00181         double maxValue=2147483647, double step=0.1, int decimals=1,
00182         bool *ok=0, QWidget *parent=0, const char *name=0 );
00183 
00188     static double getDouble( const QString &caption, const QString &label,
00189         double value=0, double minValue=-2147483647, 
00190         double maxValue=2147483647, int decimals=1, bool *ok=0,
00191         QWidget *parent=0, const char *name=0 );
00192 
00213     static QString getItem( const QString &caption, const QString &label,
00214         const QStringList &list, int current=0, bool editable=false,
00215         bool *ok=0, QWidget *parent=0, const char *name=0 );
00216 
00237     static QStringList getItemList( const QString &caption,
00238         const QString &label, const QStringList &list=QStringList(),
00239         const QStringList &select=QStringList(), bool multiple=false,
00240         bool *ok=0, QWidget *parent=0, const char *name=0 );
00241 
00242   private:
00243 
00244     KInputDialogPrivate *d;
00245     friend class KInputDialogPrivate;
00246 };
00247 
00248 #endif // KINPUTDIALOG_H
00249 
00250 /* vim: set ai et sw=2 ts=2
00251 */
KDE Logo
This file is part of the documentation for kdeui Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Jan 21 09:57:27 2005 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003