Beispiel #1
0
    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)
Beispiel #2
0
 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)
Beispiel #3
0
 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)
Beispiel #4
0
 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)
Beispiel #5
0
 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)
Beispiel #7
0
    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 __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(
            "&copy 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 __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):
        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)
Beispiel #11
0
    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
Beispiel #12
0
    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)
Beispiel #13
0
    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)
Beispiel #14
0
    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
Beispiel #15
0
    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
Beispiel #16
0
    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)
Beispiel #17
0
    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)
Beispiel #18
0
    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
Beispiel #19
0
    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
Beispiel #20
0
    def __init__(self, theWizard):
        QWizardPage.__init__(self)

        self.mainConf = nw.CONFIG
        self.theWizard = theWizard

        self.setTitle("Custom Project Options")
        self.theText = QLabel(
            "Select which additional root folders to make, and how to populate "
            "the Novel folder. If you don't want to add chapters or scenes, set "
            "the values to 0. You can add scenes without chapters.")
        self.theText.setWordWrap(True)

        vS = self.mainConf.pxInt(12)

        # Root Folders
        self.rootGroup = QGroupBox("Additional Root Folders")
        self.rootForm = QGridLayout()
        self.rootGroup.setLayout(self.rootForm)

        self.lblPlot = QLabel("%s folder" %
                              nwLabels.CLASS_NAME[nwItemClass.PLOT])
        self.lblChar = QLabel("%s folder" %
                              nwLabels.CLASS_NAME[nwItemClass.CHARACTER])
        self.lblWorld = QLabel("%s folder" %
                               nwLabels.CLASS_NAME[nwItemClass.WORLD])
        self.lblTime = QLabel("%s folder" %
                              nwLabels.CLASS_NAME[nwItemClass.TIMELINE])
        self.lblObject = QLabel("%s folder" %
                                nwLabels.CLASS_NAME[nwItemClass.OBJECT])
        self.lblEntity = QLabel("%s folder" %
                                nwLabels.CLASS_NAME[nwItemClass.ENTITY])

        self.addPlot = QSwitch()
        self.addChar = QSwitch()
        self.addWorld = QSwitch()
        self.addTime = QSwitch()
        self.addObject = QSwitch()
        self.addEntity = QSwitch()

        self.addPlot.setChecked(True)
        self.addChar.setChecked(True)
        self.addWorld.setChecked(True)

        self.rootForm.addWidget(self.lblPlot, 0, 0)
        self.rootForm.addWidget(self.lblChar, 1, 0)
        self.rootForm.addWidget(self.lblWorld, 2, 0)
        self.rootForm.addWidget(self.lblTime, 3, 0)
        self.rootForm.addWidget(self.lblObject, 4, 0)
        self.rootForm.addWidget(self.lblEntity, 5, 0)
        self.rootForm.addWidget(self.addPlot, 0, 1, 1, 1, Qt.AlignRight)
        self.rootForm.addWidget(self.addChar, 1, 1, 1, 1, Qt.AlignRight)
        self.rootForm.addWidget(self.addWorld, 2, 1, 1, 1, Qt.AlignRight)
        self.rootForm.addWidget(self.addTime, 3, 1, 1, 1, Qt.AlignRight)
        self.rootForm.addWidget(self.addObject, 4, 1, 1, 1, Qt.AlignRight)
        self.rootForm.addWidget(self.addEntity, 5, 1, 1, 1, Qt.AlignRight)
        self.rootForm.setRowStretch(6, 1)

        # Novel Options
        self.novelGroup = QGroupBox("Populate Novel Folder")
        self.novelForm = QGridLayout()
        self.novelGroup.setLayout(self.novelForm)

        self.numChapters = QSpinBox()
        self.numChapters.setRange(0, 100)
        self.numChapters.setValue(5)

        self.numScenes = QSpinBox()
        self.numScenes.setRange(0, 200)
        self.numScenes.setValue(5)

        self.chFolders = QSwitch()
        self.chFolders.setChecked(True)

        self.novelForm.addWidget(QLabel("Add chapters"), 0, 0)
        self.novelForm.addWidget(QLabel("Scenes (per chapter)"), 1, 0)
        self.novelForm.addWidget(QLabel("Add chapter folders"), 2, 0)
        self.novelForm.addWidget(self.numChapters, 0, 1, 1, 1, Qt.AlignRight)
        self.novelForm.addWidget(self.numScenes, 1, 1, 1, 1, Qt.AlignRight)
        self.novelForm.addWidget(self.chFolders, 2, 1, 1, 1, Qt.AlignRight)
        self.novelForm.setRowStretch(3, 1)

        # Wizard Fields
        self.registerField("addPlot", self.addPlot)
        self.registerField("addChar", self.addChar)
        self.registerField("addWorld", self.addWorld)
        self.registerField("addTime", self.addTime)
        self.registerField("addObject", self.addObject)
        self.registerField("addEntity", self.addEntity)
        self.registerField("numChapters", self.numChapters)
        self.registerField("numScenes", self.numScenes)
        self.registerField("chFolders", self.chFolders)

        # Assemble
        self.innerBox = QHBoxLayout()
        self.innerBox.addWidget(self.rootGroup)
        self.innerBox.addWidget(self.novelGroup)

        self.outerBox = QVBoxLayout()
        self.outerBox.setSpacing(vS)
        self.outerBox.addWidget(self.theText)
        self.outerBox.addLayout(self.innerBox)
        self.outerBox.addStretch(1)
        self.setLayout(self.outerBox)

        return
