aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary/test_flipselector.py
diff options
context:
space:
mode:
authorDavide Andreoli <dave@gurumeditation.it>2013-03-01 21:01:50 +0000
committerDavide Andreoli <dave@gurumeditation.it>2013-03-01 21:01:50 +0000
commit0873fe162131bf672245e51d2670fc1ce822cfdd (patch)
tree4fa8667a51105ad846560dafe7e8fe64d935e616 /examples/elementary/test_flipselector.py
parentpython-efl: Skip build related code in setup.py when only generating (diff)
downloadpython-efl-0873fe162131bf672245e51d2670fc1ce822cfdd.tar.gz
Do not import EVERY widget while importing efl.elementary
Now the user is responsable of importing the widget used one by one, this should be a great speedup in the launch of the app. You have to import stuff in this way: from efl import evas from efl import elementary from efl.elementary.window import Window from efl.elementary.layout import Layout ...sorry for the inconvenience SVN revision: 84402
Diffstat (limited to 'examples/elementary/test_flipselector.py')
-rw-r--r--examples/elementary/test_flipselector.py30
1 files changed, 18 insertions, 12 deletions
diff --git a/examples/elementary/test_flipselector.py b/examples/elementary/test_flipselector.py
index 6fdec19..f2fcaeb 100644
--- a/examples/elementary/test_flipselector.py
+++ b/examples/elementary/test_flipselector.py
@@ -1,8 +1,14 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import StandardWindow
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.slider import Slider
+from efl.elementary.flipselector import FlipSelector
def sel_cb(fp, *args):
@@ -45,15 +51,15 @@ def flipselector_clicked(obj):
"Edbus"
)
- win = elementary.StandardWindow("flipselector", "Flip Selector")
+ win = StandardWindow("flipselector", "Flip Selector")
win.autodel = True
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(bx)
bx.show()
- fp = elementary.FlipSelector(win)
+ fp = FlipSelector(win)
fp.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
fp.callback_selected_add(sel_cb)
fp.callback_underflowed_add(overflow_cb)
@@ -66,20 +72,20 @@ def flipselector_clicked(obj):
bx.pack_end(fp)
fp.show()
- bx2 = elementary.Box(win)
+ bx2 = Box(win)
bx2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx2.horizontal = True
bx.pack_end(bx2)
bx2.show()
- fp = elementary.FlipSelector(win)
+ fp = FlipSelector(win)
fp.callback_underflowed_add(overflow_cb)
fp.callback_overflowed_add(underflow_cb)
fp.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
for i in range(1990, 2100):
fp.item_append(str(i), sel_cb)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Flip Prev"
bt.callback_clicked_add(flip_prev_cb, fp)
@@ -89,13 +95,13 @@ def flipselector_clicked(obj):
bx2.pack_end(fp)
fp.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Flip Next"
bt.callback_clicked_add(flip_next_cb, fp)
bx2.pack_end(bt)
bt.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "Flip Iterval:"
sl.unit_format = "%1.2f"
sl.min_max = (0.0, 3.0)
@@ -106,19 +112,19 @@ def flipselector_clicked(obj):
sl.show()
sl.callback_changed_add(slider_change_cb, fp)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Select Last"
bt.callback_clicked_add(last_cb, fp)
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Select 2097"
bt.callback_clicked_add(third_from_end_cb, fp)
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Unselect year"
bt.callback_clicked_add(unsel_cb, fp)
bx.pack_end(bt)