summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-03-28 18:34:44 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-18 17:01:41 +0200
commit83653ae3dcd3167db4b992aa37780be90354047e (patch)
tree4816a4b2b82dfb5968a5106218e8b61c3406a1fa /vcl/source
parent5ccbdd25ca9cb6cebf7c6956532cd2022e824641 (diff)
uitest: initial support for spinbuttons in uitesting
Change-Id: I4e62cb65cecdff8ac1a89c3f9c3a14e5206a9115
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/uitest/uiobject.cxx39
1 files changed, 39 insertions, 0 deletions
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 57ef1ec8deac..259cb9f40647 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -14,6 +14,7 @@
#include <vcl/tabpage.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/combobox.hxx>
+#include <vcl/spin.hxx>
#include <rtl/ustrbuf.hxx>
@@ -548,4 +549,42 @@ OUString ComboBoxUIObject::get_name() const
return OUString("ComboBoxUIObject");
}
+SpinUIObject::SpinUIObject(VclPtr<SpinButton> xSpinButton):
+ WindowUIObject(xSpinButton),
+ mxSpinButton(xSpinButton)
+{
+}
+
+void SpinUIObject::execute(const OUString& rAction,
+ const StringMap& rParameters)
+{
+ if (rAction == "UP")
+ {
+ /* code */
+ }
+ else if (rAction == "DOWN")
+ {
+ }
+}
+
+StringMap SpinUIObject::get_state()
+{
+ StringMap aMap = WindowUIObject::get_state();
+ aMap["Min"] = OUString::number(mxSpinButton->GetRangeMin());
+ aMap["Max"] = OUString::number(mxSpinButton->GetRangeMax());
+ aMap["Step"] = OUString::number(mxSpinButton->GetValueStep());
+ aMap["Value"] = OUString::number(mxSpinButton->GetValue());
+
+ return aMap;
+}
+
+UIObjectType SpinUIObject::get_type() const
+{
+ return UIObjectType::SPINBUTTON;
+}
+
+OUString SpinUIObject::get_name() const
+{
+ return OUString("SpinUIObject");
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */