Example #1
0
CoreConnectDlg::CoreConnectDlg(QWidget *parent) : QDialog(parent)
{
    _settingsPage = new CoreAccountSettingsPage(this);
    _settingsPage->setStandAlone(true);
    _settingsPage->load();

    CoreAccountSettings s;
    AccountId lastAccount = s.lastAccount();
    if (lastAccount.isValid())
        _settingsPage->setSelectedAccount(lastAccount);

    setWindowTitle(tr("Connect to Core"));
    setWindowIcon(QIcon::fromTheme("network-disconnect"));

    QVBoxLayout *layout = new QVBoxLayout(this);
    layout->addWidget(_settingsPage);

    QDialogButtonBox *buttonBox = new QDialogButtonBox(this);
    buttonBox->setStandardButtons(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
    layout->addWidget(buttonBox);

    connect(_settingsPage, SIGNAL(connectToCore(AccountId)), SLOT(accept()));
    connect(buttonBox, SIGNAL(accepted()), SLOT(accept()));
    connect(buttonBox, SIGNAL(rejected()), SLOT(reject()));
}
//---------------------------------------------------------------------------
//  JudgeSelectDialog
//
//! Constructor.
//
//! @param parent the parent widget
//! @param f widget flags
//---------------------------------------------------------------------------
JudgeSelectDialog::JudgeSelectDialog(QWidget* parent, Qt::WFlags f)
    : QDialog(parent, f)
{
    QVBoxLayout* mainVlay = new QVBoxLayout(this);
    mainVlay->setMargin(MARGIN);
    mainVlay->setSpacing(SPACING);

    QLabel* instructionLabel = new QLabel;
    QString message = "You are now entering the full screen Word Judge mode.\n"
                      "To exit full screen mode, press ESC while holding the "
                      "Shift key.\n\n"
                      "Please choose a lexicon for the Word Judge.";
    message = Auxil::dialogWordWrap(message);
    instructionLabel->setText(message);
    mainVlay->addWidget(instructionLabel);

    lexiconWidget = new LexiconSelectWidget;
    mainVlay->addWidget(lexiconWidget);

    QDialogButtonBox* buttonBox = new QDialogButtonBox;
    buttonBox->setOrientation(Qt::Horizontal);
    buttonBox->setStandardButtons(QDialogButtonBox::Ok |
                                  QDialogButtonBox::Cancel);
    connect(buttonBox, SIGNAL(accepted()), SLOT(accept()));
    connect(buttonBox, SIGNAL(rejected()), SLOT(reject()));
    mainVlay->addWidget(buttonBox);

    setWindowTitle(DIALOG_CAPTION);
}
Example #3
0
void AnimCurveControl::editGraphClicked() {
#ifdef SEEXPR_USE_ANIMLIB
    QDialog* dialog = new QDialog(this);
    CETool* tool = new CETool;
    animlib::AnimAttrID attr1("", "");
    animlib::AnimCurve& anim = *new animlib::AnimCurve(attr1);
    anim = _editable->curve;

    QWidget* widg;
    tool->map(widg, 0);
    QVBoxLayout* layout = new QVBoxLayout();
    dialog->resize(QSize(1024, 640));
    dialog->setLayout(layout);
    layout->addWidget(widg);
    tool->addCurve(&anim);

    QDialogButtonBox* buttonbar = new QDialogButtonBox();
    buttonbar->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
    connect(buttonbar, SIGNAL(accepted()), dialog, SLOT(accept()));
    connect(buttonbar, SIGNAL(rejected()), dialog, SLOT(reject()));
    layout->addWidget(buttonbar);

    if (dialog->exec() == QDialog::Accepted) {
        // copy points back from child
        _editable->curve = anim;
        _preview->sample(_editable->curve);
        _preview->repaint();
        emit controlChanged(_id);
    }
#endif
}
Example #4
0
void KUrlRequesterDialogPrivate::initDialog(const QString &text, const QUrl &urlName)
{
    QVBoxLayout *topLayout = new QVBoxLayout;
    q->setLayout(topLayout);

    QLabel *label = new QLabel(text, q);
    topLayout->addWidget(label);

    urlRequester = new KUrlRequester(urlName, q);
    urlRequester->setMinimumWidth(urlRequester->sizeHint().width() * 3);
    topLayout->addWidget(urlRequester);
    urlRequester->setFocus();
    QObject::connect(urlRequester->lineEdit(), SIGNAL(textChanged(QString)),
                     q, SLOT(_k_slotTextChanged(QString)));
    /*
    KFile::Mode mode = static_cast<KFile::Mode>( KFile::File |
            KFile::ExistingOnly );
    urlRequester_->setMode( mode );
    */

    buttonBox = new QDialogButtonBox(q);
    buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
    QObject::connect(buttonBox, SIGNAL(accepted()), q, SLOT(accept()));
    QObject::connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject()));
    topLayout->addWidget(buttonBox);

    _k_slotTextChanged(urlName.toString());
}
Example #5
0
RepoModel::UploadForm::UploadForm( const QString & file2upload,
                                   QWidget * parent): QDialog(parent) {
    author_le = new QLineEdit();
    email_le = new QLineEdit();
    save_ck = new QCheckBox("Save your personal information");
    save_ck->setToolTip("The author and email will be saved and will be written to you next time");
    comment_te = new QTextEdit();

    // setup the layout

    QGroupBox * personalGroupBox = new QGroupBox("Personal Group Box");
    QFormLayout * personalLayout = new QFormLayout();
    personalLayout->addRow("Author",author_le);
    personalLayout->addRow("Email",email_le);
    QVBoxLayout * gpBox = new QVBoxLayout();
    gpBox->addWidget(save_ck);
    gpBox->addLayout(personalLayout);
    personalGroupBox->setLayout(gpBox);

    QLabel * cmLabel = new QLabel("Comment");
    QDialogButtonBox * buttonBox = new QDialogButtonBox();
    buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);

    QVBoxLayout * layout = new QVBoxLayout();
    layout->addWidget(personalGroupBox);
    layout->addWidget(cmLabel);
    layout->addWidget(comment_te);
    layout->addWidget(buttonBox);
    setLayout(layout);

    setWindowTitle(QString("Upload - %2").arg(file2upload));
    connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
    connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
}
Example #6
0
/**
    \fn getProfileName  
    \brief Popup a dialog that asks the user the preset name
*/
static char *getProfileName(void)
{
  QDialog dialog;
  dialog.setWindowTitle(QString::fromUtf8("Save Profile"));
  QDialogButtonBox *buttonBox = new QDialogButtonBox();  
  QVBoxLayout *vboxLayout = new QVBoxLayout();
  buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);

  QObject::connect(buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
  QObject::connect(buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));

  QLineEdit *text=new QLineEdit;
