diff options
| author | Loïc Guégan <loic.guegan@mailbox.org> | 2024-09-18 18:32:24 +0200 |
|---|---|---|
| committer | Loïc Guégan <loic.guegan@mailbox.org> | 2024-09-18 18:32:24 +0200 |
| commit | 76ddf4fe100d7023451eb3b3134de4a11a7ad852 (patch) | |
| tree | 5df054573ab4c7efc1c45bf1c977e37f94ff40fa /tropical/qt/mainwindow.py | |
| parent | 171fbd28a33bd71a2b17b35c558c2029f4b72a0a (diff) | |
Minor changes
Diffstat (limited to 'tropical/qt/mainwindow.py')
| -rw-r--r-- | tropical/qt/mainwindow.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tropical/qt/mainwindow.py b/tropical/qt/mainwindow.py index c2662f3..f9f9ac0 100644 --- a/tropical/qt/mainwindow.py +++ b/tropical/qt/mainwindow.py @@ -14,24 +14,24 @@ import sys, os class MainWindow(QMainWindow): - def __init__(self,uipath, calState, env): + def __init__(self,uipath, env): super(MainWindow,self).__init__() uic.loadUi(uipath+"/MainWindow.ui",self) - self.calDrawer=CalDrawer(self, self.calContainer.layout(),calState) - self.evtDrawer=EvtDrawer(self.calContainer.layout(),calState, env) - self.calState=calState + self.calDrawer=CalDrawer(self, self.calContainer.layout(), env) + self.evtDrawer=EvtDrawer(self.calContainer.layout(), env) self.show() + print(self.calDrawer.getSelectionEvents()) def setVersion(self,version): self.statusbar.showMessage("TropiCal v"+version,0) def event(self, event): if event.type() == DaySelectedEvent: - print("Ho") + self.evtDrawer.setEvents(self.calDrawer.getSelectionEvents()) return QWidget.event(self,event) #super().event(event) -def StartApplication(env,calState): +def StartApplication(env): path = os.path.dirname(os.path.abspath(__file__))+"/designer" # You need one (and only one) QApplication instance per application. # Pass in sys.argv to allow command line arguments for your app. @@ -39,7 +39,7 @@ def StartApplication(env,calState): app = QApplication(sys.argv) # Create a Qt widget, which will be our window. - window = MainWindow(path, calState, env) + window = MainWindow(path, env) window.setVersion(env.__VERSION__) window.show() # IMPORTANT!!!!! Windows are hidden by default. |
