Initial from sourceforge's cvs.
#ifndef INPUTFIELD_H
#define INPUTFIELD_H
#include <qhbox.h>
class QString;
class QLabel;
class QLineEdit;
/*!
* A class for making input fields of type "Label: Textbox"
*/
class InputField : public QHBox
{
Q_OBJECT
private:
QLabel *labelbox;
QLineEdit *textbox;
void initWidget();
public slots:
/*!
* Sets the contents of the textbox
*/
void setText(QString &str);
/*!
* Sets the label of the input field
*/
void setLabel(QString &str);
public:
/*!
* Constructs an InputField with no label or textbox content
*/
InputField(QWidget *parent=0, const char *name=0);
/*!
* Constructs an InputField with label \param mylabel and
* void textbox
* \param mylabel Label of the InputField
*/
InputField(const QString &mylabel, QWidget *parent=0,
const char *name=0);
/*!
* Constructs an InputField with label \param mylabel and
* a textbox with content
* \param mylabel Label of the InputField
* \param mytext Initial content of the textbox
*/
InputField(const QString &mylabel, const QString &mytext,
QWidget *parent=0, const char *name=0);
/*!
* Returns the contents of the textbox
*/
QString text() const;
/*!
* Returns the label of the input field
*/
QString label() const;
/*!
* Returns the QLabel
*/
QLabel* qLabel();
/*!
* Returns the QLineEdit
*/
QLineEdit* qLineEdit();
};
#endif // INPUTFIELD_H