Example #1
0
def main():
    app = QApplication(sys.argv)

    QCoreApplication.setOrganizationName("QtExamples")
    QCoreApplication.setApplicationName("html2pdf")
    QCoreApplication.setApplicationVersion(__qt_version__)

    parser = QCommandLineParser()
    parser.setApplicationDescription(
        QCoreApplication.translate(
            "main", "Converts the web page INPUT into the PDF file OUTPUT."))
    parser.addHelpOption()
    parser.addVersionOption()
    parser.addPositionalArgument(
        QCoreApplication.translate("main", "INPUT"),
        QCoreApplication.translate("main", "Input URL for PDF conversion."),
    )
    parser.addPositionalArgument(
        QCoreApplication.translate("main", "OUTPUT"),
        QCoreApplication.translate("main",
                                   "Output file name for PDF conversion."),
    )

    parser.process(QCoreApplication.arguments())

    requiredArguments = parser.positionalArguments()
    if len(requiredArguments) != 2:
        parser.showHelp(1)

    converter = Html2PdfConverter(*requiredArguments[:2])
    ret = converter.run()
    sys.exit(ret)
Example #2
0
 def retranslateUi(self, Form):
     Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
     self.label.setText(
         QCoreApplication.translate("Form", u"Overall Progress", None))
     self.lapsed_time_label.setText(
         QCoreApplication.translate("Form", u"Lapsed time: 00:00:00", None))
     self.estimated_time_label.setText(
         QCoreApplication.translate("Form",
                                    u"Estimated time remaining: 00:00:00",
                                    None))
Example #3
0
 def retranslateUi(self, StyleWidget):
     StyleWidget.setWindowTitle(
         QCoreApplication.translate("StyleWidget", u"Form", None))
     self.groupBox.setTitle(
         QCoreApplication.translate("StyleWidget", u"Styles", None))
     self.transparentStyle.setText(
         QCoreApplication.translate("StyleWidget", u"Transp.", None))
     self.blueStyle.setText(
         QCoreApplication.translate("StyleWidget", u"Blue", None))
     self.khakiStyle.setText(
         QCoreApplication.translate("StyleWidget", u"Khaki", None))
     self.noStyle.setText(
         QCoreApplication.translate("StyleWidget", u"None", None))
     self.label.setText(
         QCoreApplication.translate("StyleWidget", u"Value:", None))
     self.pushButton_2.setText(
         QCoreApplication.translate("StyleWidget", u"Show", None))
     self.pushButton.setText(
         QCoreApplication.translate("StyleWidget", u"Enable", None))
     self.close.setText(
         QCoreApplication.translate("StyleWidget", u"Close", None))
