def __init__(self, parent=None): QWizard.__init__(self, parent) self.setupUi(self) self._SERIAL_BAUDRATE = 115200 self._list_serial_ports() self._serial_port_status = False self._test_serial_port_status = False self._test_thread = UDCTest() self._flash_firmware = LoadFirmware() self._initialize_widgets() self._initialize_signals() self._initialize_wizard_buttons() #test status self._test_firmware_loaded = False self._test_firmware_loaded_sucess = False self._load_final_firmware_status = False self._leds_status = False self._buzzer_status = False self._communication_status = False self._test_result = False self._test_finished_status = False
def __init__(self, mainGui): QWizard.__init__(self, mainGui) logger.debug("Initialising GuiProjectWizard ...") self.setObjectName("GuiProjectWizard") self.mainConf = novelwriter.CONFIG self.mainGui = mainGui self.mainTheme = mainGui.mainTheme self.sideImage = self.mainTheme.loadDecoration( "wiz-back", None, self.mainConf.pxInt(370)) self.setWizardStyle(QWizard.ModernStyle) self.setPixmap(QWizard.WatermarkPixmap, self.sideImage) self.introPage = ProjWizardIntroPage(self) self.storagePage = ProjWizardFolderPage(self) self.popPage = ProjWizardPopulatePage(self) self.customPage = ProjWizardCustomPage(self) self.finalPage = ProjWizardFinalPage(self) self.setPage(PAGE_INTRO, self.introPage) self.setPage(PAGE_STORE, self.storagePage) self.setPage(PAGE_POP, self.popPage) self.setPage(PAGE_CUSTOM, self.customPage) self.setPage(PAGE_FINAL, self.finalPage) self.setOption(QWizard.NoBackButtonOnStartPage, True) logger.debug("GuiProjectWizard initialisation complete") return
def __init__(self, export_list, export_model, suggested_name=None, parent=None): QWizard.__init__(self, parent=parent) self.setupUi(self) self.settings_manager = injector.get_settings_manager() self.export_list = export_list self.export_model = export_model if suggested_name is None: name = f"{datetime.now().strftime('%m-%d-%Y--%H-%M-%S')} Export" else: name = suggested_name self.export_path_line_edit.setText( system_util.join_path(self.settings_manager.export_file_path, name)) self.path_dialog_button.clicked.connect(self.select_export_path) self.json_export_map = { 'RedditObjectList': json_exporter.export_reddit_object_list_to_json, 'RedditObject': json_exporter.export_reddit_objects_to_json, 'Post': json_exporter.export_posts_to_json, 'Comment': json_exporter.export_comments_to_json, 'Content': json_exporter.export_content_to_json, } self.csv_export_radio.toggled.connect(self.toggle_nested_page)
def __init__(self): QWizard.__init__(self) self.addPage(BclPage()) self.addPage(BclRunPage()) self.addPage(SnakePage()) self.addPage(SnakeRunPage())
def __init__(self, parent=None): QWizard.__init__(self, parent) self.ui = Ui_placeProjectWizard() self.ui.setupUi(self) self.enabledPlugins = [] self.selectedPlugins = [] self.PluginManager = None self.SearchConfigPluginConfigurationListModel = None # Register the project name field so that it will become mandatory self.page(0).registerField('name*', self.ui.placeProjectNameValue) self.unit = 'km' self.myPyObj = self.PyObj()
def __init__(self, parent=None): QWizard.__init__(self, parent) self.setupUi(self) self._SERIAL_BAUDRATE = 6000000 self._list_serial_ports() self._serial_port_status = False self._test_serial_port_status = False self._test_thread = PowerModuleTest() self._initialize_widgets() self._initialize_signals() self._initialize_wizard_buttons()
def __init__(self, parent=None): QWizard.__init__(self, parent) self.ui = Ui_personProjectWizard() self.ui.setupUi(self) self.selectedTargets = [] self.enabledPlugins = [] self.ProjectWizardPossibleTargetsTable = None self.PluginManager = None self.SearchConfigPluginConfigurationListModel = None # Register the project name field so that it will become mandatory self.page(0).registerField('name*', self.ui.personProjectNameValue) self.ui.btnAddTarget.clicked.connect(self.addTargetsToSelected) self.ui.btnRemoveTarget.clicked.connect(self.removeTargetsFromSelected) self.ui.personProjectSearchForValue.returnPressed.connect( self.ui.personProjectSearchButton.setFocus)
def __init__(self, parent=None): QWizard.__init__(self, parent) self.setupUi(self) self._SERIAL_BAUDRATE = 6000000 self._list_serial_ports() self._serial_port_status = False self._test_communication_status = False self._status_load_firmware = False self._boardsinfo = [] self._test_thread = HRADCTest() self._initialize_widgets() self._initialize_signals() self._initialize_wizard_buttons()
def __init__(self, app_settings): QWizard.__init__(self) self.app_settings = app_settings layout = [ QWizard.Stretch, QWizard.BackButton, QWizard.NextButton, QWizard.FinishButton, QWizard.CancelButton ] self.setButtonLayout(layout) self.setOptions(self.NoBackButtonOnStartPage) if getattr(sys, 'frozen', False): self.dir_path = os.path.dirname(sys.executable) else: self.dir_path = os.path.dirname(os.path.realpath(__file__)) self.setWizardStyle(QWizard.ModernStyle) self.setWindowTitle("MQT First Run Wizard") self.setPixmap(QWizard.WatermarkPixmap, QPixmap(os.path.join(self.dir_path, "watermark.png"))) self.first_name = '' self.surname = '' self.email = '' self.first_name_edit = None self.surname_edit = None self.email_edit = None self.server_address = '' self.class_key = '' self.ssl_checkbox = None self.server_address_edit = None self.class_key_edit = None self.setPage(1, self.intro()) self.setPage(2, self.user_info()) self.setPage(3, self.server_details()) self.setPage(4, self.complete()) self.setStartId(1)
def __init__(self): QWizard.__init__(self, flags=Qt.Widget) self.init_widget() self.init_pages()
def __init__(self, parent=None, db="", config="", ng=None): """ Constructor """ QWizard.__init__(self, parent) self.setupUi(self) self.URLgroupBox.setVisible(True) self.URLFileGroupBox.setVisible(False) self.bingGroupBox.setVisible(False) self.ng = ng self.db = db if db: self.currentDatabase = db.name else: self.currentDatabase = "" self.configName.setText(config) self.problemBox.hide() self.selectedBaseGroupBox.setTitle("selected base: " + self.currentDatabase) self.coreLabel.setText("This computer has %i cores." % QThread.idealThreadCount()) self.expertButton = self.button(self.CustomButton1) self.expertButton.setIcon( QtGui.QIcon(QtGui.QPixmap(":images/images/expert.png"))) self.expertButton.setToolTip("toggle expert mode") self.expertButton.setCheckable(True) # self.expertButton.toggle() self.expertObjects = [ "baseInfoFrame", "takePdf", "pageIgnoreCase", "defaultEncodingFrame", "textLabelMaxSubdomains", "maxSubdomains", "pathGroupBox", "linkRestriction", "spiderTraps", "timeout", "trytimes", "timeoutsec", "followRedirects", "parallelGroupBox", "identityGroupBox", "politenessGroupBox", "proxyGroupBox", "levelFrom", "levelTo", "levelFromLabel", "levelToLabel" ] self.expert(self.expertButton.isChecked()) self.diskSizeInfoLabel.setText("of the " + str( utils.get_free_space( os.path.join(os.path.expanduser('~'), "gromoteur", "corpora")) ) + " Mb of free space in the corpus folder") for lang in sorted(self.ng.alllangs.values()): self.language.addItem(str(lang)) for ua in userAgents: self.userAgent.addItem(str(ua)) # print "*********************************" self.checkConfigName() # print "============", list(self.findChildren(QtGui.QCheckBox,QtCore.QRegExp(r'\w*'))) # self.specialStringObjectList=[self.searchEngineQuery] self.stringObjectList = list(self.findChildren(QtWidgets.QLineEdit)) self.stringObjectList = [ c for c in self.stringObjectList if c.objectName() != "qt_spinbox_lineedit" and not c.isReadOnly() and c.objectName() != "configName" ] self.checkObjectList = list( self.findChildren(QtWidgets.QCheckBox)) + list( self.findChildren(QtWidgets.QGroupBox)) + list( self.findChildren( QtWidgets.QRadioButton)) + [self.expertButton] self.checkObjectList = [ c for c in self.checkObjectList if c.isCheckable() ] self.valueObjectList = list(self.findChildren(QtWidgets.QSpinBox)) self.valueObjectList = [ c for c in self.valueObjectList if not c.isReadOnly() ] self.comboObjectList = list(self.findChildren(QtWidgets.QComboBox)) self.nbpages.setText(str(self.db.nbPages)) self.nbsentences.setText(str(self.db.nbSentences)) self.nbwords.setText(str(self.db.nbCharacters)) self.comments.setPlainText(self.db.comments) if self.db.nbPages == 0: self.fromdatabase.setEnabled(False) self.fromdatabase.setChecked(False) self.dataErase.setChecked(True) else: self.fromdatabase.setEnabled(True) self.lff = LoseFocusFilter(self) self.downloadURL.installEventFilter(self.lff) self.downloadAvoidURL.installEventFilter(self.lff) self.pageRestriction.installEventFilter(self.lff) self.linkDomain.installEventFilter(self.lff) self.linkAvoidURL.installEventFilter(self.lff) self.downloadURL.wiz = self self.downloadAvoidURL.wiz = self self.pageRestriction.wiz = self self.linkDomain.wiz = self self.linkAvoidURL.wiz = self self.language.setEnabled(True) self.webSearchUrl = None