Ejemplo n.º 1
0
    def __init__(self, parent=None, *args, **kwargs):
        super(MainWindow, self).__init__(parent, *args, **kwargs)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        path = os.path.join(app_root, 'UI', 'images', 'icon.png')
        self.setWindowIcon(QtGui.QIcon(path))
        self.batch_dialog = BatchAddDialogue(self)
        self.ui.saveToLineEdit.setText(desktop_path)
        self.ui.BrowseConvertToLineEdit.setText(os.getcwd())
        self.ui.BrowseConvertLineEdit.files = []
        self.ui.statusbar.showMessage('Ready.')
        self.set_connections()

        self.url_list = []
        self.complete_url_list = {}
        self.convert_list = []
        self.threadpool = QtCore.QThreadPool()
        self.ui.tableWidget.horizontalHeader().setSectionResizeMode(
            0, QtWidgets.QHeaderView.Stretch)
        self.rowcount = 0

        self.connect_menu_action()

        self.about = AboutDialog(self)
        self.license = LicenseDialogue(self)
        self.show()
Ejemplo n.º 2
0
    def __init__(self, parent=None, *args, **kwargs):
        super(MainWindow, self).__init__(parent, *args, **kwargs)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        # For getting the icon to work
        try:
            from PyQt5.QtWinExtras import QtWin

            myappid = "my_company.my_product.sub_product.version"
            QtWin.setCurrentProcessExplicitAppUserModelID(
                myappid)  # type: ignore
        except ImportError:
            pass

        global app_root
        if app_root:
            ico_path = str(Path(app_root) / Path("UI/images/icon.ico"))
        else:
            app_root = ":/"
            ico_path = app_root + "icon.ico"
        self.setWindowIcon(QtGui.QIcon(ico_path))
        self.batch_dialog = BatchAddDialogue(self)
        self.ui.saveToLineEdit.setText(desktop_path)
        self.ui.BrowseConvertToLineEdit.setText(str(Path().cwd()))
        self.ui.BrowseConvertLineEdit.files = []
        self.ui.statusbar.showMessage("Ready.")
        self.set_connections()

        self.url_list = []
        self.complete_url_list = {}
        self.convert_list = []
        self.threadpool = QtCore.QThreadPool()
        self.ui.tableWidget.horizontalHeader().setSectionResizeMode(
            0, QtWidgets.QHeaderView.Stretch)
        self.rowcount = 0

        self.connect_menu_action()

        self.about = AboutDialog(self)
        self.license = LicenseDialogue(self)
        self.closing = CloseSignals()
        self.show()
Ejemplo n.º 3
0
 def showAbout(self):
     about = AboutDialog(self)
     about.show()