summaryrefslogtreecommitdiff
path: root/client/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets')
-rw-r--r--client/widgets/altcombobox.cc6
-rw-r--r--client/widgets/altcombobox.h3
-rw-r--r--client/widgets/button.h1
-rw-r--r--client/widgets/checkbox.h1
-rw-r--r--client/widgets/checkgroupbox.h1
-rw-r--r--client/widgets/combobox.cc13
-rw-r--r--client/widgets/combobox.h1
-rw-r--r--client/widgets/datetime.h1
-rw-r--r--client/widgets/groupbox.h1
-rw-r--r--client/widgets/label.h1
-rw-r--r--client/widgets/lineedit.h1
-rw-r--r--client/widgets/listbox.h1
-rw-r--r--client/widgets/metawidget.h1
-rw-r--r--client/widgets/multilist.h1
-rw-r--r--client/widgets/radiobuttons.h1
-rw-r--r--client/widgets/textedit.h1
-rw-r--r--client/widgets/widget.h1
-rw-r--r--client/widgets/window.h1
18 files changed, 37 insertions, 0 deletions
diff --git a/client/widgets/altcombobox.cc b/client/widgets/altcombobox.cc
index 9956fff..082601a 100644
--- a/client/widgets/altcombobox.cc
+++ b/client/widgets/altcombobox.cc
@@ -107,6 +107,12 @@ AltComboBox::~AltComboBox()
{
}
+bool AltComboBox::setKeyboardFocus()
+{
+ combobox->setFocus();
+ return true;
+}
+
QComboBox *AltComboBox::qcombobox()
{
return combobox;
diff --git a/client/widgets/altcombobox.h b/client/widgets/altcombobox.h
index e6a21d7..73dee10 100644
--- a/client/widgets/altcombobox.h
+++ b/client/widgets/altcombobox.h
@@ -43,6 +43,7 @@
/***
* ComboBox Widget with Alternate Value
* @tag altcombobox
+ * @clientside
* @extends combobox
* @screenshot Example: altitem selected.
* <altcombobox name="ex" layout="vbox" value="altitem" type="select">
@@ -94,6 +95,8 @@ public:
QComboBox *qcombobox();
+ bool setKeyboardFocus();
+
public slots:
void comboChanged();
void onChildChange();
diff --git a/client/widgets/button.h b/client/widgets/button.h
index 0bd7db9..d9053a6 100644
--- a/client/widgets/button.h
+++ b/client/widgets/button.h
@@ -34,6 +34,7 @@
/***
* PushButton Widget
* @tag button
+ * @clientside
* @screenshot Example button
* <button caption="Click me"/>
* @screenshot Example cancel button
diff --git a/client/widgets/checkbox.h b/client/widgets/checkbox.h
index ce31a62..5fef7cb 100644
--- a/client/widgets/checkbox.h
+++ b/client/widgets/checkbox.h
@@ -38,6 +38,7 @@
/***
* CheckBox Widget
* @tag checkbox
+ * @clientside
* @screenshot An example checkbox
* <checkbox name="example" truevalue="true" falsevalue="false" value="true"
* caption="A simple checkbox"/>
diff --git a/client/widgets/checkgroupbox.h b/client/widgets/checkgroupbox.h
index 5dfa7fb..96056a4 100644
--- a/client/widgets/checkgroupbox.h
+++ b/client/widgets/checkgroupbox.h
@@ -41,6 +41,7 @@
/***
* Checkable GroupBox Widget
* @tag checkgroupbox
+ * @clientside
* @extends checkbox
* @screenshot Example 1: type="framed"
* <checkgroupbox name="example" caption="Example" type="framed" layout="vbox"
diff --git a/client/widgets/combobox.cc b/client/widgets/combobox.cc
index eed2d10..935f620 100644
--- a/client/widgets/combobox.cc
+++ b/client/widgets/combobox.cc
@@ -93,6 +93,8 @@ ComboBox::ComboBox(QDomNode &node, MacroWindow *macrowindow)
// Make empty default selection.
combobox->setCurrentIndex(-1);
+ combobox->installEventFilter(this);
+
QDomElement elem = node.toElement();
combotype = SELECT;
@@ -213,15 +215,26 @@ void ComboBox::changed()
emit eventOnChange();
}
+#include <QKeyEvent>
bool ComboBox::eventFilter(QObject *obj, QEvent *event)
{
if(ignoreChangeEvents == true) return false;
+
if(combotype == SELECT) {
if(event->type() == QEvent::MouseButtonRelease) {
if(enabled()) combobox->showPopup();
}
}
+ if(event->type() == QEvent::KeyPress) {
+ QKeyEvent *ke = (QKeyEvent*)event;
+ // printf("KEY: %d\n", ke->key());
+ // if(ke->key() == Qt::Key_Up || ke->key() == Qt::Key_Down) {
+ if(ke->key() == Qt::Key_Space) {
+ if(enabled()) combobox->showPopup();
+ }
+ }
+
return QObject::eventFilter(obj, event);
}
diff --git a/client/widgets/combobox.h b/client/widgets/combobox.h
index bf61b1a..448a0ff 100644
--- a/client/widgets/combobox.h
+++ b/client/widgets/combobox.h
@@ -40,6 +40,7 @@
/***
* ComboBox Widget
* @tag combobox
+ * @clientside
* @screenshot Example
* <combobox name="ex" layout="vbox" value="item" type="select">
* <item caption="Item" value="item"/>
diff --git a/client/widgets/datetime.h b/client/widgets/datetime.h
index 84df018..a36d87b 100644
--- a/client/widgets/datetime.h
+++ b/client/widgets/datetime.h
@@ -35,6 +35,7 @@
/***
* Date and Time Widget
* @tag datetime
+ * @clientside
* @screenshot Example with fuzziness="1" and value="1234567890"
* <datetime name="x" fuzziness="1" value="1234567890"/>
* @screenshot Example with fuzziness="7" and value="1234567890"
diff --git a/client/widgets/groupbox.h b/client/widgets/groupbox.h
index 58e52bb..9198a5a 100644
--- a/client/widgets/groupbox.h
+++ b/client/widgets/groupbox.h
@@ -37,6 +37,7 @@
/***
* Layout or Frame Widget
* @tag frame
+ * @clientside
* @screenshot Example with caption.
* <frame caption="Caption" layout="vbox">
* <label caption="Label"/>
diff --git a/client/widgets/label.h b/client/widgets/label.h
index b303d0d..eae97b8 100644
--- a/client/widgets/label.h
+++ b/client/widgets/label.h
@@ -34,6 +34,7 @@
/***
* Label Widget
* @tag label
+ * @clientside
* @screenshot Example
* <label width="300" caption="A nice label with a caption"/>
* @extends widget
diff --git a/client/widgets/lineedit.h b/client/widgets/lineedit.h
index 08230a6..d482c15 100644
--- a/client/widgets/lineedit.h
+++ b/client/widgets/lineedit.h
@@ -39,6 +39,7 @@
/***
* Line Edit Widget
* @tag lineedit
+ * @clientside
* @screenshot Example
* <lineedit name="myname" value="some text"/>
* @extends widget
diff --git a/client/widgets/listbox.h b/client/widgets/listbox.h
index 82c5dfc..f9d967a 100644
--- a/client/widgets/listbox.h
+++ b/client/widgets/listbox.h
@@ -38,6 +38,7 @@
/***
* ListBox Widget
+ * @clientside
* @tag listbox
* @screenshot Example
* <listbox name="x" value="item1">
diff --git a/client/widgets/metawidget.h b/client/widgets/metawidget.h
index c6bf5d0..c6a7224 100644
--- a/client/widgets/metawidget.h
+++ b/client/widgets/metawidget.h
@@ -36,6 +36,7 @@
/***
* Meta Widget
+ * @clientside
* @extends widget
* @tag metawidget
* @screenshot An example of a metawidget with two inner widgets. The metawidget is not in itself visible.
diff --git a/client/widgets/multilist.h b/client/widgets/multilist.h
index f7da8fa..a7c5332 100644
--- a/client/widgets/multilist.h
+++ b/client/widgets/multilist.h
@@ -37,6 +37,7 @@
/***
* Multi List Widget
* @tag multilist
+ * @clientside
* @container
* @screenshot Example of multilist containing a metawidget.
* <multilist name="x" layout="vbox" innerwidget="in" value="Abc: Def
diff --git a/client/widgets/radiobuttons.h b/client/widgets/radiobuttons.h
index 4b9ce67..e09d4e8 100644
--- a/client/widgets/radiobuttons.h
+++ b/client/widgets/radiobuttons.h
@@ -35,6 +35,7 @@
/***
* Radio Button Group Widget
* @tag radiobuttons
+ * @clientside
* @extends widget
* @screenshot Example with four radiobuttons
* <radiobuttons name="x" value="item2">
diff --git a/client/widgets/textedit.h b/client/widgets/textedit.h
index 542dd6f..fbbb040 100644
--- a/client/widgets/textedit.h
+++ b/client/widgets/textedit.h
@@ -35,6 +35,7 @@
/***
* Multiline Text Edit Widget
* @tag textedit
+ * @clientside
* @screenshot Example of a textedit.
* <textedit name="x" value="This is a multiline textfield.
* It may contain all text in the universe, it will simply add a scrollbar."/>
diff --git a/client/widgets/widget.h b/client/widgets/widget.h
index 6199aa4..f2bf278 100644
--- a/client/widgets/widget.h
+++ b/client/widgets/widget.h
@@ -44,6 +44,7 @@
/***
* Virtual Base Widget
* This tag is purely virtual. It is inherited by all other widgets.
+ * @clientside
* @att name The name of the widget. This is also the name used by the scripts.
* @att value The initial value of the widget. It is overwritten if there is a
* map with a recent value or if the database contains a recent value.
diff --git a/client/widgets/window.h b/client/widgets/window.h
index ea3af0a..8fb5c59 100644
--- a/client/widgets/window.h
+++ b/client/widgets/window.h
@@ -34,6 +34,7 @@
* Widgets Outer Container
* @tag widgets
* @container
+ * @clientside
* This is the outer tag of the macro widgets.
* @att caption This is the name that will be shown in the macro.
* @att layout this is the layout that is used by the macro. It can be one of