示例#1
0
    def __init__(self, parent=None):
        QtGui.QMainWindow.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self._x264_location = os.path.join("tools", "x264", "x264.exe")
        self._x264_64_location = os.path.join("tools", "x264", "x264_64.exe")
        self._mp4box_location = os.path.join("tools", "mp4box", "mp4box.exe")
        self._mkvmerge_location = os.path.join("tools", "mkvmerge", "mkvmerge.exe")
        self._mkvextract_location = os.path.join("tools", "mkvmerge", "mkvextract.exe")
        self._avisynth_location = ''

        self.isWindowFullScreen = False

        # Class parameters
        self.profile_str = "* Temp Profile *"

        # connect database!
        globvar.db.connect()

        # setup tables
        ConfigModel.create_table(True)
        VideosModel.create_table(True)
        ProgModel.create_table(True)

        ProgModel.create_or_get(
            times_opened = '0',
            x264_location = self._x264_location,
            x264_64_location = self._x264_64_location,
            mp4box_location = self._mp4box_location,
            mkvmerge_location = self._mkvmerge_location,
            mkvextract_location = self._mkvextract_location)

        # set up controllers
        self._videosController = VideosController()
        self._configController = ConfigController()

        self._configController.createInitial()
        self._configController.createTempProfile()

        self.setupInitialConfigView()