def __init__(self, parent):
        super(AutoTagProgressWindow, self).__init__(parent)

        uic.loadUi(ComicTaggerSettings.getUIFile("autotagprogresswindow.ui"),
                   self)

        self.archiveCoverWidget = CoverImageWidget(self.archiveCoverContainer,
                                                   CoverImageWidget.DataMode,
                                                   False)
        gridlayout = QtWidgets.QGridLayout(self.archiveCoverContainer)
        gridlayout.addWidget(self.archiveCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        self.testCoverWidget = CoverImageWidget(self.testCoverContainer,
                                                CoverImageWidget.DataMode,
                                                False)
        gridlayout = QtWidgets.QGridLayout(self.testCoverContainer)
        gridlayout.addWidget(self.testCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        self.isdone = False

        self.setWindowFlags(self.windowFlags() | QtCore.Qt.WindowSystemMenuHint
                            | QtCore.Qt.WindowMaximizeButtonHint)

        reduceWidgetFontSize(self.textEdit)
Exemple #2
0
    def __init__(self, parent, settings):
        super(FileSelectionList, self).__init__(parent)

        uic.loadUi(ComicTaggerSettings.getUIFile('fileselectionlist.ui'), self)

        self.settings = settings

        reduceWidgetFontSize(self.twList)

        self.twList.setColumnCount(6)
        #self.twlist.setHorizontalHeaderLabels (["File", "Folder", "CR", "CBL", ""])
        # self.twList.horizontalHeader().setStretchLastSection(True)
        self.twList.currentItemChanged.connect(self.currentItemChangedCB)

        self.currentItem = None
        self.setContextMenuPolicy(Qt.ActionsContextMenu)
        self.modifiedFlag = False

        selectAllAction = QAction("Select All", self)
        removeAction = QAction("Remove Selected Items", self)
        self.separator = QAction("", self)
        self.separator.setSeparator(True)

        selectAllAction.setShortcut('Ctrl+A')
        removeAction.setShortcut('Ctrl+X')

        selectAllAction.triggered.connect(self.selectAll)
        removeAction.triggered.connect(self.removeSelection)

        self.addAction(selectAllAction)
        self.addAction(removeAction)
        self.addAction(self.separator)
Exemple #3
0
    def __init__(self, parent, mode, expand_on_click=True):
        super(CoverImageWidget, self).__init__(parent)

        uic.loadUi(ComicTaggerSettings.getUIFile('coverimagewidget.ui'), self)

        reduceWidgetFontSize(self.label)

        self.mode = mode
        self.comicVine = ComicVineTalker()
        self.page_loader = None
        self.showControls = True

        self.btnLeft.setIcon(QIcon(ComicTaggerSettings.getGraphic('left.png')))
        self.btnRight.setIcon(
            QIcon(ComicTaggerSettings.getGraphic('right.png')))

        self.btnLeft.clicked.connect(self.decrementImage)
        self.btnRight.clicked.connect(self.incrementImage)
        self.resetWidget()
        if expand_on_click:
            clickable(self.lblImage).connect(self.showPopup)
        else:
            self.lblImage.setToolTip("")

        self.updateContent()
Exemple #4
0
    def __init__(self, parent, settings):
        super(FileSelectionList, self).__init__(parent)

        uic.loadUi(ComicTaggerSettings.getUIFile('fileselectionlist.ui'), self)

        self.settings = settings

        reduceWidgetFontSize(self.twList)

        self.twList.setColumnCount(6)
        #self.twlist.setHorizontalHeaderLabels (["File", "Folder", "CR", "CBL", ""])
        # self.twList.horizontalHeader().setStretchLastSection(True)
        self.twList.currentItemChanged.connect(self.currentItemChangedCB)

        self.currentItem = None
        self.setContextMenuPolicy(Qt.ActionsContextMenu)
        self.modifiedFlag = False

        selectAllAction = QAction("Select All", self)
        removeAction = QAction("Remove Selected Items", self)
        self.separator = QAction("", self)
        self.separator.setSeparator(True)

        selectAllAction.setShortcut('Ctrl+A')
        removeAction.setShortcut('Ctrl+X')

        selectAllAction.triggered.connect(self.selectAll)
        removeAction.triggered.connect(self.removeSelection)

        self.addAction(selectAllAction)
        self.addAction(removeAction)
        self.addAction(self.separator)
    def __init__(self, parent, matches, comic_archive):
        super(MatchSelectionWindow, self).__init__(parent)

        uic.loadUi(ComicTaggerSettings.getUIFile("matchselectionwindow.ui"), self)

        self.altCoverWidget = CoverImageWidget(self.altCoverContainer, CoverImageWidget.AltCoverMode)
        gridlayout = QtGui.QGridLayout(self.altCoverContainer)
        gridlayout.addWidget(self.altCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        self.archiveCoverWidget = CoverImageWidget(self.archiveCoverContainer, CoverImageWidget.ArchiveMode)
        gridlayout = QtGui.QGridLayout(self.archiveCoverContainer)
        gridlayout.addWidget(self.archiveCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        reduceWidgetFontSize(self.twList)
        reduceWidgetFontSize(self.teDescription, 1)

        self.setWindowFlags(self.windowFlags() | QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowMaximizeButtonHint)

        self.matches = matches
        self.comic_archive = comic_archive

        self.twList.currentItemChanged.connect(self.currentItemChanged)
        self.twList.cellDoubleClicked.connect(self.cellDoubleClicked)

        self.updateData()
    def __init__(self, parent, matches, comic_archive):
        super(MatchSelectionWindow, self).__init__(parent)

        uic.loadUi(ComicTaggerSettings.getUIFile('matchselectionwindow.ui'),
                   self)

        self.altCoverWidget = CoverImageWidget(self.altCoverContainer,
                                               CoverImageWidget.AltCoverMode)
        gridlayout = QtGui.QGridLayout(self.altCoverContainer)
        gridlayout.addWidget(self.altCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        self.archiveCoverWidget = CoverImageWidget(
            self.archiveCoverContainer, CoverImageWidget.ArchiveMode)
        gridlayout = QtGui.QGridLayout(self.archiveCoverContainer)
        gridlayout.addWidget(self.archiveCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        reduceWidgetFontSize(self.twList)
        reduceWidgetFontSize(self.teDescription, 1)

        self.setWindowFlags(self.windowFlags() | QtCore.Qt.WindowSystemMenuHint
                            | QtCore.Qt.WindowMaximizeButtonHint)

        self.matches = matches
        self.comic_archive = comic_archive

        self.twList.currentItemChanged.connect(self.currentItemChanged)
        self.twList.cellDoubleClicked.connect(self.cellDoubleClicked)

        self.updateData()
    def __init__(self, parent):
        super(AutoTagProgressWindow, self).__init__(parent)

        uic.loadUi(
            ComicTaggerSettings.getUIFile('autotagprogresswindow.ui'), self)

        self.archiveCoverWidget = CoverImageWidget(
            self.archiveCoverContainer, CoverImageWidget.DataMode, False)
        gridlayout = QtGui.QGridLayout(self.archiveCoverContainer)
        gridlayout.addWidget(self.archiveCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        self.testCoverWidget = CoverImageWidget(
            self.testCoverContainer, CoverImageWidget.DataMode, False)
        gridlayout = QtGui.QGridLayout(self.testCoverContainer)
        gridlayout.addWidget(self.testCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        self.isdone = False

        self.setWindowFlags(self.windowFlags() |
                            QtCore.Qt.WindowSystemMenuHint |
                            QtCore.Qt.WindowMaximizeButtonHint)

        reduceWidgetFontSize(self.textEdit)
Exemple #8
0
    def __init__(self, parent):
        super(IDProgressWindow, self).__init__(parent)

        uic.loadUi(ComicTaggerSettings.getUIFile('progresswindow.ui'), self)

        self.setWindowFlags(self.windowFlags() | QtCore.Qt.WindowSystemMenuHint
                            | QtCore.Qt.WindowMaximizeButtonHint)

        reduceWidgetFontSize(self.textEdit)
Exemple #9
0
    def __init__(self, parent):
        super(IDProgressWindow, self).__init__(parent)

        uic.loadUi(ComicTaggerSettings.getUIFile('progresswindow.ui'), self)

        self.setWindowFlags(self.windowFlags() |
                            QtCore.Qt.WindowSystemMenuHint |
                            QtCore.Qt.WindowMaximizeButtonHint)

        reduceWidgetFontSize(self.textEdit)
    def __init__(self,
                 parent,
                 series_name,
                 issue_number,
                 year,
                 issue_count,
                 cover_index_list,
                 comic_archive,
                 settings,
                 autoselect=False,
                 literal=False):
        super(VolumeSelectionWindow, self).__init__(parent)

        uic.loadUi(ComicTaggerSettings.getUIFile("volumeselectionwindow.ui"),
                   self)

        self.imageWidget = CoverImageWidget(self.imageContainer,
                                            CoverImageWidget.URLMode)
        gridlayout = QtWidgets.QGridLayout(self.imageContainer)
        gridlayout.addWidget(self.imageWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        reduceWidgetFontSize(self.teDetails, 1)
        reduceWidgetFontSize(self.twList)

        self.setWindowFlags(self.windowFlags() | QtCore.Qt.WindowSystemMenuHint
                            | QtCore.Qt.WindowMaximizeButtonHint)

        self.settings = settings
        self.parent = parent
        self.series_name = series_name
        self.issue_number = issue_number
        self.year = year
        self.issue_count = issue_count
        self.volume_id = 0
        self.comic_archive = comic_archive
        self.immediate_autoselect = autoselect
        self.cover_index_list = cover_index_list
        self.cv_search_results = None
        self.literal = literal

        self.twList.resizeColumnsToContents()
        self.twList.currentItemChanged.connect(self.currentItemChanged)
        self.twList.cellDoubleClicked.connect(self.cellDoubleClicked)
        self.btnRequery.clicked.connect(self.requery)
        self.btnIssues.clicked.connect(self.showIssues)
        self.btnAutoSelect.clicked.connect(self.autoSelect)

        self.updateButtons()
        self.performQuery()
        self.twList.selectRow(0)
    def __init__(self, parent, settings, series_id, issue_number):
        super(IssueSelectionWindow, self).__init__(parent)

        uic.loadUi(
            ComicTaggerSettings.getUIFile('issueselectionwindow.ui'), self)

        self.coverWidget = CoverImageWidget(
            self.coverImageContainer, CoverImageWidget.AltCoverMode)
        gridlayout = QtGui.QGridLayout(self.coverImageContainer)
        gridlayout.addWidget(self.coverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        reduceWidgetFontSize(self.twList)
        reduceWidgetFontSize(self.teDescription, 1)

        self.setWindowFlags(self.windowFlags() |
                            QtCore.Qt.WindowSystemMenuHint |
                            QtCore.Qt.WindowMaximizeButtonHint)

        self.series_id = series_id
        self.settings = settings
        self.url_fetch_thread = None

        if issue_number is None or issue_number == "":
            self.issue_number = 1
        else:
            self.issue_number = issue_number

        self.initial_id = None
        self.performQuery()

        self.twList.resizeColumnsToContents()
        self.twList.currentItemChanged.connect(self.currentItemChanged)
        self.twList.cellDoubleClicked.connect(self.cellDoubleClicked)

        # now that the list has been sorted, find the initial record, and
        # select it
        if self.initial_id is None:
            self.twList.selectRow(0)
        else:
            for r in range(0, self.twList.rowCount()):
                issue_id, b = self.twList.item(
                    r, 0).data(QtCore.Qt.UserRole).toInt()
                if (issue_id == self.initial_id):
                    self.twList.selectRow(r)
                    break
Exemple #12
0
    def __init__(self, parent, settings, series_id, issue_number):
        super(IssueSelectionWindow, self).__init__(parent)

        uic.loadUi(ComicTaggerSettings.getUIFile('issueselectionwindow.ui'),
                   self)

        self.coverWidget = CoverImageWidget(self.coverImageContainer,
                                            CoverImageWidget.AltCoverMode)
        gridlayout = QtGui.QGridLayout(self.coverImageContainer)
        gridlayout.addWidget(self.coverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        reduceWidgetFontSize(self.twList)
        reduceWidgetFontSize(self.teDescription, 1)

        self.setWindowFlags(self.windowFlags() | QtCore.Qt.WindowSystemMenuHint
                            | QtCore.Qt.WindowMaximizeButtonHint)

        self.series_id = series_id
        self.settings = settings
        self.url_fetch_thread = None

        if issue_number is None or issue_number == "":
            self.issue_number = 1
        else:
            self.issue_number = issue_number

        self.initial_id = None
        self.performQuery()

        self.twList.resizeColumnsToContents()
        self.twList.currentItemChanged.connect(self.currentItemChanged)
        self.twList.cellDoubleClicked.connect(self.cellDoubleClicked)

        # now that the list has been sorted, find the initial record, and
        # select it
        if self.initial_id is None:
            self.twList.selectRow(0)
        else:
            for r in range(0, self.twList.rowCount()):
                issue_id, b = self.twList.item(r, 0).data(
                    QtCore.Qt.UserRole).toInt()
                if (issue_id == self.initial_id):
                    self.twList.selectRow(r)
                    break
Exemple #13
0
    def __init__(self, parent, match_set_list, style, fetch_func):
        super(AutoTagMatchWindow, self).__init__(parent)

        uic.loadUi(
            ComicTaggerSettings.getUIFile('matchselectionwindow.ui'), self)

        self.altCoverWidget = CoverImageWidget(
            self.altCoverContainer, CoverImageWidget.AltCoverMode)
        gridlayout = QtGui.QGridLayout(self.altCoverContainer)
        gridlayout.addWidget(self.altCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        self.archiveCoverWidget = CoverImageWidget(
            self.archiveCoverContainer, CoverImageWidget.ArchiveMode)
        gridlayout = QtGui.QGridLayout(self.archiveCoverContainer)
        gridlayout.addWidget(self.archiveCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        reduceWidgetFontSize(self.twList)
        reduceWidgetFontSize(self.teDescription, 1)

        self.setWindowFlags(self.windowFlags() |
                            QtCore.Qt.WindowSystemMenuHint |
                            QtCore.Qt.WindowMaximizeButtonHint)

        self.skipButton = QtGui.QPushButton(self.tr("Skip to Next"))
        self.buttonBox.addButton(
            self.skipButton, QtGui.QDialogButtonBox.ActionRole)
        self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setText(
            "Accept and Write Tags")

        self.match_set_list = match_set_list
        self.style = style
        self.fetch_func = fetch_func

        self.current_match_set_idx = 0

        self.twList.currentItemChanged.connect(self.currentItemChanged)
        self.twList.cellDoubleClicked.connect(self.cellDoubleClicked)
        self.skipButton.clicked.connect(self.skipToNext)

        self.updateData()
    def __init__(self, parent, series_name, issue_number, year, issue_count,
                 cover_index_list, comic_archive, settings, autoselect=False):
        super(VolumeSelectionWindow, self).__init__(parent)

        uic.loadUi(
            ComicTaggerSettings.getUIFile('volumeselectionwindow.ui'), self)

        self.imageWidget = CoverImageWidget(
            self.imageContainer, CoverImageWidget.URLMode)
        gridlayout = QtGui.QGridLayout(self.imageContainer)
        gridlayout.addWidget(self.imageWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        reduceWidgetFontSize(self.teDetails, 1)
        reduceWidgetFontSize(self.twList)

        self.setWindowFlags(self.windowFlags() |
                            QtCore.Qt.WindowSystemMenuHint |
                            QtCore.Qt.WindowMaximizeButtonHint)

        self.settings = settings
        self.series_name = series_name
        self.issue_number = issue_number
        self.year = year
        self.issue_count = issue_count
        self.volume_id = 0
        self.comic_archive = comic_archive
        self.immediate_autoselect = autoselect
        self.cover_index_list = cover_index_list
        self.cv_search_results = None

        self.twList.resizeColumnsToContents()
        self.twList.currentItemChanged.connect(self.currentItemChanged)
        self.twList.cellDoubleClicked.connect(self.cellDoubleClicked)
        self.btnRequery.clicked.connect(self.requery)
        self.btnIssues.clicked.connect(self.showIssues)
        self.btnAutoSelect.clicked.connect(self.autoSelect)

        self.updateButtons()
        self.performQuery()
        self.twList.selectRow(0)
Exemple #15
0
    def __init__(self, parent, match_set_list, style, fetch_func):
        super(AutoTagMatchWindow, self).__init__(parent)

        uic.loadUi(ComicTaggerSettings.getUIFile("matchselectionwindow.ui"),
                   self)

        self.altCoverWidget = CoverImageWidget(self.altCoverContainer,
                                               CoverImageWidget.AltCoverMode)
        gridlayout = QtWidgets.QGridLayout(self.altCoverContainer)
        gridlayout.addWidget(self.altCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        self.archiveCoverWidget = CoverImageWidget(
            self.archiveCoverContainer, CoverImageWidget.ArchiveMode)
        gridlayout = QtWidgets.QGridLayout(self.archiveCoverContainer)
        gridlayout.addWidget(self.archiveCoverWidget)
        gridlayout.setContentsMargins(0, 0, 0, 0)

        reduceWidgetFontSize(self.twList)
        reduceWidgetFontSize(self.teDescription, 1)

        self.setWindowFlags(self.windowFlags() | QtCore.Qt.WindowSystemMenuHint
                            | QtCore.Qt.WindowMaximizeButtonHint)

        self.skipButton = QtWidgets.QPushButton(self.tr("Skip to Next"))
        self.buttonBox.addButton(self.skipButton,
                                 QtWidgets.QDialogButtonBox.ActionRole)
        self.buttonBox.button(
            QtWidgets.QDialogButtonBox.Ok).setText("Accept and Write Tags")

        self.match_set_list = match_set_list
        self.style = style
        self.fetch_func = fetch_func

        self.current_match_set_idx = 0

        self.twList.currentItemChanged.connect(self.currentItemChanged)
        self.twList.cellDoubleClicked.connect(self.cellDoubleClicked)
        self.skipButton.clicked.connect(self.skipToNext)

        self.updateData()