OwncloudHttpCredsPage::OwncloudHttpCredsPage(QWidget* parent)
    : AbstractCredentialsWizardPage(),
      _ui(),
      _connected(false),
      _checking(false),
      _progressIndi(new QProgressIndicator (this))
{
    _ui.setupUi(this);

    if(parent) {
        _ocWizard = qobject_cast<OwncloudWizard *>(parent);
    }

    registerField( QLatin1String("OCUser*"),   _ui.leUsername);
    registerField( QLatin1String("OCPasswd*"), _ui.lePassword);

    Theme *theme = Theme::instance();
    switch(theme->userIDType()) {
    case Theme::UserIDUserName:
        // default, handled in ui file
        break;
    case Theme::UserIDEmail:
        _ui.usernameLabel->setText(tr("&Email"));
        break;
    case Theme::UserIDCustom:
        _ui.usernameLabel->setText(theme->customUserID());
        break;
    default:
        break;
    }
    _ui.leUsername->setPlaceholderText(theme->userIDHint());

    setTitle(WizardCommon::titleTemplate().arg(tr("Connect to %1").arg(Theme::instance()->appNameGUI())));
    setSubTitle(WizardCommon::subTitleTemplate().arg(tr("Enter user credentials")));

    _ui.resultLayout->addWidget( _progressIndi );
    stopSpinner();
    setupCustomization();
}
Beispiel #2
0
NewWizardPage1::NewWizardPage1(QWidget* parent)
   : QWizardPage(parent)
      {
      setTitle(tr("Create New Score"));
      setSubTitle(tr("This wizard creates a new score"));

      w = new TitleWizard;

      registerField("useTemplate", w->rb1, "checked");
      QGridLayout* grid = new QGridLayout;
      grid->addWidget(w, 0, 0);
      setLayout(grid);
      }
