2012-01-15 22:31:15 +00:00
|
|
|
from objp.util import pyref, dontwrap
|
2012-01-13 20:25:34 +00:00
|
|
|
from cocoa.inter import PyGUIObject
|
2012-01-15 22:31:15 +00:00
|
|
|
from core.gui.extra_fairware_reminder import ExtraFairwareReminder
|
2011-09-21 20:02:13 +00:00
|
|
|
|
2012-01-12 17:34:20 +00:00
|
|
|
class ExtraFairwareReminderView:
|
|
|
|
def startTimer(self): pass
|
|
|
|
def stopTimer(self): pass
|
|
|
|
def setButtonText_(self, text: str): pass;
|
|
|
|
def enableButton(self): pass
|
|
|
|
|
2012-01-13 19:43:43 +00:00
|
|
|
class PyExtraFairwareReminder(PyGUIObject):
|
2012-01-15 22:31:15 +00:00
|
|
|
def __init__(self, app: pyref):
|
|
|
|
model = ExtraFairwareReminder(app.model)
|
|
|
|
PyGUIObject.__init__(self, model)
|
|
|
|
|
2011-09-21 20:02:13 +00:00
|
|
|
def start(self):
|
2012-01-11 20:55:25 +00:00
|
|
|
self.model.start()
|
2011-09-21 20:02:13 +00:00
|
|
|
|
|
|
|
def updateButton(self):
|
2012-01-11 20:55:25 +00:00
|
|
|
self.model.update_button()
|
2011-09-21 20:02:13 +00:00
|
|
|
|
|
|
|
# model --> view
|
2012-01-12 17:34:20 +00:00
|
|
|
@dontwrap
|
2011-09-21 20:02:13 +00:00
|
|
|
def start_timer(self):
|
2012-01-11 20:55:25 +00:00
|
|
|
self.callback.startTimer()
|
2011-09-21 20:02:13 +00:00
|
|
|
|
2012-01-12 17:34:20 +00:00
|
|
|
@dontwrap
|
2011-09-21 20:02:13 +00:00
|
|
|
def stop_timer(self):
|
2012-01-11 20:55:25 +00:00
|
|
|
self.callback.stopTimer()
|
2011-09-21 20:02:13 +00:00
|
|
|
|
2012-01-12 17:34:20 +00:00
|
|
|
@dontwrap
|
2011-09-21 20:02:13 +00:00
|
|
|
def enable_button(self):
|
2012-01-11 20:55:25 +00:00
|
|
|
self.callback.enableButton()
|
2011-09-21 20:02:13 +00:00
|
|
|
|
2012-01-12 17:34:20 +00:00
|
|
|
@dontwrap
|
2011-09-21 20:02:13 +00:00
|
|
|
def set_button_text(self, text):
|
2012-01-11 20:55:25 +00:00
|
|
|
self.callback.setButtonText_(text)
|