//  text->setAcceptRichText(false);
  
  text->setText("my profile");
  text->selectAll();

  vboxLayout->addWidget(text);
  vboxLayout->addWidget(buttonBox);

  dialog.setLayout(vboxLayout);

  if(dialog.exec()!=QDialog::Accepted)
  {
        ADM_info("Canceled");
        return NULL;
  }
  QString fileName=text->text();
  const char *out=fileName.toUtf8().constData();
  return ADM_strdup(out);
}
AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent)
  : QDialog(parent),
    d(new AttachToQmlPortDialogPrivate)
{
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
    setWindowTitle(tr("Start Debugger"));

    d->kitChooser = new DebuggerKitChooser(DebuggerKitChooser::RemoteDebugging, this);
    d->kitChooser->populate();

    d->portSpinBox = new QSpinBox(this);
    d->portSpinBox->setMaximum(65535);
    d->portSpinBox->setValue(3768);

    QDialogButtonBox *buttonBox = new QDialogButtonBox(this);
    buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
    buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);

    QFormLayout *formLayout = new QFormLayout();
    formLayout->addRow(tr("Kit:"), d->kitChooser);
    formLayout->addRow(tr("&Port:"), d->portSpinBox);

    QVBoxLayout *verticalLayout = new QVBoxLayout(this);
    verticalLayout->addLayout(formLayout);
    verticalLayout->addWidget(buttonBox);

    connect(buttonBox, SIGNAL(accepted()), SLOT(accept()));
    connect(buttonBox, SIGNAL(rejected()), SLOT(reject()));
}
Example #8
0
ConfigDialog::ConfigDialog(QWidget *parent)
    : QDialog(parent),
      d(new ConfigDialogPrivate(this))
{
    setObjectName(QStringLiteral("SonnetConfigDialog"));
    setModal(true);
    setWindowTitle(tr("Spell Checking Configuration"));

    QVBoxLayout *layout = new QVBoxLayout;
    setLayout(layout);

    d->ui = new ConfigWidget(this);
    layout->addWidget(d->ui);

    QDialogButtonBox *buttonBox = new QDialogButtonBox(this);
    buttonBox->setStandardButtons(QDialogButtonBox::Ok
                                  | QDialogButtonBox::Cancel);
    layout->addWidget(buttonBox);

    connect(buttonBox, SIGNAL(accepted()),
            this, SLOT(slotOk()));
    connect(buttonBox, SIGNAL(rejected()),
            this, SLOT(reject()));
    /*
    connect(buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()),
            this, SLOT(slotApply()));
        */
    connect(d->ui, SIGNAL(configChanged()),
            this, SLOT(slotConfigChanged()));

    connect(d->ui, SIGNAL(configChanged()),
            this, SIGNAL(configChanged()));
}
Example #9
0
LicenseViewer::LicenseViewer(QWidget* parent)
    : QWidget()
{
    setAttribute(Qt::WA_DeleteOnClose);
    setWindowTitle(tr("License Viewer"));

    m_textBrowser = new QTextBrowser(this);

    QFont serifFont = m_textBrowser->font();
    serifFont.setFamily("Courier");
    m_textBrowser->setFont(serifFont);

    QDialogButtonBox* buttonBox = new QDialogButtonBox(this);
    buttonBox->setStandardButtons(QDialogButtonBox::Close);
    connect(buttonBox, SIGNAL(rejected()), this, SLOT(close()));

    QVBoxLayout* l = new QVBoxLayout(this);
    l->addWidget(m_textBrowser);
    l->addWidget(buttonBox);

    setLayout(l);

    resize(600, 500);

    QzTools::centerWidgetToParent(this, parent);
}
Example #10
0
AddressDialog::AddressDialog( QWidget *p ) :
	QDialog( p ), addrB( Qt::Vertical )
{
	setWindowTitle( tr( "Dodaj adres" ) );

	QDialogButtonBox *buttonBox = new QDialogButtonBox;
	buttonBox->setStandardButtons( QDialogButtonBox::Ok | QDialogButtonBox::Cancel );
	connect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
	connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );

	QComboBox &pB = addrB.getComboBox();
	int idx = pB.findText( QMPlay2Core.getSettings().getString( "AddressDialog/Choice" ) );
	if ( idx > -1 )
		pB.setCurrentIndex( idx );

	addAndPlayB.setText( tr( "Odtwarzaj" ) );
	addAndPlayB.setChecked( QMPlay2Core.getSettings().getBool( "AddressDialog/AddAndPlay", true ) );

	QGridLayout *layout = new QGridLayout( this );
	layout->addWidget( &addrB, 0, 0, 1, 2 );
	layout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ), 1, 0, 1, 2 ); //vSpacer
	layout->addWidget( &addAndPlayB, 2, 0, 1, 1 );
	layout->addWidget( buttonBox, 2, 1, 1, 1 );
	layout->setMargin( 3 );

	addrB.setFocus();
	resize( 625, 0 );
}
Example #11
0
SettingsDialog::SettingsDialog(QWidget *parent)
     :   QDialog(parent)
     ,   reverseYAxisCheckBox(new QCheckBox(tr("Reverse Y-Axis"), this))
{
    QVBoxLayout *dialogLayout = new QVBoxLayout(this);

    // Populate checkboxes
    reverseYAxisCheckBox->setChecked(false);
 
    // Add widgets to layout
    dialogLayout->addWidget(reverseYAxisCheckBox);

    // Add standard buttons to layout
    QDialogButtonBox *buttonBox = new QDialogButtonBox(this);
    buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
    dialogLayout->addWidget(buttonBox);

    // Connect standard buttons
    connect((QObject*)buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
                    this, SLOT(accept()));
    connect((QObject*)buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
                    this, SLOT(reject()));

    setLayout(dialogLayout);
}
Example #12
0
MouseCommandList::MouseCommandList(void): NPPDialog()
{
    central = new QWidget;
    QPointer<QVBoxLayout> main_layout = new QVBoxLayout;
    central->setLayout(main_layout);
    main_layout->setSpacing(10);
    this->setClient(central);  // IMPORTANT: it must be called AFTER setting the layout

    QPointer<QLabel> mouse_prompt = new QLabel(QString("<h2>Mouse Commands</h2>"));
    main_layout->addWidget(mouse_prompt, Qt::AlignCenter);

    QPointer<QVBoxLayout> vlay_mouse_commands = new QVBoxLayout;
    add_mouse_commands(vlay_mouse_commands);
    main_layout->addLayout(vlay_mouse_commands);

    QDialogButtonBox buttons;
    buttons.setStandardButtons(QDialogButtonBox::Ok);
    connect(&buttons, SIGNAL(accepted()), this, SLOT(close()));
    main_layout->addWidget(&buttons);

    main_layout->addStretch(1);

    setWindowTitle(tr("Mouse Command List"));

    this->clientSizeUpdated();

    this->exec();
}
Example #13
0
ListWidgetEditor::ListWidgetEditor(QDesignerFormWindowInterface *form,
                                   QWidget *parent)
    : QDialog(parent)
{
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
    QDialogButtonBox *buttonBox = new QDialogButtonBox;
    buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
    connect(buttonBox, SIGNAL(accepted()), SLOT(accept()));
    connect(buttonBox, SIGNAL(rejected()), SLOT(reject()));

    m_itemsEditor = new ItemListEditor(form, 0);
    m_itemsEditor->layout()->setMargin(0);
    m_itemsEditor->setNewItemText(tr("New Item"));

    QFrame *sep = new QFrame;
    sep->setFrameStyle(QFrame::HLine | QFrame::Sunken);

    QBoxLayout *box = new QVBoxLayout(this);
    box->addWidget(m_itemsEditor);
    box->addWidget(sep);
    box->addWidget(buttonBox);

    // Numbers copied from itemlisteditor.ui
    // (Automatic resizing doesn't work because ui has parent).
    resize(550, 360);
}
QmlProfilerAttachDialog::QmlProfilerAttachDialog(QWidget *parent) :
    QDialog(parent),
    d(new QmlProfilerAttachDialogPrivate)
{
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
    setWindowTitle(tr("Start QML Profiler"));

    d->kitChooser = new KitChooser(this);
    d->kitChooser->populate();

    d->portSpinBox = new QSpinBox(this);
    d->portSpinBox->setMaximum(65535);
    d->portSpinBox->setValue(3768);

    QDialogButtonBox *buttonBox = new QDialogButtonBox(this);
    buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
    buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);

    QFormLayout *formLayout = new QFormLayout();
    formLayout->addRow(tr("Kit:"), d->kitChooser);
    formLayout->addRow(tr("&Port:"), d->portSpinBox);

    QVBoxLayout *verticalLayout = new QVBoxLayout(this);
    verticalLayout->addLayout(formLayout);
    verticalLayout->addWidget(buttonBox);

    connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
    connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
}
Example #15
0
QDialog * MainWindow::createAddSessionDialogue(const QString & title, MTListWidget * lw)
{
    QDialog * d = new QDialog(this);
#ifdef Q_WS_MAC
    d->setWindowTitle(QString("%1 - %2").arg(current_db_name).arg(title));
#else
    d->setWindowTitle(QString("%1 - %2 - iTest").arg(current_db_name).arg(title));
#endif
    d->setMinimumSize(QSize(300, 100));
        QVBoxLayout * vl = new QVBoxLayout(d);
        vl->setMargin(6); vl->setSpacing(6);
            QHBoxLayout * hl = new QHBoxLayout(d);
            hl->setMargin(0); hl->setSpacing(6);
                QLabel * lbl = new QLabel(tr("Search:"), d);
                ExtendedLineEdit * sle = new ExtendedLineEdit(d);
            hl->addWidget(lbl);
            hl->addWidget(sle);
        vl->addLayout(hl);
            if (lw == NULL) { lw = new MTListWidget(d); } else { lw->setParent(d); }
            QObject::connect(lw, SIGNAL(itemDoubleClicked(QListWidgetItem *)), d, SLOT(accept()));
            QObject::connect(sle, SIGNAL(textChanged(QLineEdit *, const QString &)), lw, SLOT(filterItems(QLineEdit *, const QString &)));
        vl->addWidget(lw);
            QDialogButtonBox * bb = new QDialogButtonBox(d);
            bb->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
            QObject::connect(bb, SIGNAL(accepted()), d, SLOT(accept()));
            QObject::connect(bb, SIGNAL(rejected()), d, SLOT(reject()));
        vl->addWidget(bb);
    return d;
}
QString BlackBerryDebugTokenPinsDialog::promptPIN(const QString &value, bool *ok)
{
    QDialog dialog(this);
    QVBoxLayout *layout = new QVBoxLayout;
    QLineEdit *lineEdit = new QLineEdit;
    QDialogButtonBox *buttonBox = new QDialogButtonBox;

    lineEdit->setMaxLength(8);
    lineEdit->setText(value);

    buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
    buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);

    connect(buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
    connect(buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));

    layout->addWidget(lineEdit);
    layout->addWidget(buttonBox);

    dialog.setWindowTitle(tr("Debug Token PIN"));
    dialog.setLayout(layout);

    const bool rejected = dialog.exec() == QDialog::Rejected;
     if (ok)
         *ok = !rejected;

     if (rejected)
         return QString();

     return lineEdit->text();
}
Example #17
0
void pTranslationDialog::on_tbLocate_clicked()
{
    if ( !mTranslationManager ) {
        return;
    }

    QDialog dlg( this );
    pPathListEditor* editor = new pPathListEditor( tr( "Choose folders containing your application translations" ), QApplication::applicationDirPath(), &dlg );
    QDialogButtonBox* buttons = new QDialogButtonBox( &dlg );
    QVBoxLayout* vl = new QVBoxLayout( &dlg );
    vl->addWidget( editor );
    vl->addWidget( buttons );

    buttons->setStandardButtons( QDialogButtonBox::Cancel | QDialogButtonBox::Ok );
    editor->setValues( mTranslationManager->translationsPaths() );

    connect( buttons, SIGNAL( rejected() ), &dlg, SLOT( reject() ) );
    connect( buttons, SIGNAL( accepted() ), &dlg, SLOT( accept() ) );

    if ( dlg.exec() == QDialog::Rejected ) {
        return;
    }

    mTranslationManager->setTranslationsPaths( editor->values() );
    ui->tbReload->click();
}
Example #18
0
    CreateUserDialog::CreateUserDialog(const QString &serverName,
        const QString &database, const MongoUser &user,
        QWidget *parent) : QDialog(parent),
        _user(user)
    {
        VERIFY(user.version() < MongoUser::minimumSupportedVersion);
        setWindowTitle("Add User");
        setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); // Remove help button (?)
        setMinimumWidth(400);

        Indicator *serverIndicator = new Indicator(GuiRegistry::instance().serverIcon(), serverName);
        Indicator *databaseIndicator = new Indicator(GuiRegistry::instance().databaseIcon(), database);

        QFrame *hline = new QFrame();
        hline->setFrameShape(QFrame::HLine);
        hline->setFrameShadow(QFrame::Sunken);

        _userNameLabel= new QLabel("Name:");
        _userNameEdit = new QLineEdit();
        _userNameEdit->setText(QtUtils::toQString(user.name()));
        _userPassLabel= new QLabel("Password:"******"Read Only");
        _readOnlyCheckBox->setChecked(user.readOnly());

        QDialogButtonBox *buttonBox = new QDialogButtonBox(this);
        buttonBox->setOrientation(Qt::Horizontal);
        buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Save);
        VERIFY(connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())));
        VERIFY(connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())));

        QHBoxLayout *hlayout = new QHBoxLayout();
        hlayout->addStretch(1);
        hlayout->addWidget(buttonBox);

        QHBoxLayout *vlayout = new QHBoxLayout();
        vlayout->addWidget(serverIndicator, 0, Qt::AlignLeft);
        vlayout->addWidget(databaseIndicator, 0, Qt::AlignLeft);
        vlayout->addStretch(1);

        QGridLayout *namelayout = new QGridLayout();
        namelayout->setContentsMargins(0, 7, 0, 7);
        namelayout->addWidget(_userNameLabel, 0, 0);
        namelayout->addWidget(_userNameEdit, 0, 1);
        namelayout->addWidget(_userPassLabel, 1, 0);
        namelayout->addWidget(_userPassEdit, 1, 1);
        namelayout->addWidget(_readOnlyCheckBox, 2, 1);

        QVBoxLayout *layout = new QVBoxLayout();
        layout->addLayout(vlayout);
        layout->addWidget(hline);
        layout->addLayout(namelayout);
        layout->addLayout(hlayout);
        setLayout(layout);

        _userNameEdit->setFocus();
    }
