--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/inputfield.cpp Thu May 18 23:05:01 2006 +0200
@@ -0,0 +1,67 @@
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qstring.h>
+#include "inputfield.h"
+
+
+InputField::InputField( QWidget *parent, const char *name )
+ : QHBox( parent, name )
+{
+ labelbox = new QLabel( this );
+ textbox = new QLineEdit( this );
+ initWidget();
+}
+
+InputField::InputField( const QString &mylabel,
+ QWidget *parent, const char *name ) : QHBox( parent, name )
+{
+ labelbox = new QLabel( mylabel, this );
+ textbox = new QLineEdit( this );
+ initWidget();
+}
+
+InputField::InputField( const QString &mylabel, const QString &mytext,
+ QWidget *parent, const char *name ) : QHBox( parent, name )
+{
+ labelbox = new QLabel( mylabel, this );
+ textbox = new QLineEdit( mytext, this );
+ initWidget();
+}
+
+void InputField::initWidget()
+{
+ // Init widget config
+ setStretchFactor( labelbox, 0 );
+ setStretchFactor( textbox, 1 );
+ setSpacing( 10 );
+}
+
+void InputField::setText(QString &str)
+{
+ textbox->setText(str);
+}
+
+void InputField::setLabel(QString &str)
+{
+ labelbox->setText(str);
+}
+
+QString InputField::text() const
+{
+ return textbox->text();
+}
+
+QString InputField::label() const
+{
+ return labelbox->text();
+}
+
+QLabel* InputField::qLabel()
+{
+ return labelbox;
+}
+
+QLineEdit* InputField::qLineEdit()
+{
+ return textbox;
+}