Example #4
0
 def retranslateUi(self, Preferences):
     Preferences.setWindowTitle(
         QCoreApplication.translate("Preferences", u"Hypnotoad Preferences",
                                    None))
     self.defaultGridFileNameLabel.setText(
         QCoreApplication.translate("Preferences",
                                    u"Default grid file name", None))
     self.defaultGridFileNameLineEdit.setPlaceholderText(
         QCoreApplication.translate("Preferences", u"bout.grid.nc", None))
     self.plotXlowLabel.setText(
         QCoreApplication.translate("Preferences", u"Plot xlow", None))
     self.plotYlowLabel.setText(
         QCoreApplication.translate("Preferences", u"Plot ylow", None))
     self.plotCornersLabel.setText(
         QCoreApplication.translate("Preferences", u"Plot corners", None))
     self.saveFullYamlLabel.setText(
         QCoreApplication.translate(
             "Preferences",
             u"Include options set by\ndefault when saving to YAML", None))
 def retranslateUi(self, Hypnotoad):
     Hypnotoad.setWindowTitle(
         QCoreApplication.translate("Hypnotoad", u"MainWindow", None))
     self.action_New.setText(
         QCoreApplication.translate("Hypnotoad", u"&New", None))
     #if QT_CONFIG(shortcut)
     self.action_New.setShortcut(
         QCoreApplication.translate("Hypnotoad", u"Ctrl+N", None))
     #endif // QT_CONFIG(shortcut)
     self.action_Open.setText(
         QCoreApplication.translate("Hypnotoad", u"&Open", None))
     #if QT_CONFIG(shortcut)
     self.action_Open.setShortcut(
         QCoreApplication.translate("Hypnotoad", u"Ctrl+O", None))
     #endif // QT_CONFIG(shortcut)
     self.action_Save.setText(
         QCoreApplication.translate("Hypnotoad", u"&Save", None))
     #if QT_CONFIG(tooltip)
     self.action_Save.setToolTip(
         QCoreApplication.translate("Hypnotoad", u"Save", None))
     #endif // QT_CONFIG(tooltip)
     #if QT_CONFIG(shortcut)
     self.action_Save.setShortcut(
         QCoreApplication.translate("Hypnotoad", u"Ctrl+S", None))
     #endif // QT_CONFIG(shortcut)
     self.action_Save_as.setText(
         QCoreApplication.translate("Hypnotoad", u"Save as", None))
     #if QT_CONFIG(shortcut)
     self.action_Save_as.setShortcut(
         QCoreApplication.translate("Hypnotoad", u"Ctrl+Shift+S", None))
     #endif // QT_CONFIG(shortcut)
     self.action_Quit.setText(
         QCoreApplication.translate("Hypnotoad", u"&Quit", None))
     #if QT_CONFIG(shortcut)
     self.action_Quit.setShortcut(
         QCoreApplication.translate("Hypnotoad", u"Ctrl+Q", None))
     #endif // QT_CONFIG(shortcut)
     self.action_About.setText(
         QCoreApplication.translate("Hypnotoad", u"&About", None))
     self.action_Run.setText(
         QCoreApplication.translate("Hypnotoad", u"&Run", None))
     #if QT_CONFIG(shortcut)
     self.action_Run.setShortcut(
         QCoreApplication.translate("Hypnotoad", u"Ctrl+R", None))
     #endif // QT_CONFIG(shortcut)
     self.action_Write_grid.setText(
         QCoreApplication.translate("Hypnotoad", u"&Write grid", None))
     #if QT_CONFIG(shortcut)
     self.action_Write_grid.setShortcut(
         QCoreApplication.translate("Hypnotoad", u"Ctrl+W", None))
     #endif // QT_CONFIG(shortcut)
     self.action_Revert.setText(
         QCoreApplication.translate("Hypnotoad", u"&Revert", None))
     self.action_Preferences.setText(
         QCoreApplication.translate("Hypnotoad", u"&Preferences...", None))
     self.action_Regrid.setText(
         QCoreApplication.translate("Hypnotoad", u"Re&grid", None))
     self.action_Regrid.setToolTip(
         QCoreApplication.translate("Hypnotoad",
                                    u"Regrid non-orthogonal mesh", None))
     ___qtablewidgetitem = self.options_form.horizontalHeaderItem(0)
     ___qtablewidgetitem.setText(
         QCoreApplication.translate("Hypnotoad", u"Name", None))
     ___qtablewidgetitem1 = self.options_form.horizontalHeaderItem(1)
     ___qtablewidgetitem1.setText(
         QCoreApplication.translate("Hypnotoad", u"Value", None))
     self.options_file_browse_button.setText(
         QCoreApplication.translate("Hypnotoad", u"Browse", None))
     self.geqdsk_file_browse_button.setText(
         QCoreApplication.translate("Hypnotoad", u"Browse", None))
     self.run_button.setText(
         QCoreApplication.translate("Hypnotoad", u"Run", None))
     self.write_grid_button.setText(
         QCoreApplication.translate("Hypnotoad", u"Write Grid", None))
     self.geqdsk_file_label.setText(
         QCoreApplication.translate("Hypnotoad", u"geqdsk file", None))
     self.options_file_label.setText(
         QCoreApplication.translate("Hypnotoad", u"Options file", None))
     self.regrid_button.setToolTip(
         QCoreApplication.translate(
             "Hypnotoad",
             u"Recalculate spacing of non-orthogonal grids (check 'Non-Orthogonal' box to activate)",
             None))
     self.regrid_button.setText(
         QCoreApplication.translate("Hypnotoad", u"Regrid", None))
     self.nonorthogonal_box.setToolTip(
         QCoreApplication.translate(
             "Hypnotoad", u"Check to generate non-orthogonal grids", None))
     self.nonorthogonal_box.setText(
         QCoreApplication.translate("Hypnotoad", u"Non-Orthogonal", None))
     self.menu_File.setTitle(
         QCoreApplication.translate("Hypnotoad", u"&File", None))
     self.menu_Help.setTitle(
         QCoreApplication.translate("Hypnotoad", u"&Help", None))
     self.menu_Mesh.setTitle(
         QCoreApplication.translate("Hypnotoad", u"&Mesh", None))
     self.toolBar.setWindowTitle(
         QCoreApplication.translate("Hypnotoad", u"toolBar", None))
     self.toolBar_2.setWindowTitle(
         QCoreApplication.translate("Hypnotoad", u"toolBar_2", None))
     self.toolBar_3.setWindowTitle(
         QCoreApplication.translate("Hypnotoad", u"toolBar_3", None))
Example #6
0
 def retranslateUi(self, Form):
     Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
     self.drag_button.setText(QCoreApplication.translate("Form", u"...", None))
     self.icon_label.setText(QCoreApplication.translate("Form", u"ICON", None))
     self.name_label.setText(QCoreApplication.translate("Form", u"TextLabel", None))
     self.kill_button.setText(QCoreApplication.translate("Form", u"X", None))
 def retranslateUi(self, Form):
     Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
     self.start_button.setText(
         QCoreApplication.translate("Form", u"Start Queue", None))