Example #19
0
void EnterVacationDialog::createEvents()
{
    const EventList events = createEventList( m_ui->startDate->date(),
                                              m_ui->endDate->date().addDays( 1 ),
                                              m_ui->hoursSpinBox->value() * 60 + m_ui->minutesSpinBox->value(),
                                              m_selectedTaskId );

    QDialog confirmationDialog( this );
    QVBoxLayout* layout = new QVBoxLayout( &confirmationDialog );

    QLabel* label = new QLabel( tr( "The following vacation events will be created." ) );
    label->setWordWrap( true );
    layout->addWidget( label );
    QTextBrowser* textBrowser = new QTextBrowser;
    layout->addWidget( textBrowser );
    QDialogButtonBox* box = new QDialogButtonBox;
    box->setStandardButtons( QDialogButtonBox::Ok|QDialogButtonBox::Cancel );
    box->button(QDialogButtonBox::Ok)->setText(tr("Create"));
    connect( box, SIGNAL(accepted()), &confirmationDialog, SLOT(accept()) );
    connect( box, SIGNAL(rejected()), &confirmationDialog, SLOT(reject()) );
    layout->addWidget( box );


    const QString startDate = m_ui->startDate->date().toString( Qt::TextDate );
    const QString endDate = m_ui->endDate->date().toString( Qt::TextDate );
    const Task task = DATAMODEL->getTask( m_selectedTaskId );

    const QString htmlStartDate = toHtmlEscaped( startDate );
    const QString htmlEndDate = toHtmlEscaped( endDate );
    const QString htmlTaskName = toHtmlEscaped( task.name() );

    QString html = "<html><body>";
    html += QString::fromLatin1("<h1>%1</h1>").arg( tr("Vacation"));
    html += QString::fromLatin1("<h3>%1</h3>").arg( tr("From %1 to %2").arg( htmlStartDate, htmlEndDate ) );
    html += QString::fromLatin1("<h4>%1</h4>").arg( tr("Task used: %1").arg( htmlTaskName ) );
    html += "<p>";
    Q_FOREACH ( const Event& event, events ) {
        const QDate eventStart = event.startDateTime().date();
        const QDate eventEnd = event.endDateTime().date();
        Q_ASSERT( eventStart == eventEnd );
        Q_UNUSED( eventEnd ) //release mode
        const QString shortDate = eventStart.toString( Qt::DefaultLocaleShortDate );
        const QString duration = formatDuration( event.startDateTime(), event.endDateTime() );

        const QString htmlShortDate = toHtmlEscaped( shortDate );
        const QString htmlDuration = toHtmlEscaped( duration );

        html += QString::fromLatin1("%1").arg( tr( "%1: %3", "short date, duration" ).arg( htmlShortDate, htmlDuration ) );
        html += "</p><p>";
    }
    html += "</p>";
    html += "</body></html>";
    textBrowser->setHtml( html );
    confirmationDialog.resize( 400, 600 );
    if ( confirmationDialog.exec() == QDialog::Accepted )
        m_events = events;
}
Example #20
0
void BasicSettingsDlg::setupUI(QDialog *dlg, enum PerformanceLevel lvl) {
  // Erase old layout/info.
  qDeleteAll(dlg->children());

  dlg->setWindowTitle("ImageVis3D Settings");
  dlg->setObjectName(QString::fromUtf8("BasicSettingsDlg"));
  dlg->setWindowModality(Qt::ApplicationModal);
  dlg->resize(300, 150);
  dlg->setContextMenuPolicy(Qt::DefaultContextMenu);
  dlg->setSizeGripEnabled(true);
  dlg->setModal(true);

  QVBoxLayout* vlayout = new QVBoxLayout(this);
  vlayout->setObjectName(QString::fromUtf8("vlayout"));

  // perf / slider / and a description of the current setting
  QHBoxLayout* hPerf = new QHBoxLayout();
  QLabel* lPerf = new QLabel("Performance:");
  this->slPerf = new QSlider();
  this->slPerf->setOrientation(Qt::Horizontal);
  this->slPerf->setMinimum(MAX_RESPONSIVENESS);
  this->slPerf->setMaximum(MAX_PERFORMANCE);
  this->slPerf->setMinimumSize(QSize(75, 20));
  this->slPerf->setTickPosition(QSlider::TicksBelow);
  this->slPerf->setTickInterval(1);
  this->slPerf->setValue(int(lvl));
  this->lDesc = new QLabel("Favor more responsive behavior.");
  QSizePolicy lblPol(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
  lblPol.setHorizontalStretch(1);
  lblPol.setVerticalStretch(1);
  this->lDesc->setSizePolicy(lblPol);
  this->lDesc->setAlignment(Qt::AlignJustify | Qt::AlignVCenter);
  this->lDesc->setWordWrap(true);
  hPerf->addWidget(lPerf);
  hPerf->addWidget(this->slPerf);
  hPerf->addWidget(this->lDesc);

  // buttons: we put them in a layout so we can add an 'advanced' one.
  QHBoxLayout* hbuttons = new QHBoxLayout();
  QDialogButtonBox* bbox = new QDialogButtonBox();
  QPushButton* btnAdvanced = new QPushButton("Advanced");
  bbox->setOrientation(Qt::Horizontal);
  bbox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
  hbuttons->addWidget(btnAdvanced);
  hbuttons->addWidget(bbox);

  vlayout->addLayout(hPerf);
  vlayout->addLayout(hbuttons);
  this->setLayout(vlayout);

  connect(slPerf, SIGNAL(valueChanged(int)), dlg, SLOT(PerfLevelChanged(int)));
  connect(bbox, SIGNAL(accepted()), dlg, SLOT(accept()));
  connect(bbox, SIGNAL(rejected()), dlg, SLOT(reject()));
  connect(btnAdvanced, SIGNAL(clicked()), dlg, SLOT(AdvancedFeatures()));
  this->PerfLevelChanged(int(lvl));
}
Example #21
0
KeyboardCommandList::KeyboardCommandList(void): NPPDialog()
{
    central = new QWidget;
    QPointer<QVBoxLayout> main_layout = new QVBoxLayout;
    central->setLayout(main_layout);
    main_layout->setSpacing(10);
    // IMPORTANT: it must be called AFTER setting the layout
    this->setClient(central);

    QPointer<QLabel> main_prompt = new QLabel(QString("<h2>Directional Commands</h2>"));
    main_layout->addWidget(main_prompt, Qt::AlignCenter);

    QPointer<QHBoxLayout> top_across = new QHBoxLayout;
    main_layout->addLayout(top_across);

    QPointer<QVBoxLayout> vlay_key_dirs = new QVBoxLayout;
    add_dir_keyboard(vlay_key_dirs, TRUE);
    top_across->addLayout(vlay_key_dirs);

    if (which_keyset != KEYSET_ROGUE)
    {
        top_across->addStretch(1);
        QPointer<QVBoxLayout> vlay_pad_dirs = new QVBoxLayout;
        add_dir_keyboard(vlay_pad_dirs, FALSE);
        top_across->addLayout(vlay_pad_dirs);
    }

    top_across->addStretch(1);

    QPointer<QVBoxLayout> vlay_dir_commands = new QVBoxLayout;
    QPointer<QGridLayout> glay_dir_commands = new QGridLayout;
    vlay_dir_commands->addLayout(glay_dir_commands);
    add_dir_commands(glay_dir_commands);
    vlay_dir_commands->addStretch(1);
    top_across->addLayout(vlay_dir_commands);
    top_across->addStretch(1);

    QPointer<QLabel> keyboard_prompt = new QLabel(QString("<h2>Keyboard Commands</h2>"));
    main_layout->addWidget(keyboard_prompt, Qt::AlignCenter);

    QPointer<QGridLayout> glay_key_commands = new QGridLayout;
    add_keyboard_commands(glay_key_commands);
    main_layout->addLayout(glay_key_commands);

    QDialogButtonBox buttons;
    buttons.setStandardButtons(QDialogButtonBox::Ok);
    connect(&buttons, SIGNAL(accepted()), this, SLOT(close()));
    main_layout->addWidget(&buttons);

    setWindowTitle(tr("Command List"));

    this->clientSizeUpdated();

    this->exec();
}
    DocumentTextEditor::DocumentTextEditor(const QString &server, const QString &database, const QString &collection,
                                           const QString &json, bool readonly /* = false */, QWidget *parent) :
        QDialog(parent),
        _readonly(readonly)
    {
        setMinimumWidth(700);
        setMinimumHeight(550);

        Indicator *collectionIndicator = new Indicator(GuiRegistry::instance().collectionIcon(), collection);
        Indicator *databaseIndicator = new Indicator(GuiRegistry::instance().databaseIcon(), database);
        Indicator *serverIndicator = new Indicator(GuiRegistry::instance().serverIcon(), server);

        QPushButton *validate = new QPushButton("Validate");
        validate->setIcon(qApp->style()->standardIcon(QStyle::SP_MessageBoxInformation));
        VERIFY(connect(validate, SIGNAL(clicked()), this, SLOT(onValidateButtonClicked())));

        _queryText = new FindFrame(this);
        _configureQueryText();
        _queryText->sciScintilla()->setText(json);
        VERIFY(connect(_queryText->sciScintilla(), SIGNAL(textChanged()), this, SLOT(onQueryTextChanged())));

        QHBoxLayout *hlayout = new QHBoxLayout();
        hlayout->setContentsMargins(2, 0, 5, 1);
        hlayout->setSpacing(0);
        hlayout->addWidget(serverIndicator, 0, Qt::AlignLeft);
        hlayout->addWidget(databaseIndicator, 0, Qt::AlignLeft);
        hlayout->addWidget(collectionIndicator, 0, Qt::AlignLeft);
        hlayout->addStretch(1);

        QDialogButtonBox *buttonBox = new QDialogButtonBox (this);
        buttonBox->setOrientation(Qt::Horizontal);
        buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Save);
        VERIFY(connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())));
        VERIFY(connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())));

        QHBoxLayout *bottomlayout = new QHBoxLayout();
        bottomlayout->addWidget(validate);
        bottomlayout->addStretch(1);
        bottomlayout->addWidget(buttonBox);

        QVBoxLayout *layout = new QVBoxLayout();

        // show top bar only if we have info for it
        if (!(server.isEmpty() && database.isEmpty() && collection.isEmpty()))
            layout->addLayout(hlayout);

        layout->addWidget(_queryText);
        layout->addLayout(bottomlayout);
        setLayout(layout);

        if (_readonly)
            buttonBox->button(QDialogButtonBox::Save)->hide();
    }
