Exemple #1
0
    def __init__(self):
        #
        QtGui.QMainWindow.__init__(self)
        self.setupUi(self)
        self.i18n()

        QtCore.QObject.connect(self.actionNew,  QtCore.SIGNAL("triggered (bool)"),  self.new)
        QtCore.QObject.connect(self.actionOpen,  QtCore.SIGNAL("triggered (bool)"),  self.open)
        QtCore.QObject.connect(self.actionSave,  QtCore.SIGNAL("triggered (bool)"),  self.save)
        QtCore.QObject.connect(self.actionSave_as,  QtCore.SIGNAL("triggered (bool)"),  self.saveas)
        QtCore.QObject.connect(self.actionExit,  QtCore.SIGNAL("triggered (bool)"),  self.exit)
        QtCore.QObject.connect(self.actionBuild_from_Installation,  QtCore.SIGNAL("triggered (bool)"),  self.pasoBuildfromIns)
        QtCore.QObject.connect(self.actionBuild_installation_image,  QtCore.SIGNAL("triggered (bool)"),  self.isoBuild)
        QtCore.QObject.connect(self.actionPreferences,  QtCore.SIGNAL("triggered (bool)"),  self.openPreferences)
        QtCore.QObject.connect(self.actionAbout,  QtCore.SIGNAL("triggered (bool)"),  self.openAbout)
        QtCore.QObject.connect(self.actionExport, QtCore.SIGNAL("triggered (bool)"), self.export)

        self.preferences = preferences()
        if not self.preferences.load():
            self.message(self.msg[0])
            self.preferences.exec_()

        self.pasoFName = ""
        self.setWindowTitle("%s   -   %s" %(const.NAME, self.pasoFName))

        self.move(( (QtGui.QApplication.desktop().width()- self.width()) / 2 ),
            ( (QtGui.QApplication.desktop().height()- self.height()) / 2 ))
Exemple #2
0
    def __init__(self, installTranslator):
        QtGui.QMainWindow.__init__(self)
        self.setupUi(self)
        self.i18n()
        if not os.path.isdir(const.EVIRE_PATH):
            self.firstRun()
        
        self.pluginsOutputOverwriteStatus = pos_None
        self.pluginActionRunStatus = True
            
        self.pref = preferences()
        self.plugins = pluginLoader(QtCore.QLocale.system().name())
        
        try:
            self.plugins.load(installTranslator)
        except cException as e:
            details = ""
            for bad in self.plugins.badPlugins:
                details += "%s [%s]\n\n" %(self.msg[bad.code], bad.data)
            QMessage(str(self.msg[e.code]) %(str(len(self.plugins.badPlugins))), QtGui.QMessageBox.Information, False, False, details)

        if self.plugins.getNames() == []:
            QMessage(self.msg["m_anyPluginWarning"], QtGui.QMessageBox.Information)
            self.on_actionPlugins_triggered()

        self.actionList = EActionList(self, self.plugins)
        self.actionListLayout.addWidget( self.actionList )

        QtCore.QObject.connect(self.actionMergeSelected,  QtCore.SIGNAL("triggered (bool)"),  self.actionList.mergeSelected)
        QtCore.QObject.connect(self.actionRemove,  QtCore.SIGNAL("triggered (bool)"),  self.actionList.remove)
        QtCore.QObject.connect(self.actionMergeAll,  QtCore.SIGNAL("triggered (bool)"),  self.actionList.mergeAll)
        QtCore.QObject.connect(self.actionSplit,  QtCore.SIGNAL("triggered (bool)"),  self.actionList.split)
        QtCore.QObject.connect(self.actionSplitToPieces,  QtCore.SIGNAL("triggered (bool)"),  self.actionList.splitToPieces)
        
        self.move(( (QtGui.QApplication.desktop().width()- self.width()) / 2 ),
            ( (QtGui.QApplication.desktop().height()- self.height()) / 2 ))
        self.setWindowTitle("%s - %s" %(const.NAME, const.VERSION))

        self.checkInputList()