コード例 #1
0
ファイル: uimain.py プロジェクト: lycying/seeking
    def __init__(self):
        """
        (1) Add a tabWidget
        (2) Setup the main Window
        (3) Some basic event slot
        (4) read datas(menus , actions) 
        """
        QMainWindow.__init__(self)

        # attrs
        # Notice: These attributes can not be put outside init method

        self.__actions = {}
        self.__menus = {}
        self.__globalActionGroup = QActionGroup(self)

        #the main widget(Tab) that show all things
        self.tabs = MainTabWidget(self)
        self.setCentralWidget(self.tabs)

        view = SKMainTabShow(self, self.tabs)
        self.tabs.addTab(view, QIcon(getPath("iconDir", 'main.png')),
                         QApplication.translate("default", "MainTab"))

        QObject.connect(self, SIGNAL("updateWindows()"), self.__updateWindows)

        self.__addBasicMenus()
        self.__addBasicActions()
コード例 #2
0
ファイル: uimain.py プロジェクト: lycying/seeking
 def __init__(self):
     """
     (1) Add a tabWidget
     (2) Setup the main Window
     (3) Some basic event slot
     (4) read datas(menus , actions) 
     """
     QMainWindow.__init__(self)
     
     # attrs 
     # Notice: These attributes can not be put outside init method 
     
     self.__actions = {}
     self.__menus = {}
     self.__globalActionGroup = QActionGroup(self)
     
     #the main widget(Tab) that show all things 
     self.tabs = MainTabWidget(self)
     self.setCentralWidget(self.tabs)
     
     view = SKMainTabShow(self,self.tabs)
     self.tabs.addTab(view,QIcon(getPath("iconDir",'main.png')),QApplication.translate("default", "MainTab"))
     
     QObject.connect(self, SIGNAL("updateWindows()"),self.__updateWindows)
     
     self.__addBasicMenus()
     self.__addBasicActions()
コード例 #3
0
ファイル: arriNamer.py プロジェクト: tnk3r/arriRollRenamer
 def __init__(self, parent=None):
     QMainWindow.__init__(self, parent=None)
     self.files = str(QFileDialog.getExistingDirectory(self, "Select ARRIRAW Clip Directory"))
     self.Error = QString("")
     if self.files != "":
         self.showdialog("Set New Roll Number")
     sys.exit(0)
コード例 #4
0
 def __init__(self):
     QMainWindow.__init__(self)
     self.mplwidget = MatplotlibWidget(self,
                                       title='Example',
                                       xlabel='Linear scale',
                                       ylabel='Log scale',
                                       hold=True,
                                       yscale='log')
     self.mplwidget.setFocus()
     self.setCentralWidget(self.mplwidget)
     self.plot(self.mplwidget.axes)
コード例 #5
0
 def __init__(self, parent=None):
     """
     Constructor
     """
     QMainWindow.__init__(self, parent)
     self.setupUi(self)
     self.image0 = QPixmap()
     self.image0.loadFromData(image0_data, "PNG")
     self.image1 = QPixmap()
     self.image1.loadFromData(image1_data, "PNG")
     self.image2 = QPixmap()
     self.image2.loadFromData(image2_data, "PNG")
     self.image3 = QPixmap()
     self.image3.loadFromData(image3_data, "PNG")
コード例 #6
0
    def __init__(self, parent=None):
        QMainWindow.__init__(self, parent)

        self.setFixedSize(600, 180)
        self.l0 = QLabel(self)
        self.l0.setFixedWidth(300)
        self.l0.setFixedHeight(40)
        self.l0.setAlignment(Qt.AlignCenter)
        self.l0.setText("Breathing(bpm)")
        self.l0.move(0, 0)

        self.l1 = QLabel(self)
        self.l1.setFixedWidth(300)
        self.l1.setFixedHeight(40)
        self.l1.setAlignment(Qt.AlignCenter)
        self.l1.setText("Heart Rate(bpm)")
        self.l1.move(300, 0)

        pe = QPalette()
        pe.setColor(QPalette.WindowText, Qt.yellow)
        pe.setColor(QPalette.Background, Qt.gray)
        self.l0.setAutoFillBackground(True)
        self.l0.setPalette(pe)
        self.l1.setAutoFillBackground(True)
        self.l1.setPalette(pe)

        self.l0.setFont(QFont("Roman times", 20, QFont.Bold))
        self.l1.setFont(QFont("Roman times", 20, QFont.Bold))

        self.lbr = QLabel(self)
        self.lbr.setFixedWidth(300)
        self.lbr.setFixedHeight(60)
        self.lbr.setAlignment(Qt.AlignCenter)
        self.lbr.setFont(QFont("Roman times", 55, QFont.Bold))
        self.lbr.setText("Breathing")
        self.lbr.move(0, 75)

        self.lhr = QLabel(self)
        self.lhr.setFixedWidth(300)
        self.lhr.setFixedHeight(60)
        self.lhr.setAlignment(Qt.AlignCenter)
        self.lhr.setFont(QFont("Roman times", 55, QFont.Bold))
        self.lhr.setText("Heart Rate")

        self.lhr.move(300, 75)
