def create_configuration2_page(self): page = QWizardPage() page.setTitle("Gridsync configuration... in two easy steps") label = QLabel('<b>Step 2.</b> Select a local folder:\n\n ') label.setWordWrap(True) hbox = QWidget(self) hlayout = QHBoxLayout(hbox) self.folder_text = QLineEdit(hbox) button = QPushButton('Select Folder', self) button.clicked.connect(self.get_folder) hlayout.addWidget(self.folder_text) hlayout.addWidget(button) #self.folder_label = QLabel() warning_label = QLabel('\n\n\n\nGridsync works by pairing directories on your computer with directories located on a storage grid. The folder you select here will be automatically synchronized with the address provided on the previous page.') warning_label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) #layout.addWidget(button) layout.addWidget(hbox) layout.addWidget(warning_label) page.setLayout(layout) self.addPage(page)
def runConfigWizard(self): try: api = InstagramAPI( client_id=self.options_string['hidden_client_id'], client_secret=self.options_string['hidden_client_secret'], redirect_uri=self.options_string['redirect_uri']) url = api.get_authorize_login_url() self.wizard.setWindowTitle('Instagram plugin configuration wizard') page1 = QWizardPage() layout1 = QVBoxLayout() txtArea = QLabel() txtArea.setText( 'Please copy the following link to your browser window. \n ' + 'Once you authenticate with Instagram you will be redirected to ' + 'www.geocreepy.com and get your token. Copy the token to the input field below:' ) urlArea = QLineEdit() urlArea.setObjectName('urlArea') urlArea.setText(url) inputLink = QLineEdit() inputLink.setObjectName('inputLink') labelLink = QLabel('Your token value:') openInBrowserButton = QPushButton('Open in browser') openInBrowserButton.clicked.connect( functools.partial(self.openLinkInBrowser, url)) layout1.addWidget(txtArea) layout1.addWidget(urlArea) layout1.addWidget(openInBrowserButton) layout1.addWidget(labelLink) layout1.addWidget(inputLink) page1.setLayout(layout1) self.wizard.addPage(page1) self.wizard.resize(600, 400) if self.wizard.exec_(): c = str(inputLink.text()) if c: try: access_token = api.exchange_code_for_access_token( code=c) self.options_string[ 'hidden_access_token'] = access_token[0] self.saveConfiguration(self.config) except Exception as err: logger.error(err) self.showWarning( 'Error Getting Access Token', 'Please verify that the link you pasted was correct. ' 'Try running the wizard again.') else: self.showWarning( 'Error Getting Access Token', 'Please verify that the link you pasted was correct. Try running the wizard again.' ) except Exception as err: logger.error(err) self.showWarning('Error', 'Error was {0}'.format(err))
def __init__(self, install_directory): QWizardPage.__init__(self) self.install_directory = install_directory self.setTitle("Project Information") self.setSubTitle( "Specify basic information about the project for which you " "want to generate project files.") self.setPixmap(QWizard.LogoPixmap, QPixmap(":/images/logo.svg")) self.projectNameLabel = QLabel("&Book title:") self.projectNameLineEdit = QLineEdit() self.projectNameLabel.setBuddy(self.projectNameLineEdit) self.projectNameLineEdit.setPlaceholderText("Book title") self.creatorNameLabel = QLabel("&Creator:") self.creatorNameLineEdit = QLineEdit() self.creatorNameLabel.setBuddy(self.creatorNameLineEdit) self.creatorNameLineEdit.setPlaceholderText("Book creator") self.languageLabel = QLabel("&Language:") self.language = QComboBox() self.language.setEditable(True) self.languageLabel.setBuddy(self.language) self.language.addItem("de") self.language.addItem("en") self.language.addItem("es") self.language.addItem("fr") self.language.addItem("it") self.themeLabel = QLabel("&Theme") self.theme = QComboBox() self.themeLabel.setBuddy(self.theme) dir = os.path.join(install_directory, "themes") for r, dirs, f in os.walk(dir): if r == dir: for d in dirs: self.theme.addItem(d) self.registerField("projectName*", self.projectNameLineEdit) self.registerField("creator*", self.creatorNameLineEdit) self.registerField("language", self.language, "currentText") self.registerField("theme", self.theme, "currentText") self.warning = QLabel("") self.warning.setStyleSheet("QLabel color : orange ") layout = QGridLayout() layout.addWidget(self.projectNameLabel, 0, 0) layout.addWidget(self.projectNameLineEdit, 0, 1) layout.addWidget(self.creatorNameLabel, 1, 0) layout.addWidget(self.creatorNameLineEdit, 1, 1) layout.addWidget(self.languageLabel, 2, 0) layout.addWidget(self.language, 2, 1) layout.addWidget(self.themeLabel, 3, 0) layout.addWidget(self.theme, 3, 1) layout.addWidget(self.warning, 4, 0, 1, 2) self.setLayout(layout) self.projectNameLineEdit.textChanged.connect(self.projectNameChanged)
def __init__(self, controlAPI,parent = None): QWizardPage.__init__(self, parent) self.setTitle("Create the Plot") self.control_api = controlAPI label = QLabel("This page will create a plot.") label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) self.setLayout(layout)
def __init__(self, controlAPI, parent=None): QWizardPage.__init__(self, parent) self.setTitle("Create the Plot") self.control_api = controlAPI label = QLabel("This page will create a plot.") label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) self.setLayout(layout)
def __init__(self, controlAPI,name,parent = None): QWizardPage.__init__(self, parent) self.setTitle("Connect the Plot") self.control_api = controlAPI self.uname = name label = QLabel("This page connect plot and Sine.") label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) self.setLayout(layout)
def __init__(self, controlAPI, name, parent=None): QWizardPage.__init__(self, parent) self.setTitle("Connect the Plot") self.control_api = controlAPI self.uname = name label = QLabel("This page connect plot and Sine.") label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) self.setLayout(layout)
def __init__(self): QWizardPage.__init__(self) self.setTitle("Conclusion") self.setPixmap(QWizard.WatermarkPixmap, QPixmap(":/images/wizard.png")) self.label = QLabel("Click Finish to generate the site skeleton.") self.label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(self.label) self.setLayout(layout)
def __init__(self, install_directory): QWizardPage.__init__(self) self.install_directory = install_directory self.setTitle("Site Information") self.setSubTitle( "Specify basic information about the site for which you " "want to generate site files.") self.setPixmap(QWizard.LogoPixmap, QPixmap(":/images/icon64.png")) self.siteNameLabel = QLabel("&Site title:") self.siteNameLineEdit = QLineEdit() self.siteNameLabel.setBuddy(self.siteNameLineEdit) self.siteNameLineEdit.setPlaceholderText("Site title") self.descriptionLabel = QLabel("&Description:") self.descriptionLineEdit = QLineEdit() self.descriptionLabel.setBuddy(self.descriptionLineEdit) self.descriptionLineEdit.setPlaceholderText("Site description") self.copyrightLabel = QLabel("&Copyright") self.copyrightLineEdit = QLineEdit() self.copyrightLabel.setBuddy(self.copyrightLineEdit) self.copyrightLineEdit.setPlaceholderText( "© 2019 Artanidos. All Rights Reserved.") self.themeLabel = QLabel("&Theme") self.theme = QComboBox() self.themeLabel.setBuddy(self.theme) themesDir = QDir(os.path.join(install_directory, "themes")) for theme in themesDir.entryList(QDir.NoDotAndDotDot | QDir.Dirs): self.theme.addItem(theme) self.registerField("siteName*", self.siteNameLineEdit) self.registerField("description", self.descriptionLineEdit) self.registerField("copyright", self.copyrightLineEdit) self.registerField("theme", self.theme, "currentText") self.warning = QLabel("") self.warning.setStyleSheet("QLabel color : orange ") layout = QGridLayout() layout.addWidget(self.siteNameLabel, 0, 0) layout.addWidget(self.siteNameLineEdit, 0, 1) layout.addWidget(self.descriptionLabel, 1, 0) layout.addWidget(self.descriptionLineEdit, 1, 1) layout.addWidget(self.copyrightLabel, 2, 0) layout.addWidget(self.copyrightLineEdit, 2, 1) layout.addWidget(self.themeLabel, 3, 0) layout.addWidget(self.theme, 3, 1) layout.addWidget(self.warning, 4, 0, 1, 2) self.setLayout(layout) self.siteNameLineEdit.textChanged.connect(self.siteNameChanged)
def createConclusionPage(): page = QWizardPage() page.setTitle("Conclusion") label = QLabel("You are now successfully registered. Have a nice day!") label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) page.setLayout(layout) return page
def create_welcome_page(self): page = QWizardPage() page.setTitle("Welcome to Gridsync!") label = QLabel('Gridsync is an experimental desktop client for for Tahoe-LAFS, the Least Authority File Store. Tahoe-LAFS allows you to safely store all of your important files into a storage "grid" -- a distributed cluster of servers connected to the Internet.\n\nUnlike most other traditional "Cloud" services, any data stored by Tahoe-LAFS is safe and secure by default; nobody can read or alter the files stored in your grid without your permission -- not even the owners of the servers that store them.') label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) page.setLayout(layout) self.addPage(page)
def __init__(self): QWizardPage.__init__(self) self.setTitle("Start Page") self.setSubTitle("Sub Start Page") layout = QBoxLayout(QBoxLayout.TopToBottom) self.setLayout(layout) self.checkbox = QCheckBox("Done") # 등록시 * 를 표시한 목록은 반드시 이벤트 후, 다음 페이지로 이동 self.registerField("check*", self.checkbox) layout.addWidget(self.checkbox)
def create_systray_page(self): page = QWizardPage() img = QLabel() pixmap = QPixmap(":osx-prefs.png") img.setPixmap(pixmap) label = QLabel('Like many other popular applications, Gridsync runs in the background of your computer and works while you do. If you ever need to change your settings in the future, you can do so by clicking the Gridsync icon in your system tray.') label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(img) layout.addWidget(label) page.setLayout(layout) self.addPage(page)
def __init__(self): QWizardPage.__init__(self) self.setTitle("Introduction") self.setPixmap(QWizard.WatermarkPixmap, QPixmap(":/images/wizard.png")) label = QLabel("This wizard will generate a skeleton website. " "You simply need to specify the site name and set a " "few options to produce the site.") label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) self.setLayout(layout)
def __init__(self, config: Config, on_finish: Callable, ui_app: QApplication): self._config = config self._config.reset_named_dirs() super().__init__(parent=None) page = QWizardPage() page.setTitle(texts.SETUP_HEADING) page.setSubTitle(texts.SETUP_TEXT) layout = NamedDirsForm( ui_app, self._config.named_dirs, on_change=self._on_named_dirs_change, parent=page, custom_names_enabled=False, ) page.setLayout(layout) self.addPage(page) self.setWindowTitle(texts.SETUP_TITLE) self.setWizardStyle(QWizard.MacStyle) background = pkgutil.get_data('human_activities.qt.data', 'qt_wizard_bg.png') pixmap = QPixmap() pixmap.loadFromData(background) self.setPixmap(QWizard.BackgroundPixmap, pixmap) if self.exec_(): on_finish(self._config)
def createIntroPage(): page = QWizardPage() page.setTitle("Introduction") label = QLabel( "This wizard will help you register your copy of Super Product " "Two.") label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) page.setLayout(layout) return page
def createIntroPage(): page = QWizardPage() page.setTitle("Introduction") label = QLabel( "This wizard will help you create a custom report of your data. " ) label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) page.setLayout(layout) return page
def publishpage(self): wpp = QWizardPage() wpp.setFinalPage(True) #wpp.isCommitPage() wpp.setTitle("Publish your page!") wpp_lbl = QLabel("You can publish your page now with WebTorrent.<br /> \ As long as you seed it, or any of your readers is seeding it, it is available on Slimweb.<br/> \ If there are no seeders left, you can seed it again at any time. Simply start WebTorrent.") wpp_lbl2 = QLabel("First, save your website as a torrent file, so WebTorrent can access it.") wpp_lbl.setWordWrap(True) wpp_lbl2.setWordWrap(True) save_btn = QPushButton("Save torrent file ...") save_btn.setToolTip("You can save the torrent file and share it now or later with a WebTorrent-compatible client.") save_btn.clicked.connect(self.saveTorrentFileDialog) wpp_layout = QVBoxLayout() wpp_layout.addWidget(wpp_lbl) wpp_layout.addWidget(wpp_lbl2) wpp_layout.addWidget(save_btn) wpp_layout.addWidget(self.aftersave_lbl) wpp.setLayout(wpp_layout) return wpp
def openfilepage(self): wpo = QWizardPage() wpo.isCommitPage() wpo.setTitle("Select HTML file") wpo_lbl = QLabel("Select an <b>HTML file</b> containing your website.<br />" "Slimweb websites are meant to be one-pagers, for now - but one-pagers are fashionable, actually ;-).") wpo_lbl2 = QLabel("<b>Note:</b> If you want to publish the page with WebTorrent with this wizard, " "it must be saved in the WebTorrent Download folder.") wpo_lbl.setWordWrap(True) wpo_lbl2.setWordWrap(True) insc_lbl = QLabel('<b>Inscription:</b> This is the magnet link appearing in your Slimcoin transaction.') self.fdl_flabel = QLabel('<em>No file selected</em>') self.insc_edit = QLineEdit() self.insc_edit.textChanged[str].connect(self.inscribe) fdl_btn = QPushButton("Open HTML File ...") fdl_btn.setToolTip('From an HTML File, a Torrent infohash can be created as an inscription.') fdl_btn.clicked.connect(self.openFileDialog) wpo_layout = QVBoxLayout() wpo_layout.addWidget(wpo_lbl) wpo_layout.addWidget(wpo_lbl2) wpo_layout.addWidget(self.fdl_flabel) wpo_layout.addWidget(fdl_btn) wpo_layout.addWidget(insc_lbl) wpo_layout.addWidget(self.insc_edit) wpo.setLayout(wpo_layout) return wpo
def InitWindow(self): self.setWindowIcon(QtGui.QIcon("icon.png")) self.setWindowTitle(self.title) self.setGeometry(self.left, self.top, self.width, self.height) vbox = QVBoxLayout() button = QPushButton("Launch") button.clicked.connect(self.btn_clicked) vbox.addWidget(button) self.setLayout(vbox) self.wizard = QWizard() self.wizard.setWindowTitle("Launcher Page") page1 = QWizardPage() page1.setTitle("p11111") page2 = QWizardPage() page2.setTitle("page 2") self.wizard.addPage(page1) self.wizard.addPage(page2) self.show()
def create_systray_page(self): page = QWizardPage() img = QLabel() pixmap = QPixmap(":osx-prefs.png") img.setPixmap(pixmap) label = QLabel( 'Like many other popular applications, Gridsync runs in the background of your computer and works while you do. If you ever need to change your settings in the future, you can do so by clicking the Gridsync icon in your system tray.' ) label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(img) layout.addWidget(label) page.setLayout(layout) self.addPage(page)
def __init__(self): QWizardPage.__init__(self) self.setTitle("Start Page") self.setSubTitle("Sub Start Page") layout = QBoxLayout(QBoxLayout.TopToBottom) self.setLayout(layout) self.num = 0 self.slider = QSlider() self.slider.valueChanged.connect(lambda v: setattr(self, "num", v)) # 등록시 * 를 표시한 목록은 반드시 이벤트 후, 다음 페이지로 이동 self.registerField("num*", self.slider) layout.addWidget(self.slider)
def __init__(self, theWizard): QWizardPage.__init__(self) self.mainConf = novelwriter.CONFIG self.theWizard = theWizard self.mainTheme = theWizard.mainTheme self.setTitle(self.tr("Select Project Folder")) self.theText = QLabel( self.tr( "Select a location to store the project. A new project folder " "will be created in the selected location.")) self.theText.setWordWrap(True) xW = self.mainConf.pxInt(300) vS = self.mainConf.pxInt(12) fS = self.mainConf.pxInt(8) self.projPath = QLineEdit("") self.projPath.setFixedWidth(xW) self.projPath.setPlaceholderText(self.tr("Required")) self.browseButton = QPushButton("...") self.browseButton.setMaximumWidth( int(2.5 * self.mainTheme.getTextWidth("..."))) self.browseButton.clicked.connect(self._doBrowse) self.errLabel = QLabel("") self.errLabel.setWordWrap(True) self.mainForm = QHBoxLayout() self.mainForm.addWidget(QLabel(self.tr("Project Path")), 0) self.mainForm.addWidget(self.projPath, 1) self.mainForm.addWidget(self.browseButton, 0) self.mainForm.setSpacing(fS) self.registerField("projPath*", self.projPath) # Assemble self.outerBox = QVBoxLayout() self.outerBox.setSpacing(vS) self.outerBox.addWidget(self.theText) self.outerBox.addLayout(self.mainForm) self.outerBox.addWidget(self.errLabel) self.outerBox.addStretch(1) self.setLayout(self.outerBox) return
def createIntroPage(self): page = QWizardPage() page.setTitle("Introduction") label = QLabel("This wizard will show you a simple wizard.") label.setWordWrap(True) label2 = QLabel("Therefore it will create a Sine plugin, a plot and connect these two.") label2.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) layout.addWidget(label2) page.setLayout(layout) return page
def initializePage(self): """Update the summary information on the final page. """ QWizardPage.initializePage(self) sumList = [] sumList.append( self.tr("Project Name: {0}").format(self.field("projName"))) sumList.append( self.tr("Project Path: {0}").format(self.field("projPath"))) if self.field("popMinimal"): sumList.append( self.tr("Fill the project with a minimal set of items")) elif self.field("popSample"): sumList.append(self.tr("Fill the project with example files")) elif self.field("popCustom"): if self.field("addPlot"): sumList.append(self.tr("Add a folder for plot notes")) if self.field("addChar"): sumList.append(self.tr("Add a folder for character notes")) if self.field("addWorld"): sumList.append(self.tr("Add a folder for location notes")) if self.field("addNotes"): sumList.append(self.tr("Add example notes to the above")) if self.field("numChapters") > 0: sumList.append( self.tr("Add {0} chapters to the novel folder").format( self.field("numChapters"))) if self.field("numScenes") > 0: sumList.append( self.tr("Add {0} scenes to each chapter").format( self.field("numScenes"))) else: if self.field("numScenes") > 0: sumList.append( self.tr("Add {0} scenes").format( self.field("numScenes"))) self.theText.setText( "<p>%s</p><p> • %s</p><p>%s</p>" % (self.tr("You have selected the following:"), "<br> • ".join(sumList), self.tr("Press '{0}' to create the new project.").format( self.tr("Done") if self.mainConf.osDarwin else self. tr("Finish")))) return
def __init__(self, controlAPI, parent=None): QWizardPage.__init__(self, parent) self.setTitle("Create the SINUS") self.control_api = controlAPI label = QLabel("Now you should enter a uname for the Sinus.") label.setWordWrap(True) uname_label = QLabel("Uname of Sinus (not used)") self.uname_edit = QLineEdit() uname_label.setBuddy(self.uname_edit) layout = QVBoxLayout() layout.addWidget(label) layout.addWidget(uname_label) layout.addWidget(self.uname_edit) self.setLayout(layout)
def __init__(self, controlAPI,parent = None): QWizardPage.__init__(self, parent) self.setTitle("Create the SINUS") self.control_api = controlAPI label = QLabel("Now you should enter a uname for the Sinus.") label.setWordWrap(True) uname_label = QLabel("Uname of Sinus (not used)") self.uname_edit = QLineEdit() uname_label.setBuddy(self.uname_edit) layout = QVBoxLayout() layout.addWidget(label) layout.addWidget(uname_label) layout.addWidget(self.uname_edit) self.setLayout(layout)
def __init__(self, theWizard): QWizardPage.__init__(self) self.mainConf = novelwriter.CONFIG self.theWizard = theWizard self.setTitle(self.tr("Populate Project")) self.theText = QLabel( self. tr("Choose how to pre-fill the project. Either with a minimal set of " "starter items, an example project explaining and showing many of " "the features, or show further custom options on the next page." )) self.theText.setWordWrap(True) vS = self.mainConf.pxInt(12) fS = self.mainConf.pxInt(4) self.popMinimal = QRadioButton( self.tr("Fill the project with a minimal set of items")) self.popSample = QRadioButton( self.tr("Fill the project with example files")) self.popCustom = QRadioButton( self.tr("Show detailed options for filling the project")) self.popMinimal.setChecked(True) self.popBox = QVBoxLayout() self.popBox.setSpacing(fS) self.popBox.addWidget(self.popMinimal) self.popBox.addWidget(self.popSample) self.popBox.addWidget(self.popCustom) self.registerField("popMinimal", self.popMinimal) self.registerField("popSample", self.popSample) self.registerField("popCustom", self.popCustom) # Assemble self.outerBox = QVBoxLayout() self.outerBox.setSpacing(vS) self.outerBox.addWidget(self.theText) self.outerBox.addLayout(self.popBox) self.outerBox.addStretch(1) self.setLayout(self.outerBox) return
def createReportDesignPage(): page = QWizardPage() page.setTitle("Report Design") page.setSubTitle("Choose Fields to report.") listWidget = QtWidgets.QListWidget() listWidget.setGeometry(QtCore.QRect(130, 50, 131, 192)) listWidget.setTabKeyNavigation(True) listWidget.setObjectName("FieldList") # nameLabel = QLabel("Name:") # nameLineEdit = QLineEdit() # # emailLabel = QLabel("Email address:") # emailLineEdit = QLineEdit() layout = QGridLayout() layout.addWidget(listWidget, 0, 0) # layout.addWidget(nameLineEdit, 0, 1) # layout.addWidget(emailLabel, 1, 0) # layout.addWidget(emailLineEdit, 1, 1) page.setLayout(layout) return page
def __init__(self, theWizard): QWizardPage.__init__(self) self.mainConf = novelwriter.CONFIG self.theWizard = theWizard self.setTitle(self.tr("Summary")) self.theText = QLabel("") self.theText.setWordWrap(True) # Assemble self.outerBox = QVBoxLayout() self.outerBox.setSpacing(self.mainConf.pxInt(12)) self.outerBox.addWidget(self.theText) self.outerBox.addStretch(1) self.setLayout(self.outerBox) return
def __init__(self, controlAPI, parent=None): QWizardPage.__init__(self, parent) self.setTitle("Create the SINUS") self.control_api = controlAPI label = QLabel("Now you should enter a uname for the Sinus.") label.setWordWrap(True) uname_label = QLabel("Uname of Sinus (wird aber nicht benutzt)") self.uname_edit = QLineEdit() uname_label.setBuddy(self.uname_edit) #QtGui.QWizardPage.registerField("uname",uname_edit) layout = QVBoxLayout() layout.addWidget(label) layout.addWidget(uname_label) layout.addWidget(self.uname_edit) self.setLayout(layout)
def __init__(self, controlAPI, parent=None): QWizardPage.__init__(self, parent) self.setTitle("Create the SINUS") self.control_api = controlAPI label = QLabel("Now you should enter a uname for the Sinus.") label.setWordWrap(True) uname_label = QLabel("Uname of Sinus (wird aber nicht benutzt)") self.uname_edit = QLineEdit() uname_label.setBuddy(self.uname_edit) # QtGui.QWizardPage.registerField("uname",uname_edit) layout = QVBoxLayout() layout.addWidget(label) layout.addWidget(uname_label) layout.addWidget(self.uname_edit) self.setLayout(layout)
def create_configuration1_page(self): page = QWizardPage() page.setTitle("Gridsync configuration... in two easy steps") label = QLabel('<b>Step 1.</b> Paste a Tahoe-LAFS Introducer fURL below:\n\n ') label.setWordWrap(True) self.introducer_furl = QLineEdit("") info_label = QLabel('\n\n\n\nAn "Introducer fURL" (in the form "<i>pb://[email protected]/introducer</i>") is a special address that points to a Tahoe-LAFS storage grid. If you do not have an Introducer fURL, you can get one from the operator of a storage grid -- or from one of your friends that uses Tahoe-LAFS.') info_label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) layout.addWidget(self.introducer_furl) layout.addWidget(info_label) page.setLayout(layout) self.addPage(page)
def __init__(self, theWizard): QWizardPage.__init__(self) self.mainConf = nw.CONFIG self.theWizard = theWizard self.setTitle("Finished") self.theText = QLabel( ("<p>All done.</p>" "<p>Press '{finish}' to create the new project.</p>").format( finish="Done" if self.mainConf.osDarwin else "Finish")) self.theText.setWordWrap(True) # Assemble self.outerBox = QVBoxLayout() self.outerBox.setSpacing(self.mainConf.pxInt(12)) self.outerBox.addWidget(self.theText) self.outerBox.addStretch(1) self.setLayout(self.outerBox) return
def create_configuration2_page(self): page = QWizardPage() page.setTitle("Gridsync configuration... in two easy steps") label = QLabel('<b>Step 2.</b> Select a local folder:\n\n ') label.setWordWrap(True) hbox = QWidget(self) hlayout = QHBoxLayout(hbox) self.folder_text = QLineEdit(hbox) button = QPushButton('Select Folder', self) button.clicked.connect(self.get_folder) hlayout.addWidget(self.folder_text) hlayout.addWidget(button) #self.folder_label = QLabel() warning_label = QLabel( '\n\n\n\nGridsync works by pairing directories on your computer with directories located on a storage grid. The folder you select here will be automatically synchronized with the address provided on the previous page.' ) warning_label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) #layout.addWidget(button) layout.addWidget(hbox) layout.addWidget(warning_label) page.setLayout(layout) self.addPage(page)
def create_finish_page(self): page = QWizardPage() page.setTitle("That's it!") #self.settings = self.gridsync_link text = 'By clicking <b>Done</b> below, Gridsync will begin synchronizing your selected folder with your storage grid and will continue to keep your files in sync so long as it is running.' label = QLabel(text) label.setWordWrap(True) img = QLabel() pixmap = QPixmap(":sync-complete.png") img.setPixmap(pixmap) warning_label = QLabel( '\n\n\n\nPlease note that, depending on how many files you have, your initial sync may take a while. When Gridsync is working, the system tray icon will animate and you will receive a desktop notification as soon as the process completes.' ) warning_label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) layout.addWidget(img) layout.addWidget(warning_label) page.setLayout(layout) self.addPage(page)
def __init__(self, theWizard): QWizardPage.__init__(self) self.mainConf = novelwriter.CONFIG self.theWizard = theWizard self.setTitle(self.tr("Finished")) self.theText = QLabel( "<p>%s</p><p>%s</p>" % (self.tr("All done."), self.tr("Press '{0}' to create the new project.").format( self.tr("Done") if self.mainConf.osDarwin else self. tr("Finish")))) self.theText.setWordWrap(True) # Assemble self.outerBox = QVBoxLayout() self.outerBox.setSpacing(self.mainConf.pxInt(12)) self.outerBox.addWidget(self.theText) self.outerBox.addStretch(1) self.setLayout(self.outerBox) return
def create_finish_page(self): page = QWizardPage() page.setTitle("That's it!") #self.settings = self.gridsync_link text = 'By clicking <b>Done</b> below, Gridsync will begin synchronizing your selected folder with your storage grid and will continue to keep your files in sync so long as it is running.' label = QLabel(text) label.setWordWrap(True) img = QLabel() pixmap = QPixmap(":sync-complete.png") img.setPixmap(pixmap) warning_label = QLabel('\n\n\n\nPlease note that, depending on how many files you have, your initial sync may take a while. When Gridsync is working, the system tray icon will animate and you will receive a desktop notification as soon as the process completes.') warning_label.setWordWrap(True) layout = QVBoxLayout() layout.addWidget(label) layout.addWidget(img) layout.addWidget(warning_label) page.setLayout(layout) self.addPage(page)
def wizard_pages(csl): from PyQt5.QtWidgets import ( QWizardPage, QVBoxLayout, QLineEdit, QGridLayout, QLabel, ) p = QWizardPage() vbox = QGridLayout(p) vbox.addWidget(QLabel("Location:"), 0, 0) line = QLineEdit() vbox.addWidget(line, 0, 1) vbox.addWidget(QLabel("Interpreter:"), 1, 0) line_interpreter = QLineEdit() vbox.addWidget(line_interpreter, 1, 1) return [p]
def __init__(self, parent=None): """Initialize the ImportWizard instance.""" super().__init__(parent=parent) self.filename = None self.auth = None self.race = None # Create the race selection page. race_selection_page = QWizardPage() race_selection_page.setTitle('Race Selection') # Create the wizard and add our pages. self.setWindowTitle('OnTheDay.net race config import') self.addPage( IntroductionPage( 'This wizard will authenticate with OnTheDay.net and import ' 'an existing race configuration. Optionally, a remote ' 'connection to the race will be established (or this can be ' 'done at a later time).')) self.addPage(AuthenticationPage()) self.addPage(RaceSelectionPage()) self.addPage(FileSelectionPage()) self.addPage(ImportPage())
def endpage(self): wpx = QWizardPage() wpx.setTitle("Your website has been published!") wpx_layout = QVBoxLayout() wpx_layout.addWidget(self.webt_lbl) wpx.setLayout(wpx_layout) return wpx
def intropage(self): wpi = QWizardPage() wpi.setTitle("Create a Slimweb webpage!") wpi_lbl = QLabel("This wizard will help you to publish or update a website on the decentralized Slimweb.<br/>" "You need a HTML file, a Slimcoin client, WebTorrent and an Slimcoin address with a" "balance of more than 0.02 SLM.") wpi_lbl.setWordWrap(True) wpi_layout = QVBoxLayout() wpi_layout.addWidget(wpi_lbl) wpi.setLayout(wpi_layout) return wpi
def createRegistrationPage(): page = QWizardPage() page.setTitle("Registration") page.setSubTitle("Please fill both fields.") nameLabel = QLabel("Name:") nameLineEdit = QLineEdit() emailLabel = QLabel("Email address:") emailLineEdit = QLineEdit() layout = QGridLayout() layout.addWidget(nameLabel, 0, 0) layout.addWidget(nameLineEdit, 0, 1) layout.addWidget(emailLabel, 1, 0) layout.addWidget(emailLineEdit, 1, 1) page.setLayout(layout) return page
def wizard_pages(cls): from PyQt5.QtWidgets import QWizardPage p = QWizardPage() p.setTitle("PPPPPP") p.setSubTitle("Pyqslaldsald ") return [p]