Example #23
0
CameraViewer::CameraViewer(QWidget * parent, const ParametersMap & parameters) :
		QDialog(parent),
	imageView_(new ImageView(this)),
	cloudView_(new CloudViewer(this)),
	processingImages_(false),
	validDecimationValue_(2),
	parameters_(parameters)
{
	qRegisterMetaType<rtabmap::SensorData>("rtabmap::SensorData");

	imageView_->setImageDepthShown(true);
	imageView_->setMinimumSize(320, 240);
	QHBoxLayout * layout = new QHBoxLayout();
	layout->setMargin(0);
	layout->addWidget(imageView_,1);
	layout->addWidget(cloudView_,1);

	QLabel * decimationLabel = new QLabel("Decimation", this);
	decimationSpin_ = new QSpinBox(this);
	decimationSpin_->setMinimum(1);
	decimationSpin_->setMaximum(16);
	decimationSpin_->setValue(2);

	pause_ = new QPushButton("Pause", this);
	pause_->setCheckable(true);
	showCloudCheckbox_ = new QCheckBox("Show RGB-D cloud", this);
	showCloudCheckbox_->setEnabled(false);
	showCloudCheckbox_->setChecked(true);
	showScanCheckbox_ = new QCheckBox("Show scan", this);
	showScanCheckbox_->setEnabled(false);

	QDialogButtonBox * buttonBox = new QDialogButtonBox(this);
	buttonBox->setStandardButtons(QDialogButtonBox::Close);
	connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));

	QHBoxLayout * layout2 = new QHBoxLayout();
	layout2->addWidget(pause_);
	layout2->addWidget(decimationLabel);
	layout2->addWidget(decimationSpin_);
	layout2->addWidget(showCloudCheckbox_);
	layout2->addWidget(showScanCheckbox_);
	layout2->addStretch(1);
	layout2->addWidget(buttonBox);

	QVBoxLayout * vlayout = new QVBoxLayout(this);
	vlayout->setMargin(0);
	vlayout->setSpacing(0);
	vlayout->addLayout(layout, 1);
	vlayout->addLayout(layout2);

	this->setLayout(vlayout);
}
Example #24
0
OptionsDialog::OptionsDialog(QWidget *parent):
    QDialog(parent), contents_widget(0), pages_widget(0),
    model(0), main_page(0), display_page(0)
        {
    contents_widget = new QListWidget();
    contents_widget->setMaximumWidth(128);

    pages_widget = new QStackedWidget();
    pages_widget->setMinimumWidth(300);

    QListWidgetItem *item_main = new QListWidgetItem(tr("Main"));
    contents_widget->addItem(item_main);
    main_page = new MainOptionsPage(this);
    pages_widget->addWidget(main_page);

    QListWidgetItem *item_display = new QListWidgetItem(tr("Display"));
    contents_widget->addItem(item_display);
    display_page = new DisplayOptionsPage(this);
    pages_widget->addWidget(display_page);

    contents_widget->setCurrentRow(0);

    QHBoxLayout *main_layout = new QHBoxLayout();
    main_layout->addWidget(contents_widget);
    main_layout->addWidget(pages_widget, 1);

    QVBoxLayout *layout = new QVBoxLayout();
    layout->addLayout(main_layout);

    QDialogButtonBox *buttonbox = new QDialogButtonBox();
    buttonbox->setStandardButtons(QDialogButtonBox::Apply|QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
    apply_button = buttonbox->button(QDialogButtonBox::Apply);
    layout->addWidget(buttonbox);

    setLayout(layout);
    setWindowTitle(tr("Options"));

    /* Widget-to-option mapper */
    mapper = new MonitoredDataMapper(this);
    mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
    mapper->setOrientation(Qt::Vertical);
    /* enable apply button when data modified */
    connect(mapper, SIGNAL(viewModified()), this, SLOT(enableApply()));
    /* disable apply button when new data loaded */
    connect(mapper, SIGNAL(currentIndexChanged(int)), this, SLOT(disableApply()));

    /* Event bindings */
    connect(contents_widget, SIGNAL(currentRowChanged(int)), this, SLOT(changePage(int)));
    connect(buttonbox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(okClicked()));
    connect(buttonbox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(cancelClicked()));
    connect(buttonbox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(applyClicked()));
}
Example #25
0
/* QPythonParamDialog */
QPythonParamDialog::QPythonParamDialog(QWidget* parent)
                  : QDialog(parent)
{
    setWindowTitle(tr("Python Parameter"));

    fTypeBox = new QComboBox(this);
    fID = new QSpinBox(this);
    fID->setRange(0, 0x7FFFFFFF);
    fKeyValue = new QLinkLabel("(Null)", this);
    fStringValue = new QLineEdit(this);
    fIntValue = new QIntEdit(this);
    fFloatValue = new QFloatEdit(this);
    fBoolValue = new QComboBox(this);
    fBoolValue->addItem("false");
    fBoolValue->addItem("true");
    fLabelNull = new QLabel("(Null)", this);
    QDialogButtonBox* buttonBox = new QDialogButtonBox(Qt::Horizontal, this);
    buttonBox->setStandardButtons(QDialogButtonBox::Cancel |
                                  QDialogButtonBox::Ok);

    fKeyValue->setVisible(false);
    fStringValue->setVisible(false);
    fIntValue->setVisible(false);
    fFloatValue->setVisible(false);
    fBoolValue->setVisible(false);

    for (int i=1; i<=plPythonParameter::kNone; i++)
        fTypeBox->addItem(s_PythonParamTypes[i]);

    QGridLayout* layout = new QGridLayout(this);
    layout->setHorizontalSpacing(8);
    layout->setVerticalSpacing(8);
    layout->addWidget(new QLabel(tr("ID:"), this), 0, 0);
    layout->addWidget(fID, 0, 1, 1, 2);
    layout->addWidget(new QLabel(tr("Type:"), this), 1, 0);
    layout->addWidget(fTypeBox, 1, 1, 1, 2);
    layout->addWidget(new QLabel(tr("Value:"), this), 2, 0);
    layout->addWidget(fKeyValue, 2, 1);
    layout->addItem(new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding), 2, 2);
    layout->addWidget(fStringValue, 2, 1, 1, 2);
    layout->addWidget(fIntValue, 2, 1, 1, 2);
    layout->addWidget(fFloatValue, 2, 1, 1, 2);
    layout->addWidget(fBoolValue, 2, 1, 1, 2);
    layout->addWidget(fLabelNull, 2, 1, 1, 2);
    layout->addWidget(buttonBox, 3, 0, 1, 3);

    connect(fTypeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(typeChanged(int)));
    connect(fKeyValue, SIGNAL(activated()), this, SLOT(selectKey()));
    connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
    connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
    fTypeBox->setCurrentIndex(plPythonParameter::kNone-1);
}
void QuantumInput::configurePython()
{
  // Create objects
  QSettings settings;
  QDialog dlg(qobject_cast<QWidget*>(parent()));
  QLabel *label = new QLabel;
  QVBoxLayout *layout = new QVBoxLayout;
  QtGui::FileBrowseWidget *browser = new QtGui::FileBrowseWidget;
  QDialogButtonBox *buttonBox = new QDialogButtonBox;

  // Configure objects
  // Check for python interpreter in env var
  QString pythonInterp = QString::fromLocal8Bit(
        qgetenv("AVO_PYTHON_INTERPRETER"));
  if (pythonInterp.isEmpty()) {
    // Check settings
    pythonInterp = settings.value("interpreters/python",
                                  QString()).toString();
  }
  // Use compile-time default if still not found.
  if (pythonInterp.isEmpty())
    pythonInterp = QString(pythonInterpreterPath);
  browser->setMode(QtGui::FileBrowseWidget::ExecutableFile);
  browser->setFileName(pythonInterp);

  buttonBox->setStandardButtons(QDialogButtonBox::Ok
                                | QDialogButtonBox::Cancel);

  dlg.setWindowTitle(tr("Set path to Python interpreter:"));
  label->setText(tr("Select the python interpreter used to run input generator "
                    "scripts.\nAvogadro must be restarted for any changes to "
                    "take effect."));

  // Build layout
  layout->addWidget(label);
  layout->addWidget(browser);
  layout->addWidget(buttonBox);
  dlg.setLayout(layout);

  // Connect
  connect(buttonBox, SIGNAL(accepted()), &dlg, SLOT(accept()));
  connect(buttonBox, SIGNAL(rejected()), &dlg, SLOT(reject()));

  // Show dialog
  QDialog::DialogCode response = static_cast<QDialog::DialogCode>(dlg.exec());
  if (response != QDialog::Accepted)
    return;

  // Handle response
  settings.setValue("interpreters/python", browser->fileName());
}
Example #27
0
    DiscoveryDiagnosticDialog::DiscoveryDiagnosticDialog(QWidget* parent, IConnectionSettingsBaseSPtr connection, IClusterSettingsBaseSPtr cluster)
        : QDialog(parent), cluster_(cluster)
    {
        using namespace translations;

        setWindowTitle(trConnectionDiscovery);
        setWindowIcon(GuiFactory::instance().serverIcon());
        setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); // Remove help button (?)

        QVBoxLayout* mainLayout = new QVBoxLayout;

        executeTimeLabel_ = new QLabel;
        executeTimeLabel_->setText(connectionStatusTemplate.arg("execute..."));
        mainLayout->addWidget(executeTimeLabel_);

        statusLabel_ = new QLabel(timeTemplate.arg("calculate..."));
        iconLabel_ = new QLabel;
        QIcon icon = GuiFactory::instance().failIcon();
        const QPixmap pm = icon.pixmap(stateIconSize);
        iconLabel_->setPixmap(pm);

        mainLayout->addWidget(statusLabel_);
        mainLayout->addWidget(iconLabel_, 1, Qt::AlignCenter);

        listWidget_ = new QTreeWidget;
        listWidget_->setIndentation(5);

        QStringList colums;
        colums << trName << trAddress << trType;
        listWidget_->setHeaderLabels(colums);
        listWidget_->setContextMenuPolicy(Qt::ActionsContextMenu);
        listWidget_->setIndentation(15);
        listWidget_->setSelectionMode(QAbstractItemView::MultiSelection); // single item can be draged or droped
        listWidget_->setSelectionBehavior(QAbstractItemView::SelectRows);

        mainLayout->addWidget(listWidget_);
        listWidget_->setEnabled(false);
        listWidget_->setToolTip(tr("Select items which you want add to cluster."));

        QDialogButtonBox* buttonBox = new QDialogButtonBox;
        buttonBox->setOrientation(Qt::Horizontal);
        buttonBox->setStandardButtons(QDialogButtonBox::Ok);
        VERIFY(connect(buttonBox, &QDialogButtonBox::accepted, this, &DiscoveryDiagnosticDialog::accept));

        mainLayout->addWidget(buttonBox);
        setFixedSize(QSize(fix_width, fix_height));
        setLayout(mainLayout);

        glassWidget_ = new fasto::qt::gui::GlassWidget(GuiFactory::instance().pathToLoadingGif(), trTryToConnect, 0.5, QColor(111, 111, 100), this);
        testConnection(connection);
    }
