Exemple #1
0
class MainWindow(QMainWindow):
    def __init__(self):
        super(MainWindow, self).__init__()
        #self.setMinimumHeight(600)
        self.main = MainArea(self)
        self.setCentralWidget(self.main)

        self.setWindowTitle(u'Movie Reducer')
        self.setWindowIcon(QIcon('image/logo.png'))
        self.setStyleSheet(STYLE_SHEET)
        #self.btnPath.clicked.connect(self.select_path)


    def closeEvent(self, event):
        #self.dlgSettings.saveConfig()
        self.main.close()
        event.accept()

    def get_root_path(self):
        return self.main.txtPath.text()

    def center(self):
        self.move(
            QApplication.desktop().screen().rect().center() -
            self.rect().center() )

    def showLoading(self, msg, loading=True):
        self.lbLoadingText.setText(msg)
        #self.statusBar().showMessage(msg)
        self.lbLoadingGif.setVisible(loading)
Exemple #2
0
    def __init__(self):
        super(MainWindow, self).__init__()
        #self.setMinimumHeight(600)
        self.main = MainArea(self)
        self.setCentralWidget(self.main)

        self.setWindowTitle(u'Movie Reducer')
        self.setWindowIcon(QIcon('image/logo.png'))
        self.setStyleSheet(STYLE_SHEET)
Exemple #3
0
    def __init__(self):
        super(MainWindow, self).__init__() 

        self.setFont(QFont("Monospace", 10))
        self.dlgSettings = SettingsDlg(self)
        self.dlgSettings.setModal(True)
        self.dlgSettings.load()
        self.main = MainArea(self)
        self.setCentralWidget(self.main)

        self.createToolBar()
        self.createStatusBar()

        self.setWindowTitle('Svn Tool')
        self.setWindowIcon(QIcon('image/logo.png'))
        self.setStyleSheet(STYLE_SHEET)
Exemple #4
0
class MainWindow(QMainWindow):
    def __init__(self):
        super(MainWindow, self).__init__() 

        self.setFont(QFont("Monospace", 10))
        self.dlgSettings = SettingsDlg(self)
        self.dlgSettings.setModal(True)
        self.dlgSettings.load()
        self.main = MainArea(self)
        self.setCentralWidget(self.main)

        self.createToolBar()
        self.createStatusBar()

        self.setWindowTitle('Svn Tool')
        self.setWindowIcon(QIcon('image/logo.png'))
        self.setStyleSheet(STYLE_SHEET)

    def createStatusBar(self):
        self.lbLoadingText = QLabel()
        self.lbLoadingGif = QLabel()
        self.lbLoadingGif.hide()
        movie = QMovie("image/loading.gif")
        movie.start()
        self.lbLoadingGif.setMovie(movie)

        self.statusBar()
        self.statusBar().addWidget(self.lbLoadingText)
        self.statusBar().addWidget(self.lbLoadingGif)

    def createToolBar(self):
        self.myTb = self.addToolBar("Svn Tool")
        self.myTb.addAction( QAction(
            QIcon('image/computer.png'), "Open Settings Dialog", self,
            #statusTip="Open Settings Dialog",
            triggered=self.openSettingsTab) )
        self.myTb.addAction( QAction(
            QIcon('image/stop.png'), "Stop Current Running Task", self,
            #statusTip="Stop Current Running Task",
            triggered=self.stopCurrentTask) )

    def stopCurrentTask(self):
        TaskWorker().stop_task()

    def openSettingsTab(self):
        self.dlgSettings.show()

    def center(self):
        self.move(
            QApplication.desktop().screen().rect().center() -
            self.rect().center() )

    def closeEvent(self, event):
        #self.dlgSettings.saveConfig()
        self.main.close()
        event.accept()

    def showLoading(self, msg, loading=True):
        self.lbLoadingText.setText(msg)
        #self.statusBar().showMessage(msg)
        self.lbLoadingGif.setVisible(loading)

    def notifyConfigChanged(self):
        self.main.updateAppList()