mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 22:51:39 +00:00
Converted .h view objp bridge interfaces to python ones. It simplifies them and allows for subclassing.
--HG-- branch : objp
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@protocol DetailsPanelView <NSObject>
|
||||
- (void)refresh;
|
||||
@end
|
||||
@@ -1,8 +0,0 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@protocol ExtraFairwareReminderView <NSObject>
|
||||
- (void)startTimer;
|
||||
- (void)stopTimer;
|
||||
- (void)setButtonText:(NSString *)text;
|
||||
- (void)enableButton;
|
||||
@end
|
||||
@@ -1,5 +0,0 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@protocol StatsLabelView <NSObject>
|
||||
- (void)refresh;
|
||||
@end
|
||||
@@ -1,4 +1,7 @@
|
||||
from cocoa.inter2 import PyGUIObject
|
||||
from cocoa.inter2 import PyGUIObject, GUIObjectView
|
||||
|
||||
class DetailsPanelView(GUIObjectView):
|
||||
pass
|
||||
|
||||
class PyDetailsPanel(PyGUIObject):
|
||||
def numberOfRows(self) -> int:
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
from objp.util import dontwrap
|
||||
from cocoa.inter2 import PyGUIObject
|
||||
|
||||
class ExtraFairwareReminderView:
|
||||
def startTimer(self): pass
|
||||
def stopTimer(self): pass
|
||||
def setButtonText_(self, text: str): pass;
|
||||
def enableButton(self): pass
|
||||
|
||||
class PyExtraFairwareReminder(PyGUIObject):
|
||||
def start(self):
|
||||
self.model.start()
|
||||
@@ -8,14 +15,18 @@ class PyExtraFairwareReminder(PyGUIObject):
|
||||
self.model.update_button()
|
||||
|
||||
# model --> view
|
||||
@dontwrap
|
||||
def start_timer(self):
|
||||
self.callback.startTimer()
|
||||
|
||||
@dontwrap
|
||||
def stop_timer(self):
|
||||
self.callback.stopTimer()
|
||||
|
||||
@dontwrap
|
||||
def enable_button(self):
|
||||
self.callback.enableButton()
|
||||
|
||||
@dontwrap
|
||||
def set_button_text(self, text):
|
||||
self.callback.setButtonText_(text)
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
from cocoa.inter2 import PyGUIObject
|
||||
from cocoa.inter2 import PyGUIObject, GUIObjectView
|
||||
|
||||
class StatsLabelView(GUIObjectView):
|
||||
pass
|
||||
|
||||
class PyStatsLabel(PyGUIObject):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user