Example #1
0
class Ui_connectForm(object):
    def setupUi(self, connectForm):
        connectForm.setObjectName(_fromUtf8("connectForm"))
        connectForm.resize(655, 33)
        connectForm.setWindowTitle(_fromUtf8(""))
        self.horizontalLayout = QtGui.QHBoxLayout(connectForm)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.closeButton = KPushButton(connectForm)
        self.closeButton.setFlat(True)
        self.closeButton.setObjectName(_fromUtf8("closeButton"))
        self.horizontalLayout.addWidget(self.closeButton)
        self.urlLabel = QtGui.QLabel(connectForm)
        self.urlLabel.setObjectName(_fromUtf8("urlLabel"))
        self.horizontalLayout.addWidget(self.urlLabel)
        self.danbooruUrlComboBox = KComboBox(connectForm)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.danbooruUrlComboBox.sizePolicy().hasHeightForWidth())
        self.danbooruUrlComboBox.setSizePolicy(sizePolicy)
        self.danbooruUrlComboBox.setEditable(False)
        self.danbooruUrlComboBox.setObjectName(
            _fromUtf8("danbooruUrlComboBox"))
        self.horizontalLayout.addWidget(self.danbooruUrlComboBox)
        self.userLabel = QtGui.QLabel(connectForm)
        self.userLabel.setObjectName(_fromUtf8("userLabel"))
        self.horizontalLayout.addWidget(self.userLabel)
        self.userLineEdit = KLineEdit(connectForm)
        self.userLineEdit.setObjectName(_fromUtf8("userLineEdit"))
        self.horizontalLayout.addWidget(self.userLineEdit)
        self.passwordLabel = QtGui.QLabel(connectForm)
        self.passwordLabel.setObjectName(_fromUtf8("passwordLabel"))
        self.horizontalLayout.addWidget(self.passwordLabel)
        self.passwdLineEdit = KLineEdit(connectForm)
        self.passwdLineEdit.setPasswordMode(True)
        self.passwdLineEdit.setObjectName(_fromUtf8("passwdLineEdit"))
        self.horizontalLayout.addWidget(self.passwdLineEdit)
        self.buttonBox = KDialogButtonBox(connectForm)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.horizontalLayout.addWidget(self.buttonBox)

        self.retranslateUi(connectForm)
        QtCore.QMetaObject.connectSlotsByName(connectForm)

    def retranslateUi(self, connectForm):
        self.urlLabel.setText(kdecore.i18n(_fromUtf8("Danbooru URL")))
        self.userLabel.setText(kdecore.i18n(_fromUtf8("Username")))
        self.userLineEdit.setClickMessage(
            kdecore.i18n(_fromUtf8("Danbooru username (optional)")))
        self.passwordLabel.setText(kdecore.i18n(_fromUtf8("Password")))
        self.passwdLineEdit.setClickMessage(
            kdecore.i18n(_fromUtf8("Danbooru password (optional)")))
class Ui_connectForm(object):
    def setupUi(self, connectForm):
        connectForm.setObjectName(_fromUtf8("connectForm"))
        connectForm.resize(655, 33)
        connectForm.setWindowTitle(_fromUtf8(""))
        self.horizontalLayout = QtGui.QHBoxLayout(connectForm)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.closeButton = KPushButton(connectForm)
        self.closeButton.setFlat(True)
        self.closeButton.setObjectName(_fromUtf8("closeButton"))
        self.horizontalLayout.addWidget(self.closeButton)
        self.urlLabel = QtGui.QLabel(connectForm)
        self.urlLabel.setObjectName(_fromUtf8("urlLabel"))
        self.horizontalLayout.addWidget(self.urlLabel)
        self.danbooruUrlComboBox = KComboBox(connectForm)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.danbooruUrlComboBox.sizePolicy().hasHeightForWidth())
        self.danbooruUrlComboBox.setSizePolicy(sizePolicy)
        self.danbooruUrlComboBox.setEditable(False)
        self.danbooruUrlComboBox.setObjectName(_fromUtf8("danbooruUrlComboBox"))
        self.horizontalLayout.addWidget(self.danbooruUrlComboBox)
        self.userLabel = QtGui.QLabel(connectForm)
        self.userLabel.setObjectName(_fromUtf8("userLabel"))
        self.horizontalLayout.addWidget(self.userLabel)
        self.userLineEdit = KLineEdit(connectForm)
        self.userLineEdit.setObjectName(_fromUtf8("userLineEdit"))
        self.horizontalLayout.addWidget(self.userLineEdit)
        self.passwordLabel = QtGui.QLabel(connectForm)
        self.passwordLabel.setObjectName(_fromUtf8("passwordLabel"))
        self.horizontalLayout.addWidget(self.passwordLabel)
        self.passwdLineEdit = KLineEdit(connectForm)
        self.passwdLineEdit.setPasswordMode(True)
        self.passwdLineEdit.setObjectName(_fromUtf8("passwdLineEdit"))
        self.horizontalLayout.addWidget(self.passwdLineEdit)
        self.buttonBox = KDialogButtonBox(connectForm)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.horizontalLayout.addWidget(self.buttonBox)

        self.retranslateUi(connectForm)
        QtCore.QMetaObject.connectSlotsByName(connectForm)

    def retranslateUi(self, connectForm):
        self.urlLabel.setText(kdecore.i18n(_fromUtf8("Danbooru URL")))
        self.userLabel.setText(kdecore.i18n(_fromUtf8("Username")))
        self.userLineEdit.setClickMessage(kdecore.i18n(_fromUtf8("Danbooru username (optional)")))
        self.passwordLabel.setText(kdecore.i18n(_fromUtf8("Password")))
        self.passwdLineEdit.setClickMessage(kdecore.i18n(_fromUtf8("Danbooru password (optional)")))