コード例 #7
0
ファイル: stickynotes.py プロジェクト: gilshwartz/leo-editor
    def __init__(self, c):

        QMainWindow.__init__(self)

        mdi = self.mdi = QMdiArea(self)
        self.setCentralWidget(mdi)
        self.create_actions()
        self.menuBar().setVisible(False)

        self.notes = {}
        self.c = c

        def delayed_load():
            self.load_states()
        QTimer.singleShot(0, delayed_load)

        self.setWindowTitle("Tabula " + os.path.basename(self.c.mFileName))

        g.registerHandler("end1",self.on_quit)
コード例 #8
0
ファイル: viewer3.py プロジェクト: mjirik/lisa
 def __init__(self, inputfile, mode, parent=None):
     self.ren = vtk.vtkRenderer()
     if mode == 'Cut':
         QtWidgets.QMainWindow.__init__(self, parent)
         self.vtk_filename = inputfile
         self.ui = Ui_MainWindow()
         self.ui.setupUi(self)
         self.info_text = self.ui.info_text
         self.liver_text = self.ui.liver_text
         self.planew = None
         self.cut_point = None
         self.iren = self.ui.vtkWidget.GetRenderWindow().GetInteractor()
         self.ui.vtkWidget.GetRenderWindow().AddRenderer(self.ren)
     '''
     Pokud je zvolen prohlížecí režim, musíme vytvořit jak renderovací okna tak samotný interaktor
     '''
     if mode == 'View':
         QMainWindow.__init__(self, parent)
         self.renWin = vtk.vtkRenderWindow()
         self.renWin.AddRenderer(self.ren)
         self.iren = vtk.vtkRenderWindowInteractor()
         self.iren.SetRenderWindow(self.renWin)
コード例 #9
0
    def __init__(self, app=None):
        QMainWindow.__init__(self, None)
        self.setupUi(self)

        self.app = app
        self.iface = backend.pm.Iface()

        self.busy = QProgressIndicator(self)
        self.busy.setFixedSize(QSize(20, 20))

        self.setWindowIcon(QIcon(":/data/package-manager.png"))

        self.setCentralWidget(MainWidget(self))
        self.cw = self.centralWidget()

        self.settingsDialog = SettingsDialog(self)

        self.initializeActions()
        self.initializeStatusBar()
        self.initializeTray()
        self.connectMainSignals()

        self.pdsMessageBox = PMessageBox(self)
コード例 #10
0
ファイル: mainwindow.py プロジェクト: vdemir/pisi-2.0
    def __init__(self, app = None):
        QMainWindow.__init__(self, None)
        self.setupUi(self)

        self.app = app
        self.iface = backend.pm.Iface()

        self.busy = QProgressIndicator(self)
        self.busy.setFixedSize(QSize(20, 20))

        self.setWindowIcon(QIcon(":/data/package-manager.png"))

        self.setCentralWidget(MainWidget(self))
        self.cw = self.centralWidget()

        self.settingsDialog = SettingsDialog(self)

        self.initializeActions()
        self.initializeStatusBar()
        self.initializeTray()
        self.connectMainSignals()

        self.pdsMessageBox = PMessageBox(self)
コード例 #11
0
ファイル: liver_surgery.py プロジェクト: mjirik/lisa
    def run(self, qt_app=None):
        self.qt_app = qt_app
        QMainWindow.__init__(self)


        self.initUI()