Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
83653ae3
Kaydet (Commit)
83653ae3
authored
Mar 28, 2016
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
uitest: initial support for spinbuttons in uitesting
Change-Id: I4e62cb65cecdff8ac1a89c3f9c3a14e5206a9115
üst
5ccbdd25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
0 deletions
+62
-0
uiobject.hxx
include/vcl/uitest/uiobject.hxx
+1
-0
uiobject_impl.hxx
vcl/inc/uitest/uiobject_impl.hxx
+22
-0
uiobject.cxx
vcl/source/uitest/uiobject.cxx
+39
-0
No files found.
include/vcl/uitest/uiobject.hxx
Dosyayı görüntüle @
83653ae3
...
...
@@ -23,6 +23,7 @@ enum class UIObjectType
CHECKBOX
,
LISTBOX
,
COMBOBOX
,
SPINBUTTON
,
TABPAGE
,
UNKNOWN
};
...
...
vcl/inc/uitest/uiobject_impl.hxx
Dosyayı görüntüle @
83653ae3
...
...
@@ -15,6 +15,7 @@
class
TabPage
;
class
ComboBox
;
class
SpinButton
;
class
WindowUIObject
:
public
UIObject
{
...
...
@@ -183,4 +184,25 @@ protected:
virtual
OUString
get_name
()
const
override
;
};
class
SpinUIObject
:
public
WindowUIObject
{
private
:
VclPtr
<
SpinButton
>
mxSpinButton
;
public
:
SpinUIObject
(
VclPtr
<
SpinButton
>
xSpinButton
);
virtual
void
execute
(
const
OUString
&
rAction
,
const
StringMap
&
rParameters
)
override
;
virtual
StringMap
get_state
()
override
;
virtual
UIObjectType
get_type
()
const
override
;
protected
:
virtual
OUString
get_name
()
const
override
;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/source/uitest/uiobject.cxx
Dosyayı görüntüle @
83653ae3
...
...
@@ -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: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment