Example #1
0
File: gui.py Project: kzwkt/dff
class GUI(QApplication, UI):
    def __init__(self, debug=False, verbosity=0):
        """Launch GUI"""
        QApplication.__init__(self, sys.argv)
        UI.__init__(self, debug, verbosity)
        self.translator = Translator()
        self.installTranslator(self.translator.getGeneric())
        self.installTranslator(self.translator.getDFF())
        self.setApplicationName("Digital Forensics Framework")
        # Below are macros replaced by CMake using configure_file please don't
        # commit this file with macros replaced, view those macros definition
        # in the top level CMakeLists.txt
        self.setApplicationVersion("1.3.0")
        pixmap = QPixmap(":splash.png")
        self.splash = SplashScreen(pixmap, Qt.WindowStaysOnTopHint,
                                   self.applicationVersion())
        self.splash.setMask(pixmap.mask())

    def createMainWindow(self):
        return MainWindow(self, self.debug)

    def launch(self, modulesPaths=None):
        self.splash.show()
        if modulesPaths:
            self.loadModules(modulesPaths, self.splash.showMessage)

        self.mainWindow = self.createMainWindow()
        self.mainWindow.initDockWidgets()
        self.translator.loadLanguage()
        self.mainWindow.show()
        self.splash.finish(self.mainWindow)
        sys.exit(self.exec_())
Example #2
0
File: gui.py Project: arxsys/dff-ui
class GUI(QApplication, UI):
    def __init__(self, debug = False, verbosity = 0):
        """Launch GUI"""
	QApplication.__init__(self, sys.argv)
        UI.__init__(self, debug, verbosity)
        self.translator = Translator()
        self.installTranslator(self.translator.getGeneric())
        self.installTranslator(self.translator.getDFF())
        self.setApplicationName("Digital Forensics Framework")
        # Below are macros replaced by CMake using configure_file please don't
        # commit this file with macros replaced, view those macros definition
        # in the top level CMakeLists.txt
        self.setApplicationVersion("1.3.0")
        pixmap = QPixmap(":splash.png")
        self.splash = SplashScreen(pixmap, Qt.WindowStaysOnTopHint, self.applicationVersion())
        self.splash.setMask(pixmap.mask()) 

    def createMainWindow(self):
        return MainWindow(self, self.debug)

    def launch(self, modulesPaths = None):
        self.splash.show()
        if modulesPaths:
          self.loadModules(modulesPaths, self.splash.showMessage)
        
        self.mainWindow = self.createMainWindow()
        self.mainWindow.initDockWidgets()
        self.translator.loadLanguage()
        self.mainWindow.show()
        self.splash.finish(self.mainWindow)
        sys.exit(self.exec_())