Beispiel #21
0
    def __init__(self, theWizard):
        QWizardPage.__init__(self)

        self.mainConf = novelwriter.CONFIG
        self.theWizard = theWizard

        self.setTitle(self.tr("Custom Project Options"))
        self.theText = QLabel(
            self.
            tr("Select which additional elements to populate the project with. "
               "You can skip making chapters and add only scenes by setting the "
               "number of chapters to 0."))
        self.theText.setWordWrap(True)

        cM = self.mainConf.pxInt(12)
        mH = self.mainConf.pxInt(26)
        fS = self.mainConf.pxInt(4)

        # Root Folders
        self.addPlot = QSwitch()
        self.addChar = QSwitch()
        self.addWorld = QSwitch()
        self.addNotes = QSwitch()

        self.addPlot.setChecked(True)
        self.addChar.setChecked(True)
        self.addWorld.setChecked(False)
        self.addNotes.setChecked(False)

        # Generate Content
        self.numChapters = QSpinBox()
        self.numChapters.setRange(0, 100)
        self.numChapters.setValue(5)

        self.numScenes = QSpinBox()
        self.numScenes.setRange(0, 200)
        self.numScenes.setValue(5)

        # Grid Form
        self.addBox = QGridLayout()
        self.addBox.addWidget(QLabel(self.tr("Add a folder for plot notes")),
                              0, 0)
        self.addBox.addWidget(
            QLabel(self.tr("Add a folder for character notes")), 1, 0)
        self.addBox.addWidget(
            QLabel(self.tr("Add a folder for location notes")), 2, 0)
        self.addBox.addWidget(
            QLabel(self.tr("Add example notes to the above")), 3, 0)
        self.addBox.addWidget(
            QLabel(self.tr("Add chapters to the novel folder")), 4, 0)
        self.addBox.addWidget(QLabel(self.tr("Add scenes to each chapter")), 5,
                              0)
        self.addBox.addWidget(self.addPlot, 0, 1, 1, 1, Qt.AlignRight)
        self.addBox.addWidget(self.addChar, 1, 1, 1, 1, Qt.AlignRight)
        self.addBox.addWidget(self.addWorld, 2, 1, 1, 1, Qt.AlignRight)
        self.addBox.addWidget(self.addNotes, 3, 1, 1, 1, Qt.AlignRight)
        self.addBox.addWidget(self.numChapters, 4, 1, 1, 1, Qt.AlignRight)
        self.addBox.addWidget(self.numScenes, 5, 1, 1, 1, Qt.AlignRight)
        self.addBox.setVerticalSpacing(fS)
        self.addBox.setHorizontalSpacing(cM)
        self.addBox.setContentsMargins(cM, 0, cM, 0)
        self.addBox.setColumnStretch(2, 1)
        for i in range(6):
            self.addBox.setRowMinimumHeight(i, mH)

        # Wizard Fields
        self.registerField("addPlot", self.addPlot)
        self.registerField("addChar", self.addChar)
        self.registerField("addWorld", self.addWorld)
        self.registerField("addNotes", self.addNotes)
        self.registerField("numChapters", self.numChapters)
        self.registerField("numScenes", self.numScenes)

        # Assemble
        self.outerBox = QVBoxLayout()
        self.outerBox.setSpacing(cM)
        self.outerBox.addWidget(self.theText)
        self.outerBox.addLayout(self.addBox)
        self.outerBox.addStretch(1)
        self.setLayout(self.outerBox)

        return
