From c729d6573d3a050cc01734f6c4cc6e29fa60bc25 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Thu, 3 Oct 2013 03:56:01 +0400 Subject: [PATCH] Added todo (wish) list --- TODO | 14 +++++++++++ sources/contents/code/ptmnotify.py | 20 ++++++++++++++++ sources/contents/code/reinit.py | 16 ++----------- sources/contents/code/tooltip.py | 12 ---------- sources/contents/ui/configwindow.ui | 36 ----------------------------- 5 files changed, 36 insertions(+), 62 deletions(-) create mode 100644 TODO create mode 100644 sources/contents/code/ptmnotify.py delete mode 100644 sources/contents/code/tooltip.py diff --git a/TODO b/TODO new file mode 100644 index 0000000..7d9aff8 --- /dev/null +++ b/TODO @@ -0,0 +1,14 @@ +1. Notification on left click (system information): + a) uptime - uptime, kernel information + b) cpu, cpuclock, temp - cpu, cpuclock, temp, processor information + c) gpu, gputemp - gpu, gpu temp, gpu information + d) memory, swap - memory, swap, memory information + e) hdd, hddtemp - hdd, hddtemp, disk information + f) network - speed, network information + g) battery - battery, ac, acpi information +2. Tooltip (graphical information): + a) cpu, % + b) cpuclock, mhz + c) memory, % + d) swap, % + f) network, % diff --git a/sources/contents/code/ptmnotify.py b/sources/contents/code/ptmnotify.py new file mode 100644 index 0000000..be4e8e4 --- /dev/null +++ b/sources/contents/code/ptmnotify.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + +from gi.repository import Notify + + + +class PTMNotify: + def __init__(self, parent): + """class definition""" + self.parent = parent + + + def exampleNotify(self): + Notify.init ("Hello world") + Hello=Notify.Notification.new ("Hello world","This is an example notification.","dialog-information") + Hello.show () + + def createNotification(self): + """function to create notification for label""" + diff --git a/sources/contents/code/reinit.py b/sources/contents/code/reinit.py index c0ab80d..d7b2604 100644 --- a/sources/contents/code/reinit.py +++ b/sources/contents/code/reinit.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from PyQt4.QtCore import * +from PyQt4.QtGui import * from PyKDE4.plasma import Plasma import config @@ -26,22 +27,9 @@ class Reinit(): self.parent.label_order = str(settings.get('label_order', '1345')) for label in self.parent.dict_orders.values(): if ((label == 'cpu') or (label == 'mem') or (label == 'swap') or (label == 'net')): - exec ('self.parent.' + label + 'Bool = int(settings.get("' + label + 'Bool", 1))') + exec ('self.parent.' + label + 'Bool = int(settings.get("' + label + 'Bool", 2))') else: exec ('self.parent.' + label + 'Bool = int(settings.get("' + label + 'Bool", 0))') - # small function for update if errors exist -# summ = 0 -# for label in self.parent.dict_orders.values(): -# exec ('summ += self.parent.' + label + 'Bool') -# if (len(self.parent.label_order) != summ): -# for label in self.parent.dict_orders.values(): -# if ((label == 'cpu') or (label == 'mem') or (label == 'swap') or (label == 'net')): -# exec ('self.parent.' + label + 'Bool = 1') -# else: -# exec ('self.parent.' + label + 'Bool = 0') -# exec ('settings.set("' + label + 'Bool", self.parent.' + label + 'Bool)') -# self.parent.label_order = '1345' -# settings.set('label_order', self.parent.label_order) for order in self.parent.label_order: if (order == "1"): diff --git a/sources/contents/code/tooltip.py b/sources/contents/code/tooltip.py deleted file mode 100644 index db0c2dd..0000000 --- a/sources/contents/code/tooltip.py +++ /dev/null @@ -1,12 +0,0 @@ -# -*- coding: utf-8 -*- - - - -class ToolTip: - def __init__(self, parent): - """class definition""" - self.parent = parent - - - def createToolTip(self): - """function to create tool tip for label""" diff --git a/sources/contents/ui/configwindow.ui b/sources/contents/ui/configwindow.ui index eac10b7..f633e52 100644 --- a/sources/contents/ui/configwindow.ui +++ b/sources/contents/ui/configwindow.ui @@ -58,9 +58,6 @@ true - - true - @@ -113,9 +110,6 @@ true - - true - @@ -172,9 +166,6 @@ $ccpu - load CPU for each core, % true - - true - @@ -231,9 +222,6 @@ $ccpucl - CPU clock for each core, MHz true - - true - @@ -302,9 +290,6 @@ $ccpucl - CPU clock for each core, MHz true - - true - @@ -360,9 +345,6 @@ $ccpucl - CPU clock for each core, MHz true - - true - @@ -418,9 +400,6 @@ $ccpucl - CPU clock for each core, MHz true - - true - @@ -477,9 +456,6 @@ $memmb - RAM usage, MB true - - true - @@ -536,9 +512,6 @@ $swapmb - swap usage, MB true - - true - @@ -594,9 +567,6 @@ $swapmb - swap usage, MB true - - true - @@ -652,9 +622,6 @@ $swapmb - swap usage, MB true - - true - @@ -712,9 +679,6 @@ $netdev - current network device true - - true -