--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/inputcombo.cpp Thu May 18 23:05:01 2006 +0200
@@ -0,0 +1,64 @@
+#include <qlabel.h>
+#include <qcombobox.h>
+#include <qstring.h>
+#include "inputcombo.h"
+#include <qstringlist.h>
+
+
+InputCombo::InputCombo( QWidget *parent, const char *name )
+ : QHBox( parent, name )
+{
+ labelbox = new QLabel( this );
+ combobox = new QComboBox( this );
+ initWidget();
+}
+
+InputCombo::InputCombo( const QString &mylabel,
+ QWidget *parent, const char *name ) : QHBox( parent, name )
+{
+ labelbox = new QLabel( mylabel, this );
+ combobox = new QComboBox( this );
+ initWidget();
+}
+
+InputCombo::InputCombo( const QString &mylabel, const QStringList &mystrings,
+ QWidget *parent, const char *name ) : QHBox( parent, name )
+{
+ labelbox = new QLabel( mylabel, this );
+ combobox = new QComboBox( this );
+ combobox->insertStringList(mystrings);
+ initWidget();
+}
+
+void InputCombo::initWidget()
+{
+ // Init widget config
+ setStretchFactor( labelbox, 0 );
+ setStretchFactor( combobox, 1 );
+ setSpacing( 10 );
+}
+
+void InputCombo::setLabel(QString &str)
+{
+ labelbox->setText(str);
+}
+
+QString InputCombo::text() const
+{
+ return combobox->currentText();
+}
+
+QString InputCombo::label() const
+{
+ return labelbox->text();
+}
+
+QLabel* InputCombo::qLabel()
+{
+ return labelbox;
+}
+
+QComboBox* InputCombo::qComboBox()
+{
+ return combobox;
+}