Example #28
0
FilletEdgesDialog::FilletEdgesDialog(Part::FilletBase* fillet, QWidget* parent, Qt::WFlags fl)
  : QDialog(parent, fl)
{
    widget = new DlgFilletEdges(fillet, this);
    this->setWindowTitle(widget->windowTitle());

    QVBoxLayout* hboxLayout = new QVBoxLayout(this);
    QDialogButtonBox* buttonBox = new QDialogButtonBox(this);
    buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);

    QObject::connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
    QObject::connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));

    hboxLayout->addWidget(widget);
    hboxLayout->addWidget(buttonBox);
}
ETSettingPanel::ETSettingPanel(QWidget *parent)
: QDialog(parent)
{
    this->setWindowTitle("ET Channel Settings");
    QFormLayout *dialogLayout = new QFormLayout(this);

    QLabel *warnLabel = new QLabel("Do NOT change default settings unless you "
                                   "know what you are doing.");

    // Add settings for online mode
    QLabel *ipLabel = new QLabel("ET Host/Port");
    ipEdit = new QLineEdit(this);
    ipEdit->setText("clondaq6.jlab.org");

    portEdit = new QSpinBox(this);
    portEdit->setRange(1, 65535);
    portEdit->setValue(11111);

    QHBoxLayout *hostLayout = new QHBoxLayout();
    hostLayout->addWidget(ipEdit);
    hostLayout->addWidget(portEdit);

    QLabel *fileLabel = new QLabel("ET File");
    fileEdit = new QLineEdit(this);
    fileEdit->setText("/tmp/et_sys_clasprad");

    QLabel *stationLabel = new QLabel("Station Name");
    stationEdit = new QLineEdit(this);
    stationEdit->setText("online monitor");

    dialogLayout->addRow(warnLabel);
    dialogLayout->addRow(ipLabel, hostLayout);
    dialogLayout->addRow(fileLabel, fileEdit);
    dialogLayout->addRow(stationLabel, stationEdit);

    // Add standard buttons to layout
    QDialogButtonBox *buttonBox = new QDialogButtonBox(this);
    buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
    dialogLayout->addRow(buttonBox);

    // Connect standard buttons
    connect(buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
                    this, SLOT(accept()));
    connect(buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
                    this, SLOT(reject()));
}
BTAboutModuleDialog::BTAboutModuleDialog(QWidget* parent, CSwordModuleInfo* info)
	: QDialog(parent)
{
	//Set the flag to destroy when closed - otherwise eats memory
	setAttribute(Qt::WA_DeleteOnClose);
	setWindowTitle(tr("Information About") + QString(" ") + info->name());
    resize(650, 400);
    QVBoxLayout* vboxLayout = new QVBoxLayout(this);

    QTextEdit* textEdit = new QTextEdit(this);
    textEdit->setReadOnly(true);
    textEdit->setTextInteractionFlags(Qt::TextSelectableByMouse);
    vboxLayout->addWidget(textEdit);
	textEdit->setHtml(info->aboutText());

    QDialogButtonBox* buttonBox = new QDialogButtonBox(this);
    buttonBox->setOrientation(Qt::Horizontal);
    buttonBox->setStandardButtons(QDialogButtonBox::Close);
    vboxLayout->addWidget(buttonBox);


    QObject::connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
    QObject::connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));

}