Beispiel #22
0
    def __init__(self, theWizard):
        QWizardPage.__init__(self)

        self.mainConf = novelwriter.CONFIG
        self.theWizard = theWizard
        self.mainTheme = theWizard.mainTheme

        self.setTitle(self.tr("Create New Project"))
        self.theText = QLabel(
            self.
            tr("Provide at least a project name. The project name should not "
               "be changed beyond this point as it is used for generating file "
               "names for for instance backups. The other fields are optional "
               "and can be changed at any time in Project Settings."))
        self.theText.setWordWrap(True)

        self.imgCredit = QLabel(
            self.tr("Side image by {0}, {1}").format("Peter Mitterhofer",
                                                     "CC BY-SA 4.0"))
        lblFont = self.imgCredit.font()
        lblFont.setPointSizeF(0.6 * self.mainTheme.fontPointSize)
        self.imgCredit.setFont(lblFont)

        xW = self.mainConf.pxInt(300)
        xH = self.mainConf.pxInt(100)
        vS = self.mainConf.pxInt(12)
        fS = self.mainConf.pxInt(4)

        # The Page Form
        self.projName = QLineEdit()
        self.projName.setMaxLength(200)
        self.projName.setFixedWidth(xW)
        self.projName.setPlaceholderText(self.tr("Required"))

        self.projTitle = QLineEdit()
        self.projTitle.setMaxLength(200)
        self.projTitle.setFixedWidth(xW)
        self.projTitle.setPlaceholderText(self.tr("Optional"))

        self.projAuthors = QPlainTextEdit()
        self.projAuthors.setFixedHeight(xH)
        self.projAuthors.setFixedWidth(xW)
        self.projAuthors.setPlaceholderText(
            self.tr("Optional. One name per line."))

        self.mainForm = QFormLayout()
        self.mainForm.addRow(self.tr("Project Name"), self.projName)
        self.mainForm.addRow(self.tr("Novel Title"), self.projTitle)
        self.mainForm.addRow(self.tr("Author(s)"), self.projAuthors)
        self.mainForm.setVerticalSpacing(fS)

        self.registerField("projName*", self.projName)
        self.registerField("projTitle", self.projTitle)
        self.registerField("projAuthors", self.projAuthors, "plainText")

        # Assemble
        self.outerBox = QVBoxLayout()
        self.outerBox.setSpacing(vS)
        self.outerBox.addWidget(self.theText)
        self.outerBox.addLayout(self.mainForm)
        self.outerBox.addStretch(1)
        self.outerBox.addWidget(self.imgCredit)
        self.setLayout(self.outerBox)

        return
 def __init__(self):
     QWizardPage.__init__(self)
     self.setTitle("Start Page")
     self.setSubTitle("Sub Start Page")