class Ui_FetchDialog(object):
    def setupUi(self, FetchDialog):
        FetchDialog.setObjectName(_fromUtf8("FetchDialog"))
        FetchDialog.resize(662, 31)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(FetchDialog.sizePolicy().hasHeightForWidth())
        FetchDialog.setSizePolicy(sizePolicy)
        FetchDialog.setWindowTitle(_fromUtf8(""))
        self.horizontalLayout = QtGui.QHBoxLayout(FetchDialog)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.closeButton = KPushButton(FetchDialog)
        self.closeButton.setFlat(True)
        self.closeButton.setObjectName(_fromUtf8("closeButton"))
        self.horizontalLayout.addWidget(self.closeButton)
        self.ratingLabel = QtGui.QLabel(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ratingLabel.sizePolicy().hasHeightForWidth())
        self.ratingLabel.setSizePolicy(sizePolicy)
        self.ratingLabel.setObjectName(_fromUtf8("ratingLabel"))
        self.horizontalLayout.addWidget(self.ratingLabel)
        self.ratingComboBox = KComboBox(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ratingComboBox.sizePolicy().hasHeightForWidth())
        self.ratingComboBox.setSizePolicy(sizePolicy)
        self.ratingComboBox.setObjectName(_fromUtf8("ratingComboBox"))
        self.ratingComboBox.addItem(_fromUtf8(""))
        self.ratingComboBox.addItem(_fromUtf8(""))
        self.ratingComboBox.addItem(_fromUtf8(""))
        self.horizontalLayout.addWidget(self.ratingComboBox)
        self.postLabel = QtGui.QLabel(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.postLabel.sizePolicy().hasHeightForWidth())
        self.postLabel.setSizePolicy(sizePolicy)
        self.postLabel.setObjectName(_fromUtf8("postLabel"))
        self.horizontalLayout.addWidget(self.postLabel)
        self.postSpinBox = KIntSpinBox(FetchDialog)
        self.postSpinBox.setMinimum(1)
        self.postSpinBox.setMaximum(100)
        self.postSpinBox.setObjectName(_fromUtf8("postSpinBox"))
        self.horizontalLayout.addWidget(self.postSpinBox)
        self.tagLabel = QtGui.QLabel(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.tagLabel.sizePolicy().hasHeightForWidth())
        self.tagLabel.setSizePolicy(sizePolicy)
        self.tagLabel.setObjectName(_fromUtf8("tagLabel"))
        self.horizontalLayout.addWidget(self.tagLabel)
        self.tagLineEdit = KLineEdit(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.tagLineEdit.sizePolicy().hasHeightForWidth())
        self.tagLineEdit.setSizePolicy(sizePolicy)
        self.tagLineEdit.setObjectName(_fromUtf8("tagLineEdit"))
        self.horizontalLayout.addWidget(self.tagLineEdit)
        self.downloadButton = KPushButton(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.downloadButton.sizePolicy().hasHeightForWidth())
        self.downloadButton.setSizePolicy(sizePolicy)
        self.downloadButton.setObjectName(_fromUtf8("downloadButton"))
        self.horizontalLayout.addWidget(self.downloadButton)

        self.retranslateUi(FetchDialog)
        QtCore.QMetaObject.connectSlotsByName(FetchDialog)

    def retranslateUi(self, FetchDialog):
        self.ratingLabel.setText(kdecore.i18n(_fromUtf8("Maximum rating: ")))
        self.ratingComboBox.setItemText(0, kdecore.i18n(_fromUtf8("Safe")))
        self.ratingComboBox.setItemText(1, kdecore.i18n(_fromUtf8("Questionable")))
        self.ratingComboBox.setItemText(2, kdecore.i18n(_fromUtf8("Explicit")))
        self.postLabel.setText(kdecore.i18n(_fromUtf8("Posts to retrieve:")))
        self.postSpinBox.setToolTip(kdecore.i18n(_fromUtf8("Number of posts to retrieve (max 100)")))
        self.postSpinBox.setWhatsThis(
            kdecore.i18n(
                _fromUtf8(
                    "The number of posts to retrieve. Notice that Danbooru limits the maximum number of posts to 100."
                )
            )
        )
        self.tagLabel.setText(kdecore.i18n(_fromUtf8("Tags:")))
        self.tagLineEdit.setToolTip(kdecore.i18n(_fromUtf8("Tags to include in search (optional)")))
        self.tagLineEdit.setWhatsThis(
            kdecore.i18n(
                _fromUtf8(
                    "Input here the tags that should be used when looking for posts. Separate them with commas, without spaces."
                )
            )
        )
        self.tagLineEdit.setClickMessage(kdecore.i18n(_fromUtf8("Tags, comma separated")))
        self.downloadButton.setText(kdecore.i18n(_fromUtf8("Download")))
