def init_ui(self):
            self.resize(self.w, self.h)

            self.main_widget = QtGui.QWidget()
            l = QtGui.QVBoxLayout(self.main_widget)
            l.setMargin(0)
            l.setSpacing(0)

            if options.mode == 'water':
                r = WaterStorageDisplay(parent=self.main_widget, logger=logger)
            elif options.mode == 'oil':
                r = OilStorageDisplay(parent=self.main_widget, logger=logger)
            else:
                r = ResourceDisplay(parent=self.main_widget, logger=logger)

            l.addWidget(r)

            timer = QtCore.QTimer(self)
            QtCore.QObject.connect(timer, QtCore.SIGNAL("timeout()"), r.tick)
            timer.start(options.interval)

            self.main_widget.setFocus()
            self.setCentralWidget(self.main_widget)
            self.statusBar().showMessage("%s starting..." % options.mode,
                                         options.interval)
 def __set_layout(self):
     objlayout = QtGui.QVBoxLayout()
     objlayout.setSpacing(1)
     objlayout.setMargin(0)
     objlayout.addWidget(self.water)
     objlayout.addWidget(self.oil)
     self.setLayout(objlayout)
 def __set_layout(self):
     wavelayout = QtGui.QVBoxLayout()
     wavelayout.setSpacing(1) 
     wavelayout.setMargin(0)
     wavelayout.addWidget(self.stage1)
     wavelayout.addWidget(self.stage2)
     wavelayout.addWidget(self.stage3) 
     self.setLayout(wavelayout)
예제 #4
0
        def setup(self):
            self.resize(self.w, self.h)
            self.main_widget = QtGui.QWidget(self)

            l = QtGui.QVBoxLayout(self.main_widget)
            el = DomeffDisplay(self.main_widget, logger=logger)
            l.addWidget(el)

            timer = QtCore.QTimer(self)
            QtCore.QObject.connect(timer, QtCore.SIGNAL("timeout()"), el.tick)
            timer.start(options.interval)

            self.main_widget.setFocus()
            self.setCentralWidget(self.main_widget)

            self.statusBar().showMessage("windscreen starting...", 5000)
예제 #5
0
        def init_ui(self):
            self.resize(self.w, self.h)

            self.main_widget = QtGui.QWidget()
            l = QtGui.QVBoxLayout(self.main_widget)
            l.setMargin(0) 
            l.setSpacing(0)
            t = TimeElLimitDisplay(parent=self.main_widget, logger=logger)
            l.addWidget(t)

            timer = QtCore.QTimer(self)
            QtCore.QObject.connect(timer, QtCore.SIGNAL("timeout()"), t.tick)
            timer.start(options.interval)

            self.main_widget.setFocus()
            self.setCentralWidget(self.main_widget) 
            self.statusBar().showMessage("%s starting..." %options.mode, options.interval)
예제 #6
0
        def init_ui(self):
            self.resize(self.w, self.h)

            self.main_widget = QtGui.QWidget()
            l = QtGui.QVBoxLayout(self.main_widget)
            l.setMargin(0) 
            l.setSpacing(0)

            if options.mode=='nsir':
                ins = ImgRotNsIr(parent=self.main_widget, logger=logger)
            elif options.mode=='nsopt':
                ins = ImgRotNsOpt(parent=self.main_widget, logger=logger)
            l.addWidget(ins)

            timer = QtCore.QTimer(self)
            QtCore.QObject.connect(timer, QtCore.SIGNAL("timeout()"), ins.tick)
            timer.start(options.interval)

            self.main_widget.setFocus()
            self.setCentralWidget(self.main_widget) 
            self.statusBar().showMessage("%s starting..." %options.mode, options.interval)