aboutsummaryrefslogtreecommitdiff
path: root/parrot_zik/indicator/base.py
diff options
context:
space:
mode:
authorm0sia <m0sia@m0sia.ru>2016-02-18 15:04:42 -0600
committerm0sia <m0sia@m0sia.ru>2016-02-18 15:04:42 -0600
commit52c1c1f9d06631b94c3b8ce8eaf816c5a36842b3 (patch)
tree020f823cf692d1ce6898649a15c7633c831dd972 /parrot_zik/indicator/base.py
parentf57d9a8d4ebc30effbec71382cce7e0a37b697e3 (diff)
parent92e47683fc783a2dbd3d9737af40eb0b3372af61 (diff)
downloadpyParrotZikTCP-52c1c1f9d06631b94c3b8ce8eaf816c5a36842b3.tar.xz
pyParrotZikTCP-52c1c1f9d06631b94c3b8ce8eaf816c5a36842b3.zip
Merge pull request #12 from serathius/master
Rework and Zik 2.0 implementation.
Diffstat (limited to '')
-rw-r--r--parrot_zik/indicator/base.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/parrot_zik/indicator/base.py b/parrot_zik/indicator/base.py
new file mode 100644
index 0000000..b29368e
--- /dev/null
+++ b/parrot_zik/indicator/base.py
@@ -0,0 +1,48 @@
+class BaseIndicator(object):
+ def __init__(self, icon, menu, statusicon):
+ self.menu = menu
+ self.statusicon = statusicon
+ self.setIcon(icon)
+
+ def setIcon(self, name):
+ raise NotImplementedError
+
+ @classmethod
+ def main(cls):
+ raise NotImplementedError
+
+ def show_about_dialog(self, widget):
+ raise NotImplementedError
+
+ def quit(self, _):
+ raise NotImplementedError
+
+class MenuItemBase(object):
+ def __init__(self, base_item, sensitive, visible):
+ self.base_item = base_item
+ self.set_sensitive(sensitive)
+ if visible:
+ self.show()
+ else:
+ self.hide()
+
+ def set_sensitive(self, option):
+ raise NotImplementedError
+
+ def set_active(self, option):
+ raise NotImplementedError
+
+ def get_active(self):
+ raise NotImplementedError
+
+ def set_label(self, option):
+ raise NotImplementedError
+
+ def show(self):
+ self.base_item.show()
+
+ def hide(self):
+ self.base_item.hide()
+
+ def set_submenu(self, menu):
+ raise NotImplementedError