Exemple #1
0
NewWizardPage4::NewWizardPage4(QWidget* parent)
   : QWizardPage(parent)
      {
      setFinalPage(true);
      setTitle(tr("Create New Score"));
      setSubTitle(tr("Choose template file:"));
      setAccessibleName(title());
      setAccessibleDescription(subTitle());

      templateFileBrowser = new ScoreBrowser;
      templateFileBrowser->setStripNumbers(true);
      templateFileBrowser->setShowCustomCategory(true);
      templateFileBrowser->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored));
      buildTemplatesList();

      QVBoxLayout* layout = new QVBoxLayout;
      QHBoxLayout* searchLayout = new QHBoxLayout;
      QLineEdit* search = new QLineEdit;
      search->setPlaceholderText(tr("Search"));
      search->setClearButtonEnabled(true);
      search->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
      searchLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::Maximum));
      searchLayout->addWidget(search);

      layout->addLayout(searchLayout);
      layout->addWidget(templateFileBrowser);
      setLayout(layout);

      connect(templateFileBrowser, SIGNAL(scoreSelected(const QString&)), SLOT(templateChanged(const QString&)));
      connect(templateFileBrowser, SIGNAL(scoreActivated(const QString&)), SLOT(fileAccepted(const QString&)));
      connect(search, &QLineEdit::textChanged, [this] (const QString& searchString) {
            this->templateFileBrowser->filter(searchString);
            });
      }
/**
 * Slot for the generate button. Starts the code generation.
 */
void CodeGenStatusPage::generateCode()
{
    ui_pushButtonGenerate->setEnabled(false);
    setCommitPage(true);  //:TODO: disable back and cancel button ?

    CodeGenerator* codeGenerator = UMLApp::app()->generator();
    UMLDoc* doc = UMLApp::app()->document();

    if (codeGenerator) {
        connect(codeGenerator, SIGNAL(codeGenerated(UMLClassifier*,bool)),
                this, SLOT(classGenerated(UMLClassifier*,bool)));
        connect(codeGenerator, SIGNAL(showGeneratedFile(QString)),
                this, SLOT(showFileGenerated(QString)));

        UMLClassifierList cList;

        for (int row = 0; row < ui_tableWidgetStatus->rowCount(); ++row) {
            QTableWidgetItem* item = ui_tableWidgetStatus->item(row, 0);
            UMLClassifier *concept = doc->findUMLClassifier(item->text());
            if (concept == NULL) {
                uError() << "Could not find classifier " << item->text()
                         << " - not included in generated code.";
                continue;
            }
            cList.append(concept);
        }
        codeGenerator->writeCodeToFile(cList);

        m_generationDone = true;
        setFinalPage(true);
        emit completeChanged();
    }
}
Exemple #3
0
TLEndPage::TLEndPage(RfmBindWizard *wizard, QWidget *parent) :
    AbstractWizardPage(wizard, parent),
    ui(new Ui::EndPage)
{
    ui->setupUi(this);
    setFinalPage(true);
}
NotYetImplementedPage::NotYetImplementedPage(SetupWizard *wizard, QWidget *parent) :
    AbstractWizardPage(wizard, parent),
    ui(new Ui::NotYetImplementedPage)
{
    ui->setupUi(this);
    setFinalPage(true);
}
DataImporterImportPage::DataImporterImportPage(DbUiManager *uiManager, QWidget *parent) :
    ConnectionPageWizardPage(uiManager, parent), queryScheduler(0), workerThread(0)
{
    setTitle(tr("Importing..."));
    setSubTitle(tr("Data import is in progress"));
    setFinalPage(true);

    QHBoxLayout *mainLayout = new QHBoxLayout();

    QVBoxLayout *centerLayout = new QVBoxLayout();

    statusLabel = new QLabel(tr("Starting..."));
    centerLayout->addWidget(statusLabel);

    stopButton = new QPushButton(IconUtil::getIcon("stop"), tr("Stop"));
    centerLayout->addWidget(stopButton);
    stopButton->setVisible(false);

    mainLayout->addLayout(centerLayout);
    mainLayout->setAlignment(centerLayout, Qt::AlignCenter);
    setLayout(mainLayout);

    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

    connect(stopButton, SIGNAL(clicked()), this, SLOT(stopButtonPressed()));
}
FixedWingPage::FixedWingPage(SetupWizard *wizard, QWidget *parent) :
    AbstractWizardPage(wizard, parent),
    ui(new Ui::FixedWingPage)
{
    ui->setupUi(this);
    setFinalPage(true);
}
Exemple #7
0
PHIWizardInstall::PHIWizardInstall( QWidget *parent )
    : QWizardPage( parent )
{
    qDebug( "PHIWizardInstall::PHIWizardInstall()" );
    setPixmap( QWizard::WatermarkPixmap, QPixmap( ":/misc/watermark" ) );
    setupUi( this );
    setFinalPage( true );
}
Exemple #8
0
EndPage::EndPage(SetupWizard *wizard, QWidget *parent) :
    AbstractWizardPage(wizard, parent),
    ui(new Ui::EndPage)
{
    ui->setupUi(this);
    setFinalPage(true);
    connect(ui->inputWizardButton, SIGNAL(clicked()), this, SLOT(openInputWizard()));
}
Exemple #9
0
OpenPage::OpenPage( QWidget *parent ) :
    QWizardPage(parent)
{
    ui.setupUi( this );

    setTitle( tr( "Project wizard" ) );
    setSubTitle( tr( "Ready to load this project" ) );

    setFinalPage( true );
}
Exemple #10
0
void UIWizardCloneVMPageBasic2::sltButtonClicked(QAbstractButton *pButton)
{
    setFinalPage(pButton != m_pFullCloneRadio);
    /* On older Qt versions the content of the current page isn't updated when
     * using setFinalPage. So switch back and for to simulate it. */
#if QT_VERSION < 0x040700
    wizard()->back();
    wizard()->next();
#endif
}
OMTWizardPage::OMTWizardPage(QWidget *parent) :
    QWizardPage(parent),
    ui(new Ui::OMTWizardPage)
{
    ui->setupUi(this);

    connect(ui->widget, SIGNAL(OMTModified()), this, SIGNAL(completeChanged()));

    setFinalPage(true);
}
Exemple #12
0
NewWizardPage3::NewWizardPage3(QWidget* parent)
   : QWizardPage(parent)
      {
      setFinalPage(true);
      setTitle(tr("Create New Score"));
      setSubTitle(tr("Choose time signature:"));
      setAccessibleName(title());
      setAccessibleDescription(subTitle());

      w = new TimesigWizard;
      QGridLayout* grid = new QGridLayout;
      grid->addWidget(w, 0, 0);
      setLayout(grid);
      }
