Beispiel #1
0
    def accept(self):
        # Update the config with new values:
        self.cfg.config.set("SCORING", "book", str(self.ui.bookVal.text()))
        self.cfg.config.set("SCORING", "bookdr", str(self.ui.bookDrVal.text()))
        self.cfg.config.set("SCORING", "manga", str(self.ui.mangaVal.text()))
        self.cfg.config.set("SCORING", "lyric", str(self.ui.lyricVal.text()))
        self.cfg.config.set("SCORING", "web", str(self.ui.webVal.text()))
        self.cfg.config.set("SCORING", "news", str(self.ui.newsVal.text()))
        self.cfg.config.set("SCORING", "fullgame", str(self.ui.flgameVal.text()))
        self.cfg.config.set("SCORING", "game", str(self.ui.gameVal.text()))
        self.cfg.config.set("SCORING", "nico", str(self.ui.nicoVal.text()))
        self.cfg.config.set("SCORING", "subs", str(self.ui.subsVal.text()))
        self.cfg.config.set("SCORING", "sentences", str(self.ui.sentVal.text()))

        if self.ui.twitterOn.isChecked():
            self.cfg.config.set("OTHER", "twitter", "True")
        else:
            self.cfg.config.set("OTHER", "twitter", "False")

        QtGui.QDialog.accept(self)

if __name__ == '__main__':
    import sys
    app = QtGui.QApplication(sys.argv)
    dlg = QtGui.QDialog()
    ui = Ui_ConfigDlg()
    ui.setupUi(dlg)
    dlg.show()
    sys.exit(app.exec_())
        self.btnSelectAll.setObjectName(_fromUtf8("btnSelectAll"))
        self.gridLayout.addWidget(self.btnSelectAll, 2, 1, 1, 1)
        self.btnClearSelection = QtGui.QPushButton(ExportTariff_Wizard_1)
        self.btnClearSelection.setObjectName(_fromUtf8("btnClearSelection"))
        self.gridLayout.addWidget(self.btnClearSelection, 2, 2, 1, 1)

        self.retranslateUi(ExportTariff_Wizard_1)
        QtCore.QMetaObject.connectSlotsByName(ExportTariff_Wizard_1)
        ExportTariff_Wizard_1.setTabOrder(self.chkExportAll, self.tblItems)
        ExportTariff_Wizard_1.setTabOrder(self.tblItems, self.btnSelectAll)
        ExportTariff_Wizard_1.setTabOrder(self.btnSelectAll, self.btnClearSelection)

    def retranslateUi(self, ExportTariff_Wizard_1):
        ExportTariff_Wizard_1.setWindowTitle(QtGui.QApplication.translate("ExportTariff_Wizard_1", "Выбор экспортируемых тарифов", None, QtGui.QApplication.UnicodeUTF8))
        self.chkExportAll.setText(QtGui.QApplication.translate("ExportTariff_Wizard_1", "Выгружать всё", None, QtGui.QApplication.UnicodeUTF8))
        self.tblItems.setWhatsThis(QtGui.QApplication.translate("ExportTariff_Wizard_1", "список записей", "ура!", QtGui.QApplication.UnicodeUTF8))
        self.btnSelectAll.setText(QtGui.QApplication.translate("ExportTariff_Wizard_1", "Выбрать все", None, QtGui.QApplication.UnicodeUTF8))
        self.btnClearSelection.setText(QtGui.QApplication.translate("ExportTariff_Wizard_1", "Очистить", None, QtGui.QApplication.UnicodeUTF8))

from library.InDocTable import CInDocTableView

if __name__ == "__main__":
    import sys
    app = QtGui.QApplication(sys.argv)
    ExportTariff_Wizard_1 = QtGui.QDialog()
    ui = Ui_ExportTariff_Wizard_1()
    ui.setupUi(ExportTariff_Wizard_1)
    ExportTariff_Wizard_1.show()
    sys.exit(app.exec_())

Beispiel #3
0
            _translate("minpatchDialog", "Marxan output folder:", None))
        self.listLabel.setText(
            _translate("minpatchDialog", "Marxan files to analyse", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab1),
            _translate("minpatchDialog", "Standard options", None))
        self.removeCheckBox.setText(
            _translate("minpatchDialog", "Remove small patches", None))
        self.addCheckBox.setText(
            _translate("minpatchDialog", "Add patches", None))
        self.whittleCheckBox.setText(
            _translate("minpatchDialog", "Simulated whittling", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab2),
            _translate("minpatchDialog", "Advanced options", None))
        self.startButton.setText(
            _translate("minpatchDialog", "Start MinPatch", None))
        self.closeButton.setText(_translate("minpatchDialog", "Close", None))


import resources_rc

if __name__ == "__main__":
    import sys
    app = QtGui.QApplication(sys.argv)
    minpatchDialog = QtGui.QDialog()
    ui = Ui_minpatchDialog()
    ui.setupUi(minpatchDialog)
    minpatchDialog.show()
    sys.exit(app.exec_())