Beispiel #3
0
ConverterWizard::ConverterWizard(QWidget* parent /*= 0*/) : QWizardPage(parent)
{
	setupUi(this);
	QList<QByteArray> formats = QImageWriter::supportedImageFormats();
	foreach(QByteArray format, formats)
	{		
		if (format.toUpper() == "PSD" ||
			format.toUpper() == "PNG" ||
			format.toUpper() == "TGA")
			m_format->addItem(QString(format));
	}	
	setTitle(tr("Texture Converter for Heightmaps"));
	setSubTitle(tr("Using this wizard you can convert 8bit textures or 16bit PGM files to a "
		"32bit image that can be used by the standard Horde3D Terrain Node Extension.\n"
		"The converted 32bit image will contain the normal map data as well as the heightmap data and "
		"will be saved relative to the scene's texture directory."));
	registerField("heightmap*", m_heightMap);
	registerField("target*", m_target);
	registerField("format", m_format, "currentText");
	registerField("filter_radius", m_filterRadius);
	connect(m_setHeightMap, SIGNAL(clicked()), this, SLOT(setHeightMap()));
}
ImportGrammarSelectInputPage::ImportGrammarSelectInputPage(QWidget* parent): QWizardPage(parent)
{
  setTitle(i18n("Input"));
  ui.setupUi(this);

  #if KDE_IS_VERSION(4,0,80)
  ui.elbFiles->setCustomEditor(*(new KEditListBox::CustomEditor(ui.urFileToAdd, ui.urFileToAdd->lineEdit())));
  #endif

  registerField("inputIsText", ui.rbText);

  registerField("files", ui.elbFiles, "items", SIGNAL(changed()));
  registerField("encoding", ui.cbEncoding, "currentText", SIGNAL(currentIndexChanged(int)));
  registerField("includeUnknown", ui.cbIncludeUnknown);
  registerField("grammarInputText", ui.teText, "plainText", SIGNAL(textChanged()));

  connect(ui.teText, SIGNAL(textChanged()), this, SIGNAL(completeChanged()));
  connect(ui.elbFiles, SIGNAL(changed()), this, SIGNAL(completeChanged()));
  connect(ui.rbText, SIGNAL(toggled(bool)), this, SIGNAL(completeChanged()));
  ui.wgFileImport->hide();
  ui.rbText->toggle();
}
Prescription_01::Prescription_01(QWidget *parent) :
	QWizardPage(parent),
	ui(new Ui::Prescription_01),
	patient(0),
	prescription(0),
	medication(0),
	shipment(0)
{
	ui->setupUi(this);

	// Setup validators
	QValidator *numbers = new QIntValidator(this);
	ui->amountField->setValidator(numbers);

	// Set default values
	ui->filledField->setDate(QDate::currentDate());
	ui->writtenField->setDate(QDate::currentDate());

	registerField("amountField*", ui->amountField);
	registerField("writtenByField*", ui->writtenByField);
	registerField("filledByField*", ui->filledByField);
}
Beispiel #6
0
TemplateChooserPage::TemplateChooserPage(QWidget *parent)
// ----------------------------------------------------------------------------
//   Create the template selection page
// ----------------------------------------------------------------------------
    : QWizardPage(parent)
{
    setTitle(tr("Template Chooser"));
    setSubTitle(tr("Choose a template to create your document with."));

    search = new QLineEdit;
    search->setPlaceholderText(tr("Search"));
    connect(search, SIGNAL(textChanged(QString)),
            this,   SLOT(filterItems()));

    showAll = new QCheckBox(tr("Show all examples"));
    connect(showAll, SIGNAL(toggled(bool)),
            this,    SLOT(filterItems()));
    showAll->setChecked(false);

    QHBoxLayout *searchLayout = new QHBoxLayout;
    searchLayout->addWidget(showAll, 2);
    searchLayout->addStretch(1);
    searchLayout->addWidget(search, 2);


    templateListWidget = new QListWidget;
    templateListWidget->setViewMode(QListView::IconMode);
    templateListWidget->setIconSize(QSize(96, 72));
    templateListWidget->setMovement(QListView::Static);
    templateListWidget->setResizeMode(QListView::Adjust);
    templateListWidget->setMinimumWidth(3 * 144 + 25);
    templateListWidget->setMinimumHeight(2 * 144);
    templateListWidget->setGridSize(QSize(144, 144));
    templateListWidget->setWordWrap(true);
    connect(templateListWidget, SIGNAL(itemSelectionChanged()),
            this, SLOT(updateDescription()));
    NewDocumentWizard *wiz = (NewDocumentWizard *)parent;
    connect(templateListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
            wiz, SLOT(next()));

    registerField("templateIdx*", templateListWidget);

    description = new QLabel;
    description->setWordWrap(true);

    QVBoxLayout *layout = new QVBoxLayout(this);
    layout->addLayout(searchLayout);
    layout->addWidget(templateListWidget);
    layout->addWidget(description);
    setLayout(layout);
}
UIWizardFirstRunPageBasic::UIWizardFirstRunPageBasic(const QUuid &uMachineId, bool fBootHardDiskWasSet)
    : UIWizardFirstRunPage(fBootHardDiskWasSet)
{
    /* Create widgets: */
    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    {
        m_pLabel = new QIRichTextLabel(this);
        QHBoxLayout *pSourceDiskLayout = new QHBoxLayout;
        {
            m_pMediaSelector = new UIMediaComboBox(this);
            {
                m_pMediaSelector->setMachineId(uMachineId);
                m_pMediaSelector->setType(UIMediumDeviceType_DVD);
                m_pMediaSelector->repopulate();
            }
            m_pSelectMediaButton = new QIToolButton(this);
            {
                m_pSelectMediaButton->setIcon(UIIconPool::iconSet(":/select_file_16px.png", ":/select_file_disabled_16px.png"));
                m_pSelectMediaButton->setAutoRaise(true);
            }
            pSourceDiskLayout->addWidget(m_pMediaSelector);
            pSourceDiskLayout->addWidget(m_pSelectMediaButton);
        }
        pMainLayout->addWidget(m_pLabel);
        pMainLayout->addLayout(pSourceDiskLayout);
        pMainLayout->addStretch();
    }

    /* Setup connections: */
    connect(m_pMediaSelector, static_cast<void(UIMediaComboBox::*)(int)>(&UIMediaComboBox::currentIndexChanged),
            this, &UIWizardFirstRunPageBasic::completeChanged);
    connect(m_pSelectMediaButton, &QIToolButton::clicked,
            this, &UIWizardFirstRunPageBasic::sltOpenMediumWithFileOpenDialog);

    /* Register fields: */
    registerField("source", this, "source");
    registerField("id", this, "id");
}
UIWizardFirstRunPageBasic::UIWizardFirstRunPageBasic(const QString &strMachineId, bool fBootHardDiskWasSet)
    : UIWizardFirstRunPage(fBootHardDiskWasSet)
{
    /* Create widgets: */
    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    {
        pMainLayout->setContentsMargins(8, 0, 8, 0);
        pMainLayout->setSpacing(10);
        m_pLabel = new QIRichTextLabel(this);
        QHBoxLayout *pSourceDiskLayout = new QHBoxLayout;
        {
            m_pMediaSelector = new VBoxMediaComboBox(this);
            {
                m_pMediaSelector->setMachineId(strMachineId);
                m_pMediaSelector->setType(UIMediumType_DVD);
                m_pMediaSelector->repopulate();
            }
            m_pSelectMediaButton = new QIToolButton(this);
            {
                m_pSelectMediaButton->setIcon(UIIconPool::iconSet(":/select_file_16px.png", ":/select_file_disabled_16px.png"));
                m_pSelectMediaButton->setAutoRaise(true);
            }
            pSourceDiskLayout->addWidget(m_pMediaSelector);
            pSourceDiskLayout->addWidget(m_pSelectMediaButton);
        }
        pMainLayout->addWidget(m_pLabel);
        pMainLayout->addLayout(pSourceDiskLayout);
        pMainLayout->addStretch();
    }

    /* Setup connections: */
    connect(m_pMediaSelector, SIGNAL(currentIndexChanged(int)), this, SIGNAL(completeChanged()));
    connect(m_pSelectMediaButton, SIGNAL(clicked()), this, SLOT(sltOpenMediumWithFileOpenDialog()));

    /* Register fields: */
    registerField("source", this, "source");
    registerField("id", this, "id");
}
Beispiel #9
0
ImportPage::ImportPage(QWidget* parent) : QWizardPage(parent)
{
	gridLayout = new QGridLayout(this);

	label = new QLabel(this);

	gridLayout->addWidget(label, 1, 0, 1, 1);

	progressBar = new QProgressBar(this);

	gridLayout->addWidget(progressBar, 3, 0, 1, 1);

	verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);

	gridLayout->addItem(verticalSpacer, 0, 0, 1, 1);

	verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);

	gridLayout->addItem(verticalSpacer_2, 4, 0, 1, 1);

	registerField("ImportErrors", this, "ImportErrors");
	registerField("ImportResult", this, "ImportResult");
}
OwncloudHttpCredsPage::OwncloudHttpCredsPage(QWidget* parent)
  : AbstractCredentialsWizardPage(),
    _ui(),
    _connected(false),
    _checking(false),
    _progressIndi(new QProgressIndicator (this))
{
    _ui.setupUi(this);

    if(parent){
        _ocWizard = qobject_cast<OwncloudWizard *>(parent);
    }

    registerField( QLatin1String("OCUser*"),   _ui.leUsername);
    registerField( QLatin1String("OCPasswd*"), _ui.lePassword);

    setTitle(WizardCommon::titleTemplate().arg(tr("Connect to %1").arg(Theme::instance()->appNameGUI())));
    setSubTitle(WizardCommon::subTitleTemplate().arg(tr("Enter user credentials")));

    _ui.resultLayout->addWidget( _progressIndi );
    stopSpinner();
    setupCustomization();
}
UIWizardExportAppPageBasic1::UIWizardExportAppPageBasic1(const QStringList &selectedVMNames)
{
    /* Create widgets: */
    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    {
        m_pLabel = new QIRichTextLabel(this);
        m_pVMSelector = new QListWidget(this);
        {
            m_pVMSelector->setAlternatingRowColors(true);
            m_pVMSelector->setSelectionMode(QAbstractItemView::ExtendedSelection);
        }
        pMainLayout->addWidget(m_pLabel);
        pMainLayout->addWidget(m_pVMSelector);
        populateVMSelectorItems(selectedVMNames);
    }

    /* Setup connections: */
    connect(m_pVMSelector, SIGNAL(itemSelectionChanged()), this, SIGNAL(completeChanged()));

    /* Register fields: */
    registerField("machineNames", this, "machineNames");
    registerField("machineIDs", this, "machineIDs");
}
Beispiel #12
0
QWidget *CustomWizardFieldPage::registerTextEdit(const QString &fieldName,
                                                 const CustomWizardField &field)
{
    QTextEdit *textEdit = new QTextEdit;
    // Suppress formatting by default (inverting QTextEdit's default value) when
    // pasting from Bug tracker, etc.
    const bool acceptRichText = field.controlAttributes.value(QLatin1String("acceptRichText")) == QLatin1String("true");
    textEdit->setAcceptRichText(acceptRichText);
    // Connect to completeChanged() for derived classes that reimplement isComplete()
    registerField(fieldName, textEdit, "plainText", SIGNAL(textChanged()));
    connect(textEdit, SIGNAL(textChanged()), SIGNAL(completeChanged()));
    const QString defaultText = field.controlAttributes.value(QLatin1String("defaulttext"));
    m_textEdits.push_back(TextEditData(textEdit, defaultText));
    return textEdit;
} // QTextEdit
KOnlineUpdateWizardPage::KOnlineUpdateWizardPage(QWidget *parent)
    : KOnlineUpdateWizardPageDecl(parent)
{
  m_onlineFactor->setValue(MyMoneyMoney::ONE);
  m_onlineFactor->setPrecision(4);

  // Connect signals-slots
  connect(m_useFinanceQuote, SIGNAL(toggled(bool)), this, SLOT(slotSourceChanged(bool)));

  // Register the fields with the QWizard and connect the
  // appropriate signals to update the "Next" button correctly
  registerField("onlineFactor", m_onlineFactor, "value");
  registerField("onlineSourceCombo", m_onlineSourceCombo, "currentText", SIGNAL(currentIndexChanged(QString)));
  registerField("useFinanceQuote", m_useFinanceQuote);
  connect(m_onlineSourceCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotCheckPage(QString)));
  connect(m_onlineFactor, SIGNAL(textChanged(QString)),
          this, SIGNAL(completeChanged()));

  connect(m_onlineSourceCombo, SIGNAL(activated(QString)),
          this, SIGNAL(completeChanged()));

  connect(m_useFinanceQuote, SIGNAL(toggled(bool)),
          this, SIGNAL(completeChanged()));
}
void OtrPeerIdentityVerificationSharedSecretPage::createGui()
{
	setButtonText(QWizard::CommitButton, tr("Ask for Shared Secret"));
	setCommitPage(true);
	setTitle(tr("Shared Secret"));

	QVBoxLayout *layout = new QVBoxLayout(this);

	QLineEdit *sharedSecretEdit = new QLineEdit();

	layout->addWidget(new QLabel(tr("Shared Secret that is known only for you and %1:").arg(MyContact.display(true))));
	layout->addWidget(sharedSecretEdit);

	registerField("sharedSecret*", sharedSecretEdit);
}
Beispiel #15
0
ViewOptionsPage::ViewOptionsPage(QWidget *parent): QWizardPage(parent) {
    setTitle(tr("View Options"));
    setSubTitle(tr("Choose how the images should be shown."));

    QFormLayout *layout=new QFormLayout;
    QSettings settings;

    QHBoxLayout * const intervalLayout = new QHBoxLayout;
    QSpinBox * const duration = new QSpinBox;
    duration->setRange(100, 24 * 60 * 60 * 1000);
    duration->setValue(settings.value(Setting::SlideShowDuration, 4000).toInt());
    intervalLayout->addWidget(duration);
    intervalLayout->addWidget(new QLabel(tr("milliseconds")));
    intervalLayout->addStretch();
    layout->addRow(tr("Slide interval:"), intervalLayout);
    registerField(Setting::SlideShowDuration, duration);

    QHBoxLayout * const zoomModeLayout = new QHBoxLayout;
    QComboBox * const zoomMode = new QComboBox;
    zoomMode->addItem(tr("Explcit Scale"),    MainWindow::ExplicitScale);
    zoomMode->addItem(tr("Shrink to Window"), MainWindow::ShrinkToWindow);
    zoomMode->addItem(tr("Zoom to Window"),   MainWindow::ZoomToWindow);
    zoomMode->setCurrentIndex(zoomMode->findText(settings.value(Setting::ZoomMode).toString()));
    registerField(Setting::ZoomMode, zoomMode, "currentText");
    QDoubleSpinBox * const explicitScale = new QDoubleSpinBox;
    explicitScale->setDecimals(3);
    explicitScale->setRange(1E-3, 2048.0);
    explicitScale->setValue(settings.value(Setting::ExplicitScale, 1.0).toDouble());
    zoomModeLayout->addWidget(zoomMode);
    zoomModeLayout->addWidget(explicitScale);
    zoomModeLayout->addStretch();
    layout->addRow(tr("Zoom mode:"), zoomModeLayout);
    registerField(Setting::ExplicitScale, explicitScale);

    setLayout(layout);
}
Beispiel #16
0
QQBoardWizardIntro::QQBoardWizardIntro(QWidget *parent) :
	QWizardPage(parent)
{
	setTitle(tr("Board access method selection"));
	setSubTitle(tr("With quteqoin you can fetch backend and post messages using either Olccs or directly.<br>Please select the mode you intend to use for this board"));

	QVBoxLayout *layout = new QVBoxLayout;

	layout->addItem(new QSpacerItem(0,10, QSizePolicy::Expanding, QSizePolicy::Expanding));

	m_modeNativeRB = new QRadioButton("Native (direct) mode", this);
	m_modeNativeRB->setChecked(true);
	layout->addWidget(m_modeNativeRB);

	m_modeOlccsRB = new QRadioButton("Olccs mode", this);
	layout->addWidget(m_modeOlccsRB);

	registerField("Native_Mode", m_modeNativeRB);
	registerField("Olccs_Mode", m_modeOlccsRB);

	layout->addItem(new QSpacerItem(0,10, QSizePolicy::Expanding, QSizePolicy::Expanding));

	setLayout(layout);
}
Beispiel #17
0
FinalSummaryPage::FinalSummaryPage(QWidget* parent) : QWizardPage(parent)
{
    QVBoxLayout* vb = new QVBoxLayout(this);
    header = new QLabel;
    header->setWordWrap(true);
    vb->addWidget(header);
    QFrame *line = new QFrame(this);
    line->setFrameStyle(QFrame::HLine | QFrame::Sunken);
    vb->addWidget(line);
    summary = new QLabel;
    vb->addWidget(summary);
    registerField("FinalSummaryPage_summary", summary);

    docDeleted = 0;
    cleanupAborted = false;
}
Beispiel #18
0
// =================================================================================
FolderWizardTargetPage::FolderWizardTargetPage()
: _dirChecked( false ),
  _warnWasVisible(false)
{
    _ui.setupUi(this);
    _ui.warnFrame->hide();

    registerField(QLatin1String("OCFolderLineEdit"),    _ui.OCFolderLineEdit);

    connect( _ui.OCFolderLineEdit, SIGNAL(textChanged(QString)),
             SLOT(slotFolderTextChanged(QString)));

    _timer = new QTimer(this);
    _timer->setSingleShot( true );
    connect( _timer, SIGNAL(timeout()), SLOT(slotTimerFires()));
}
Beispiel #19
0
PHIWizardRoot::PHIWizardRoot( QWidget *parent )
    : QWizardPage( parent )
{
    qDebug( "PHIWizardRoot::PHIWizardRoot()" );
    setupUi( this );
    QSettings s( "/etc/phi/phis.conf", QSettings::IniFormat );
    QString binDir=s.value( "BinDir", QString( "/opt/phisketeer-%1/bin" ).arg( PHIVERSION ) ).toString();
    binDir.replace( QRegExp( ".bin$" ), "" );
    if ( binDir.contains( '-' ) ) {
        binDir.replace( QRegExp( "-[^-]*$" ), "" );
        binDir.append( QString( '-' )+PHIVERSION );
    }
    _rootDir->setText( binDir );
    _rootDir->setReadOnly( true );
    registerField( "rootdir", _rootDir );
}
AssociateProfilesPage::AssociateProfilesPage(AntiMicroSettings *settings, QWidget *parent) :
    QWizardPage(parent)
{
    this->settings = settings;

    setTitle(tr("Associate Profiles"));
    setSubTitle(tr("Associate .amgp files"));
    setLayout(new QVBoxLayout);
    layout()->addWidget(new QLabel(
                            tr("Would you like to associate antimicro with .amgp files?")));

    associateCheckBox = new QCheckBox(tr("Associate"));
    layout()->addWidget(associateCheckBox);

    registerField("associateProfiles", associateCheckBox);
}
UIFirstRunWzdPage3::UIFirstRunWzdPage3()
{
    /* Decorate page */
    Ui::UIFirstRunWzdPage3::setupUi(this);

    /* Register CMachine class */
    qRegisterMetaType<CMachine>();

    /* Register 'machine' field */
    registerField("machine", this, "machine");

    /* Disable the background painting of the summary widget */
    m_pSummaryText->viewport()->setAutoFillBackground(false);
    /* Make the summary field read-only */
    m_pSummaryText->setReadOnly(true);
}
UIWizardImportAppPageExpert::UIWizardImportAppPageExpert(const QString &strFileName)
{
    /* Create widgets: */
    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    {
        pMainLayout->setContentsMargins(8, 6, 8, 6);
        pMainLayout->setSpacing(10);
        m_pApplianceCnt = new QGroupBox(this);
        {
            QVBoxLayout *pApplianceCntLayout = new QVBoxLayout(m_pApplianceCnt);
            {
                m_pFileSelector = new VBoxEmptyFileSelector(m_pApplianceCnt);
                {
                    m_pFileSelector->setHomeDir(vboxGlobal().documentsPath());
                    m_pFileSelector->setMode(VBoxFilePathSelectorWidget::Mode_File_Open);
                    m_pFileSelector->setButtonPosition(VBoxEmptyFileSelector::RightPosition);
                    m_pFileSelector->setEditable(true);
                }
                pApplianceCntLayout->addWidget(m_pFileSelector);
            }
        }
        m_pSettingsCnt = new QGroupBox(this);
        {
            QVBoxLayout *pSettingsCntLayout = new QVBoxLayout(m_pSettingsCnt);
            {
                m_pApplianceWidget = new UIApplianceImportEditorWidget(m_pSettingsCnt);
                {
                    m_pApplianceWidget->setMinimumHeight(300);
                    m_pApplianceWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
                    m_pApplianceWidget->setFile(strFileName);
                }
                pSettingsCntLayout->addWidget(m_pApplianceWidget);
            }
        }
        pMainLayout->addWidget(m_pApplianceCnt);
        pMainLayout->addWidget(m_pSettingsCnt);
        m_pFileSelector->setPath(strFileName);
    }

    /* Setup connections: */
    connect(m_pFileSelector, SIGNAL(pathChanged(const QString&)), this, SLOT(sltFilePathChangeHandler()));

    /* Register classes: */
    qRegisterMetaType<ImportAppliancePointer>();
    /* Register fields: */
    registerField("applianceWidget", this, "applianceWidget");
}
Beispiel #23
0
DriverPage::DriverPage(QWidget *parent): QWizardPage(parent)
{
	setTitle("Driver");
	setSubTitle("Select the requested driver.");
	
	_comboBox = new QComboBox();
	_comboBox->addItem("SQLite");
	_comboBox->addItem("MySQL");
	_comboBox->addItem("PostgreSQL");
	
	QVBoxLayout *layout = new QVBoxLayout;
	layout->addWidget(_comboBox);
	setLayout(layout);
	
	registerField("driver", _comboBox);
	
}
SaveFile::SaveFile(QWidget *parent) :
  QWizardPage(parent),
  ui(new Ui::SaveFile)
{
  ui->setupUi(this);

  ui -> title -> setText("<h1>4. Encryption</h1>");
  ui -> description -> setText("Choose a location to save your file:<br />"
                               "Note: file settings will be saved with the cipher "
                               "text, it is recommended to save them into "
                               "a <b>new folder</b><br><br>");
  ui -> description -> setWordWrap(true);

  connect(ui -> choose_button, SIGNAL(clicked()), this, SLOT(save_file()));

  registerField("save_file_path", ui ->save_file_path);
}
Beispiel #25
0
QT_BEGIN_NAMESPACE

