kinputdialog.h
/*
Copyright (C) 2003 Nadeem Hasan <nhasan@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KINPUTDIALOG_H
#define KINPUTDIALOG_H
class QValidator;
class KLineEdit;
class KIntSpinBox;
class KDoubleSpinBox;
class KComboBox;
class KTextEdit;
class KInputDialogPrivate;
#include <kdialogbase.h>
class KDEUI_EXPORT KInputDialog : public KDialogBase
{
Q_OBJECT
private:
KInputDialog( const QString &caption, const QString &label,
const QString &value, QWidget *parent, const char *name,
QValidator *validator, const QString &mask );
KInputDialog( const QString &caption, const QString &label,
const QString &value, QWidget *parent, const char *name );
KInputDialog( const QString &caption, const QString &label, int value,
int minValue, int maxValue, int step, int base, QWidget *parent,
const char *name );
KInputDialog( const QString &caption, const QString &label, double value,
double minValue, double maxValue, double step, int decimals,
QWidget *parent, const char *name );
KInputDialog( const QString &caption, const QString &label,
const QStringList &list, int current, bool editable, QWidget *parent,
const char *name );
KInputDialog( const QString &caption, const QString &label,
const QStringList &list, const QStringList &select, bool editable,
QWidget *parent, const char *name );
~KInputDialog();
KLineEdit *lineEdit() const;
KIntSpinBox *intSpinBox() const;
KDoubleSpinBox *doubleSpinBox() const;
KComboBox *comboBox() const;
KListBox *listBox() const;
KTextEdit *textEdit() const;
private slots:
void slotEditTextChanged( const QString& );
void slotUpdateButtons( const QString& );
public:
static QString getText( const QString &caption, const QString &label,
const QString &value=QString::null, bool *ok=0, QWidget *parent=0,
const char *name=0, QValidator *validator=0,
const QString &mask=QString::null );
static QString text( const QString &caption, const QString &label,
const QString &value=QString::null, bool *ok=0, QWidget *parent=0,
const char *name=0, QValidator *validator=0,
const QString &mask=QString::null,
const QString& whatsThis=QString::null );
static QString getMultiLineText( const QString &caption,
const QString &label, const QString &value=QString::null,
bool *ok=0, QWidget *parent=0, const char *name=0 );
static int getInteger( const QString &caption, const QString &label,
int value=0, int minValue=-2147483647, int maxValue=2147483647,
int step=1, int base=10, bool *ok=0, QWidget *parent=0,
const char *name=0 );
static int getInteger( const QString &caption, const QString &label,
int value=0, int minValue=-2147483647, int maxValue=2147483647,
int step=1, bool *ok=0, QWidget *parent=0, const char *name=0 );
static double getDouble( const QString &caption, const QString &label,
double value=0, double minValue=-2147483647,
double maxValue=2147483647, double step=0.1, int decimals=1,
bool *ok=0, QWidget *parent=0, const char *name=0 );
static double getDouble( const QString &caption, const QString &label,
double value=0, double minValue=-2147483647,
double maxValue=2147483647, int decimals=1, bool *ok=0,
QWidget *parent=0, const char *name=0 );
static QString getItem( const QString &caption, const QString &label,
const QStringList &list, int current=0, bool editable=false,
bool *ok=0, QWidget *parent=0, const char *name=0 );
static QStringList getItemList( const QString &caption,
const QString &label, const QStringList &list=QStringList(),
const QStringList &select=QStringList(), bool multiple=false,
bool *ok=0, QWidget *parent=0, const char *name=0 );
private:
KInputDialogPrivate* const d;
friend class KInputDialogPrivate;
};
#endif // KINPUTDIALOG_H
/* vim: set ai et sw=2 ts=2
*/
KDoubleSpinBox
A spin box for fractional numbers.
Definition: knuminput.h:834
KDialogBase
A dialog base class with standard buttons and predefined layouts.
Definition: kdialogbase.h:191
KLineEdit
An enhanced QLineEdit widget for inputting text.
Definition: klineedit.h:145
KIntSpinBox
A QSpinBox with support for arbitrary base numbers.
Definition: knuminput.h:704
KComboBox
An enhanced combo box.
Definition: kcombobox.h:144
KInputDialog
The KInputDialog class provides a simple dialog to get a single value from the user.
Definition: kinputdialog.h:46
KListBox
A variant of QListBox that honors KDE's system-wide settings.
Definition: klistbox.h:40
KTextEdit
A KDE'ified QTextEdit.
Definition: ktextedit.h:43

KDE Home | KDE Accessibility Home | Description of Access Keys