aboutsummaryrefslogtreecommitdiff
path: root/parrot_zik/indicator/base.py
diff options
context:
space:
mode:
authorMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-15 13:20:28 +0200
committerMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-15 13:20:28 +0200
commitdf5aa3102f9d0257224ee9423afdfd42f00592ac (patch)
tree7c2ca93154b9c18f37cb2b700dd30585751fece1 /parrot_zik/indicator/base.py
parent65f9c06e00c78c382451458ea1d8a9dad1016fb0 (diff)
downloadpyParrotZikTCP-df5aa3102f9d0257224ee9423afdfd42f00592ac.tar.xz
pyParrotZikTCP-df5aa3102f9d0257224ee9423afdfd42f00592ac.zip
Refactor. Move.
Diffstat (limited to 'parrot_zik/indicator/base.py')
-rw-r--r--parrot_zik/indicator/base.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/parrot_zik/indicator/base.py b/parrot_zik/indicator/base.py
new file mode 100644
index 0000000..7101790
--- /dev/null
+++ b/parrot_zik/indicator/base.py
@@ -0,0 +1,44 @@
+class BaseIndicator(object):
+ def __init__(self, icon, menu, statusicon):
+ self.menu = menu
+ self.statusicon = statusicon
+ self.setIcon(icon)
+
+ def setIcon(self, name):
+ raise NotImplementedError
+
+ def main(self):
+ raise NotImplementedError
+
+ def show_about_dialog(self, widget):
+ 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