class Ui_FetchDialog(object):
    def setupUi(self, FetchDialog):
        FetchDialog.setObjectName(_fromUtf8("FetchDialog"))
        FetchDialog.resize(662, 31)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            FetchDialog.sizePolicy().hasHeightForWidth())
        FetchDialog.setSizePolicy(sizePolicy)
        FetchDialog.setWindowTitle(_fromUtf8(""))
        self.horizontalLayout = QtGui.QHBoxLayout(FetchDialog)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.closeButton = KPushButton(FetchDialog)
        self.closeButton.setFlat(True)
        self.closeButton.setObjectName(_fromUtf8("closeButton"))
        self.horizontalLayout.addWidget(self.closeButton)
        self.ratingLabel = QtGui.QLabel(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.ratingLabel.sizePolicy().hasHeightForWidth())
        self.ratingLabel.setSizePolicy(sizePolicy)
        self.ratingLabel.setObjectName(_fromUtf8("ratingLabel"))
        self.horizontalLayout.addWidget(self.ratingLabel)
        self.ratingComboBox = KComboBox(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.ratingComboBox.sizePolicy().hasHeightForWidth())
        self.ratingComboBox.setSizePolicy(sizePolicy)
        self.ratingComboBox.setObjectName(_fromUtf8("ratingComboBox"))
        self.ratingComboBox.addItem(_fromUtf8(""))
        self.ratingComboBox.addItem(_fromUtf8(""))
        self.ratingComboBox.addItem(_fromUtf8(""))
        self.horizontalLayout.addWidget(self.ratingComboBox)
        self.postLabel = QtGui.QLabel(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.postLabel.sizePolicy().hasHeightForWidth())
        self.postLabel.setSizePolicy(sizePolicy)
        self.postLabel.setObjectName(_fromUtf8("postLabel"))
        self.horizontalLayout.addWidget(self.postLabel)
        self.postSpinBox = KIntSpinBox(FetchDialog)
        self.postSpinBox.setMinimum(1)
        self.postSpinBox.setMaximum(100)
        self.postSpinBox.setObjectName(_fromUtf8("postSpinBox"))
        self.horizontalLayout.addWidget(self.postSpinBox)
        self.tagLabel = QtGui.QLabel(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.tagLabel.sizePolicy().hasHeightForWidth())
        self.tagLabel.setSizePolicy(sizePolicy)
        self.tagLabel.setObjectName(_fromUtf8("tagLabel"))
        self.horizontalLayout.addWidget(self.tagLabel)
        self.tagLineEdit = KLineEdit(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.tagLineEdit.sizePolicy().hasHeightForWidth())
        self.tagLineEdit.setSizePolicy(sizePolicy)
        self.tagLineEdit.setObjectName(_fromUtf8("tagLineEdit"))
        self.horizontalLayout.addWidget(self.tagLineEdit)
        self.downloadButton = KPushButton(FetchDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.downloadButton.sizePolicy().hasHeightForWidth())
        self.downloadButton.setSizePolicy(sizePolicy)
        self.downloadButton.setObjectName(_fromUtf8("downloadButton"))
        self.horizontalLayout.addWidget(self.downloadButton)

        self.retranslateUi(FetchDialog)
        QtCore.QMetaObject.connectSlotsByName(FetchDialog)

    def retranslateUi(self, FetchDialog):
        self.ratingLabel.setText(kdecore.i18n(_fromUtf8("Maximum rating: ")))
        self.ratingComboBox.setItemText(0, kdecore.i18n(_fromUtf8("Safe")))
        self.ratingComboBox.setItemText(
            1, kdecore.i18n(_fromUtf8("Questionable")))
        self.ratingComboBox.setItemText(2, kdecore.i18n(_fromUtf8("Explicit")))
        self.postLabel.setText(kdecore.i18n(_fromUtf8("Posts to retrieve:")))
        self.postSpinBox.setToolTip(
            kdecore.i18n(_fromUtf8("Number of posts to retrieve (max 100)")))
        self.postSpinBox.setWhatsThis(
            kdecore.i18n(
                _fromUtf8(
                    "The number of posts to retrieve. Notice that Danbooru limits the maximum number of posts to 100."
                )))
        self.tagLabel.setText(kdecore.i18n(_fromUtf8("Tags:")))
        self.tagLineEdit.setToolTip(
            kdecore.i18n(_fromUtf8("Tags to include in search (optional)")))
        self.tagLineEdit.setWhatsThis(
            kdecore.i18n(
                _fromUtf8(
                    "Input here the tags that should be used when looking for posts. Separate them with commas, without spaces."
                )))
        self.tagLineEdit.setClickMessage(
            kdecore.i18n(_fromUtf8("Tags, comma separated")))
        self.downloadButton.setText(kdecore.i18n(_fromUtf8("Download")))