当前位置: 首页>>代码示例>>C++>>正文


C++ registerField函数代码示例

本文整理汇总了C++中registerField函数的典型用法代码示例。如果您正苦于以下问题:C++ registerField函数的具体用法?C++ registerField怎么用?C++ registerField使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了registerField函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AbstractCredentialsWizardPage

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();
}
开发者ID:RobinGeuze,项目名称:client,代码行数:39,代码来源:owncloudhttpcredspage.cpp

示例2: QWizardPage

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);
      }
开发者ID:Archer90,项目名称:MuseScore,代码行数:13,代码来源:newwizard.cpp

示例3: QWizardPage

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()));
}
开发者ID:algts,项目名称:Horde3D,代码行数:22,代码来源:ConverterWizard.cpp

示例4: QWizardPage

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();
}
开发者ID:KDE,项目名称:simon,代码行数:22,代码来源:importgrammarselectinputpage.cpp

示例5: QWizardPage

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);
}
开发者ID:kyledevans,项目名称:Medicine-Track,代码行数:22,代码来源:prescription_01.cpp

示例6: QWizardPage

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);
}
开发者ID:c3d,项目名称:tao-3D,代码行数:51,代码来源:new_document_wizard.cpp

示例7: UIWizardFirstRunPage

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");
}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:38,代码来源:UIWizardFirstRunPageBasic.cpp

示例8: UIWizardFirstRunPage

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");
}
开发者ID:jeppeter,项目名称:vbox,代码行数:38,代码来源:UIWizardFirstRunPageBasic.cpp

示例9: QWizardPage

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");
}
开发者ID:HoTaeWang,项目名称:CuteTorrent,代码行数:23,代码来源:ImportPage.cpp

示例10: AbstractCredentialsWizardPage

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();
}
开发者ID:JamesFmoran,项目名称:client,代码行数:23,代码来源:owncloudhttpcredspage.cpp

示例11: QVBoxLayout

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");
}
开发者ID:svn2github,项目名称:virtualbox,代码行数:23,代码来源:UIWizardExportAppPageBasic1.cpp

示例12: QLatin1String

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
开发者ID:gs93,项目名称:qt-creator,代码行数:15,代码来源:customwizardpage.cpp

示例13: KOnlineUpdateWizardPageDecl

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()));
}
开发者ID:CGenie,项目名称:kmymoney,代码行数:24,代码来源:konlineupdatewizardpage.cpp

示例14: setButtonText

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);
}
开发者ID:leewood,项目名称:kadu,代码行数:15,代码来源:otr-peer-identity-verification-shared-secret-page.cpp

示例15: QWizardPage

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);
}
开发者ID:pcolby,项目名称:quickview,代码行数:36,代码来源:viewoptionspage.cpp


注:本文中的registerField函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。