InputPage::InputPage(AdpReader *reader, QWidget *parent)
    : QWizardPage(parent)
{
    m_adpReader = reader;
    setTitle(tr("Input File"));
    setSubTitle(tr("Specify the .adp or .dcf file you want "
        "to convert to the new Qt help project format and/or "
        "collection format."));

    m_ui.setupUi(this);
    connect(m_ui.browseButton, SIGNAL(clicked()),
        this, SLOT(getFileName()));

    registerField(QLatin1String("adpFileName"), m_ui.fileLineEdit);
}
Beispiel #26
0
PHIWizardLicense::PHIWizardLicense( QWidget *parent )
    : QWizardPage( parent )
{
    qDebug( "PHIWizardLicense::PHIWizardLicense()" );
    setupUi( this );
    QString text;
    QFile f( QDir::currentPath()+"/license.txt" );
    if ( f.open( QIODevice::ReadOnly ) ) {
        QTextStream t( &f );
        text=t.readAll();
    } else text=QDir::currentPath();
    text.replace( "\r\n", "\n" );

    _license->setText( text );
    _license->setReadOnly( true );
    registerField( "license*", _accept );
}
RawTextEnterPage::RawTextEnterPage()
{
    setTitle(tr("Text eingaben"));
    setSubTitle(tr("Es können Pathologiebefunde (Textversion, nicht PDF) eines oder mehrerer Patienten eingegeben werden"));

    QVBoxLayout* layout = new QVBoxLayout;

    textEdit = new QTextEdit;
    layout->addWidget(textEdit, 1);
    registerField("rawText*", textEdit, "plainText", SIGNAL(textChanged()));

    QPushButton* clipboardButton = new QPushButton(tr("Aus Zwischenablage einfügen"));
    layout->addWidget(clipboardButton);

    setLayout(layout);

    connect(clipboardButton, &QPushButton::clicked, this, &RawTextEnterPage::copyClipboard);
}
Beispiel #28
0
QWidget *CustomWizardFieldPage::registerCheckBox(const QString &fieldName,
                                                 const QString &fieldDescription,
                                                 const CustomWizardField &field)
{
    typedef CustomWizardField::ControlAttributeMap::const_iterator AttributeMapConstIt;

    TextFieldCheckBox *checkBox = new TextFieldCheckBox(fieldDescription);
    const bool defaultValue = field.controlAttributes.value(QLatin1String("defaultvalue")) == QLatin1String("true");
    checkBox->setChecked(defaultValue);
    const AttributeMapConstIt trueTextIt = field.controlAttributes.constFind(QLatin1String("truevalue"));
    if (trueTextIt != field.controlAttributes.constEnd()) // Also set empty texts
        checkBox->setTrueText(trueTextIt.value());
    const AttributeMapConstIt falseTextIt = field.controlAttributes.constFind(QLatin1String("falsevalue"));
    if (falseTextIt != field.controlAttributes.constEnd()) // Also set empty texts
        checkBox->setFalseText(falseTextIt.value());
    registerField(fieldName, checkBox, "text", SIGNAL(textChanged(QString)));
    return checkBox;
}
Beispiel #29
0
ConclusionPage::ConclusionPage(QWidget *parent)
    : QWizardPage(parent)
{
    setTitle(tr("Complete Your Registration"));
    setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/watermark.png"));

    bottomLabel = new QLabel;
    bottomLabel->setWordWrap(true);

    agreeCheckBox = new QCheckBox(tr("I agree to the terms of the license"));

    registerField("conclusion.agree*", agreeCheckBox);

    QVBoxLayout *layout = new QVBoxLayout;
    layout->addWidget(bottomLabel);
    layout->addWidget(agreeCheckBox);
    setLayout(layout);
}
UIWizardNewVDPageBasic1::UIWizardNewVDPageBasic1()
{
    /* Create widgets: */
    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    {
        m_pLabel = new QIRichTextLabel(this);
        QVBoxLayout *pFormatLayout = new QVBoxLayout;
        {
            m_pFormatButtonGroup = new QButtonGroup(this);
            {
                CSystemProperties systemProperties = vboxGlobal().virtualBox().GetSystemProperties();
                const QVector<CMediumFormat> &medFormats = systemProperties.GetMediumFormats();
                for (int i = 0; i < medFormats.size(); ++i)
                {
                    const CMediumFormat &medFormat = medFormats[i];
                    if (medFormat.GetName() == "VDI")
                        addFormatButton(this, pFormatLayout, medFormat);
                }
                for (int i = 0; i < medFormats.size(); ++i)
                {
                    const CMediumFormat &medFormat = medFormats[i];
                    if (medFormat.GetName() != "VDI")
                        addFormatButton(this, pFormatLayout, medFormat);
                }
            }
            if (!m_pFormatButtonGroup->buttons().isEmpty())
            {
                m_pFormatButtonGroup->button(0)->click();
                m_pFormatButtonGroup->button(0)->setFocus();
            }
        }
        pMainLayout->addWidget(m_pLabel);
        pMainLayout->addLayout(pFormatLayout);
        pMainLayout->addStretch();
    }

    /* Setup connections: */
    connect(m_pFormatButtonGroup, SIGNAL(buttonClicked(QAbstractButton*)), this, SIGNAL(completeChanged()));

    /* Register classes: */
    qRegisterMetaType<CMediumFormat>();
    /* Register fields: */
    registerField("mediumFormat", this, "mediumFormat");
}