Esempio n. 1
0
File: gui.py Progetto: 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_())
Esempio n. 2
0
File: gui.py Progetto: 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_())
Esempio n. 3
0
File: gui.py Progetto: vertrex/DFF
class GUI(QApplication, UI):
    def __init__(self, arguments):
        """Launch GUI"""
        self.arguments = arguments
        QApplication.__init__(self, sys.argv)
        UI.__init__(self, arguments)
        self.translator = Translator()
        self.translator.addTranslationPath("dff/ui/gui/i18n/Dff_pro_")
        self.translator.addTranslationPath("dff/modules/i18n/Dff_pro_modules_")
        self.translator.loadLanguage()
        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(dff.VERSION)
        pixmap = QPixmap(":splash.png")
        self.splash = SplashScreen(pixmap, Qt.WindowStaysOnTopHint,
                                   self.applicationVersion())
        self.splash.setMask(pixmap.mask())

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

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

        self.mainWindow = self.createMainWindow()
        self.mainWindow.initDockWidgets()
        self.translator.loadLanguage()
        self.mainWindow.show()
        self.splash.finish(self.mainWindow)
        sys.exit(self.exec_())
Esempio n. 4
0
File: gui.py Progetto: kzwkt/dff
 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())
Esempio n. 5
0
File: gui.py Progetto: vertrex/DFF
 def __init__(self, arguments):
     """Launch GUI"""
     self.arguments = arguments
     QApplication.__init__(self, sys.argv)
     UI.__init__(self, arguments)
     self.translator = Translator()
     self.translator.addTranslationPath("dff/ui/gui/i18n/Dff_pro_")
     self.translator.addTranslationPath("dff/modules/i18n/Dff_pro_modules_")
     self.translator.loadLanguage()
     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(dff.VERSION)
     pixmap = QPixmap(":splash.png")
     self.splash = SplashScreen(pixmap, Qt.WindowStaysOnTopHint,
                                self.applicationVersion())
     self.splash.setMask(pixmap.mask())
Esempio n. 6
0
File: gui.py Progetto: arxsys/dff-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()) 
Esempio n. 7
0
    def __init__(self, parent = None):
      """ Drives preferences Dialog

      TODO
       - Valide index settings are properly handle by indexer
      """
      
      super(QDialog, self).__init__()
      
      # Set up the user interface from Qt Designer
      self.setupUi(self)
      self.translation()

      # Framework singleton classes
      self.conf = Conf()
      self.translator = Translator()

      # Temporary config, to be validated once submited
      self.tNoFootPrint = self.conf.noFootPrint
      self.tNoHistoryFile = self.conf.noHistoryFile
      self.tWorkPath = self.conf.workingDir
      self.tHistoryFileFullPath = self.conf.historyFileFullPath

      if self.conf.indexEnabled:
          self.tRootIndex = self.conf.root_index
          self.tIndexName = self.conf.index_name
          self.tIndexPath = self.conf.index_path
      else:
          idx = self.tabWidget.indexOf(self.indexTab)
          self.tabWidget.removeTab(idx)
      # Activate preferences from conf values
      self.noFootPrintCheckBox.setChecked(self.conf.noFootPrint)
      self.noHistoryCheckBox.setChecked(self.conf.noHistoryFile)
      self.footprintOrNo()

      self.workingDirPath.setText(self.conf.workingDir)
      self.historyLineEdit.setText(self.conf.historyFileFullPath)
      self.docAndHelpFullPath.setText(self.conf.docPath)
      
      # Populate languages comboBox with available languages, also set to current language
      self.langPopulate()

      # Signals handling
      self.connect(self.noFootPrintCheckBox, SIGNAL("stateChanged(int)"), self.noFootPrintChanged)
      self.connect(self.workingDirBrowse, SIGNAL("clicked()"), self.workDir)
      self.connect(self.historyToolButton, SIGNAL("clicked()"), self.historyDir)
      self.connect(self.noHistoryCheckBox, SIGNAL("stateChanged(int)"), self.historyStateChanged)
      self.connect(self.langComboBox, SIGNAL("currentIndexChanged (const QString&)"), self.langChanged)

      # Help configuration
      self.connect(self.docAndHelpBrowse, SIGNAL("clicked()"), self.helpDir)

      # Show or hide label helpers
      self.globalValid()
      self.helpValid()
      
      if parent:
          self.app = parent.app
      else:
          self.app = None

      # Catch submit to create directories if needed
      self.connect(self.buttonBox, SIGNAL("accepted()"), self.validate)
      self.connect(self.buttonBox, SIGNAL("rejected()"), self.clear)