Exemple #13
0
NewWizardPage2::NewWizardPage2(QWidget* parent)
   : QWizardPage(parent)
      {
      setFinalPage(true);
      setTitle(tr("Create New Score"));
      setSubTitle(tr("Choose instruments on the left to add to instrument list on the right:"));
      setAccessibleName(title());
      setAccessibleDescription(subTitle());
      w        = new InstrumentsWidget;
      QGridLayout* grid = new QGridLayout;
      grid->setSpacing(0);
      grid->setContentsMargins(0, 0, 0, 0);
      grid->addWidget(w, 0, 0);
      setLayout(grid);
      connect(w, SIGNAL(completeChanged(bool)), SLOT(setComplete(bool)));
      }
Exemple #14
0
NewWizardPage5::NewWizardPage5(QWidget* parent)
   : QWizardPage(parent)
      {
      setFinalPage(true);
      setTitle(tr("Create New Score"));
      setSubTitle(tr("Choose key signature and tempo:"));
      setAccessibleName(title());
      setAccessibleDescription(subTitle());

      QGroupBox* b1 = new QGroupBox;
      b1->setTitle(tr("Key Signature"));
      b1->setAccessibleName(title());
      sp = MuseScore::newKeySigPalette();
      sp->setMoreElements(false);
      sp->setShowContextMenu(false);
      sp->setSelectable(true);
      sp->setDisableDoubleClick(true);
      sp->setSelected(14);
      PaletteScrollArea* sa = new PaletteScrollArea(sp);
      QVBoxLayout* l1 = new QVBoxLayout;
      l1->addWidget(sa);
      b1->setLayout(l1);

      tempoGroup = new QGroupBox;
      tempoGroup->setCheckable(true);
      tempoGroup->setChecked(false);
      tempoGroup->setTitle(tr("Tempo"));
      QLabel* bpm = new QLabel;
      bpm->setText(tr("BPM:"));
      _tempo = new QDoubleSpinBox;
      _tempo->setAccessibleName(tr("Beats per minute"));
      _tempo->setRange(20.0, 400.0);
      _tempo->setValue(120.0);
      _tempo->setDecimals(1);
      QHBoxLayout* l2 = new QHBoxLayout;
      l2->addWidget(bpm);
      l2->addWidget(_tempo);
      l2->addStretch(100);
      tempoGroup->setLayout(l2);

      QVBoxLayout* l3 = new QVBoxLayout;
      l3->addWidget(b1);
      l3->addWidget(tempoGroup);
      l3->addStretch(100);
      setLayout(l3);
      setFocusPolicy(Qt::StrongFocus);
      }
ImportFinishPage::ImportFinishPage(QWidget* parent) : QWizardPage(parent)
{
	setFinalPage(true);
	gridLayout = new QGridLayout(this);
	gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
	resultLabel = new QLabel(this);
	resultLabel->setObjectName(QString::fromUtf8("resultLabel"));

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

	errorDisplay = new QPlainTextEdit(this);
	errorDisplay->setObjectName(QString::fromUtf8("errorDisplay"));

	gridLayout->addWidget(errorDisplay, 1, 0, 1, 1);
	
	setLayout(gridLayout);
}
Exemple #16
0
QT_BEGIN_NAMESPACE

FinishPage::FinishPage(QWidget *parent)
    : QWizardPage(parent)
{
    setTitle(tr("Converting File"));
    setSubTitle(tr("Creating the new Qt help files from the old ADP file."));
    setFinalPage(true);

    QVBoxLayout *layout = new QVBoxLayout(this);
    layout->addItem(new QSpacerItem(20, 20, QSizePolicy::Minimum,
        QSizePolicy::Fixed));

    m_textEdit = new QTextEdit();
    layout->addWidget(m_textEdit);

    layout->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum,
        QSizePolicy::Expanding));
}
void
CreateCollectionPage::initializePage()
{
    Virtaus::Core::Collection* collection = new Virtaus::Core::Collection;

    QString collection_path = QDir::homePath()+"/"+tr("My Collections");
    collection_path += "/"+field("name").toString();

    collection->setInfo("name", field("name").toString());
    collection->setInfo("author", field("author").toString());
    collection->setInfo("email", field("email").toString());
    collection->setInfo("path", collection_path);

    Virtaus::Core::DataWriter* writer = new Virtaus::Core::DataWriter;
    QObject::connect(writer, SIGNAL(fileCreated(QString)), this, SLOT(file_created(QString)));
    success = writer->createCollection(collection);

    if (success)
        setFinalPage(true);
}
//-----------------------------------------------------------------------------
// Function: BusInterfaceWizardPortMapPage::BusInterfaceWizardPortMapPage()
//-----------------------------------------------------------------------------
BusInterfaceWizardPortMapPage::BusInterfaceWizardPortMapPage(QSharedPointer<Component> component, 
    QSharedPointer<BusInterface> busIf, LibraryInterface* lh, 
    QStringList physicalPorts,
    BusInterfaceWizard* parent)
    : QWizardPage(parent),      
    component_(component),
    busIf_(busIf),
    handler_(lh),
    portMapTab_(lh, component, busIf.data(), this)
{
    setTitle(tr("Port Maps"));
    setSubTitle(tr("Create port maps for interface %1.").arg(busIf->getName()));
    setFinalPage(false);
    
    portMapTab_.setPhysicalPorts(physicalPorts);
    connect(&portMapTab_, SIGNAL(errorMessage(const QString&)),
        this, SLOT(showErrorMessage(const QString&)), Qt::UniqueConnection);

    setupLayout();
}
void WizardPage_Finish::initializePage()
{
    setFinalPage(true);

    setTitle( tr("Finish") );
    setSubTitle( tr("Configuring...") );
    wizard()->button( QWizard::CancelButton )->hide();

    // locale
    QString locale = field("locale").toString();
    locale = QLocale(locale).name();

    locale = locale + ".UTF-8";
    qDebug() << locale;
    g_engine->cmdSetLang( locale.toLatin1() );

    // grub
    QString pathGrub = field("pathGrub").toString();
    if( !pathGrub.isEmpty() ) {
        qDebug() << "install grub on:" << pathGrub;
        g_engine->cmdSetBootEntry( pathGrub.toLatin1() );
    }

    // useradd
    ( static_cast<WizardPage_UserAdd*>(wizard()->page(Page_UserAdd)) )->setPasswdUser();


    // start the postscript dialog.
    m_thread = new PostThread();
    connect( m_thread, SIGNAL( poststate(bool, QString) ), this, SLOT( setPostState(bool, QString) ) );
    connect( m_thread, SIGNAL( finished() ), this, SLOT( restorePage() ) );

    m_dialog = new DialogPostscript(this);
    m_dialog->setModal( true );
    //connect( m_thread, SIGNAL( finished() ), m_dialog, SLOT( accept() ) );

    m_dialog->setLabelText();
    QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
    QTimer::singleShot(0, this, SLOT(start()));
}
Exemple #20
0
runPage::runPage (QWidget *parent, RUN_PROGRESS *prog, QListWidget **cList):
  QWizardPage (parent)
{
  progress = prog;


  setTitle (tr ("Build PFM Structure(s)"));

  setPixmap (QWizard::WatermarkPixmap, QPixmap(":/icons/pfmLoadWatermark.png"));

  setFinalPage (TRUE);

  QVBoxLayout *vbox = new QVBoxLayout (this);
  vbox->setMargin (5);
  vbox->setSpacing (5);


  progress->fbox = new QGroupBox (tr ("Input file processing progress"), this);
  QVBoxLayout *fboxLayout = new QVBoxLayout;
  progress->fbox->setLayout (fboxLayout);
  fboxLayout->setSpacing (10);


  progress->fbar = new QProgressBar (this);
  progress->fbar->setRange (0, 100);
  progress->fbar->setWhatsThis (tr ("Progress of input file loading"));
  fboxLayout->addWidget (progress->fbar);


  vbox->addWidget (progress->fbox);


  progress->rbox = new QGroupBox (tr ("PFM bin recompute/filter progress"), this);
  QVBoxLayout *rboxLayout = new QVBoxLayout;
  progress->rbox->setLayout (rboxLayout);
  rboxLayout->setSpacing (10);

  progress->rbar = new QProgressBar (this);
  progress->rbar->setRange (0, 100);
  progress->rbar->setWhatsThis (tr ("Progress of PFM bin recomputation or filter process"));
  rboxLayout->addWidget (progress->rbar);


  vbox->addWidget (progress->rbox);


  QGroupBox *lbox = new QGroupBox (tr ("Process status"), this);
  QVBoxLayout *lboxLayout = new QVBoxLayout;
  lbox->setLayout (lboxLayout);
  lboxLayout->setSpacing (10);


  checkList = new QListWidget (this);
  checkList->setAlternatingRowColors (TRUE);
  lboxLayout->addWidget (checkList);


  vbox->addWidget (lbox);


  *cList = checkList;


  //  Serious cheating here ;-)  I want the finish button to be disabled when you first get to this page
  //  so I set the last progress bar to be a "mandatory" field.  I couldn't disable the damn button in
  //  initializePage in the parent for some unknown reason.

  registerField ("progress_rbar*", progress->rbar, "value");
}
Exemple #21
0
runPage::runPage (QWidget *parent, RUN_PROGRESS *prog):
  QWizardPage (parent)
{
  progress = prog;


  setTitle (tr ("Process Page"));

  setPixmap (QWizard::WatermarkPixmap, QPixmap(":/icons/chartsLASWatermark.png"));

  setFinalPage (TRUE);

  QVBoxLayout *vbox = new QVBoxLayout (this);
  vbox->setMargin (5);
  vbox->setSpacing (5);


  progress->fbox = new QGroupBox (tr ("Current file conversion progress"), this);
  QVBoxLayout *fboxLayout = new QVBoxLayout;
  progress->fbox->setLayout (fboxLayout);
  fboxLayout->setSpacing (10);


  progress->fbar = new QProgressBar (this);
  progress->fbar->setRange (0, 100);
  progress->fbar->setWhatsThis (tr ("Progress of the conversion of the current input data file."));
  fboxLayout->addWidget (progress->fbar);


  vbox->addWidget (progress->fbox);


  progress->obox = new QGroupBox (tr ("Total file conversion progress"), this);
  QVBoxLayout *oboxLayout = new QVBoxLayout;
  progress->obox->setLayout (oboxLayout);
  oboxLayout->setSpacing (10);


  progress->obar = new QProgressBar (this);
  progress->obar->setRange (0, 100);
  progress->obar->setWhatsThis (tr ("Progress of the conversion of all of the input data files."));
  oboxLayout->addWidget (progress->obar);


  vbox->addWidget (progress->obox);


  QGroupBox *listBox = new QGroupBox (tr ("Status information"), this);
  QHBoxLayout *listBoxLayout = new QHBoxLayout;
  listBox->setLayout (listBoxLayout);
  listBoxLayout->setSpacing (10);

  progress->list = new QListWidget (this);
  progress->list->setAlternatingRowColors (TRUE);

  listBoxLayout->addWidget (progress->list);

  vbox->addWidget (listBox);


  //  Serious cheating here ;-)  I want the finish button to be disabled when you first get to this page
  //  so I set the last progress bar to be a "mandatory" field.  I couldn't disable the damn button in
  //  initializePage in the parent for some unknown reason.

  registerField ("progress_obar*", progress->obar, "value");
}
void FirstRunWizardPage_WorkspacePath::on_rbtnCreateWs_toggled(bool checked) {
  mUi->lblCreateWs->setEnabled(checked);
  mUi->edtCreateWsPath->setEnabled(checked);
  mUi->btnCreateWsBrowse->setEnabled(checked);
  setFinalPage(!checked);  // force updating page order
}