예제 #1
0
AboutWidget::AboutWidget(QWidget *parent):QWidget(parent){
  QVBoxLayout *mainLayout = new QVBoxLayout();
  mainLayout->addWidget(new QLabel(tr("UDJ Player Client Version 0.5.0")));
  mainLayout->addSpacing(1);
  mainLayout->addWidget(new QLabel(tr("Written By Kurtis Nusbaum")));
  mainLayout->addSpacing(1);
  QLabel *issuesLabel = new QLabel(tr("Please report all bugs to the <a href=\"https://github.com/klnusbaum/UDJ-Desktop-Client/issues\" >UDJ issue tracker</a>"));
  issuesLabel->setOpenExternalLinks(true);
  mainLayout->addWidget(issuesLabel);
  setLayout(mainLayout);
}
예제 #2
0
//! @return The widget contained by the tab "Contributions"
QWidget *AboutQUCS::contributorsTab() const
{
    QLabel *contributors = new QLabel();

    // addAuthor(contributors, "Name Lastname", "*****@*****.**", tr("Whatever"));

    contributors->setAlignment(Qt::AlignCenter);
    contributors->setOpenExternalLinks(true);
    contributors->setTextFormat(Qt::RichText);
    return contributors;
}
예제 #3
0
AboutDialog::AboutDialog(QWidget *parent) :
    QDialog(parent)
{
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
    setWindowTitle("About");

    QGridLayout* layout = new QGridLayout(this);
    layout->setSizeConstraint(QLayout::SetFixedSize);

    const int SPACER_SIZE = 8;
    const QString Url("<a href=\"%2\">%1</a>");

    QLabel* iconLabel = new QLabel(this);
    iconLabel->setPixmap(QPixmap(":/icons/icon64.png"));
    iconLabel->setFixedSize(64 + 4, 64 + 4);

    QLabel* applicationNameLabel = getLabel(AppInfo::name, 16, true, Qt::AlignLeft);

    QLabel* versionLabel = getLabel(QString("version %1").arg(AppInfo::version), 8, false, Qt::AlignLeft);

    QLabel* buildDateLabel = getLabel(QString("Build date: %1").arg(AppInfo::buildDate), 8, false, Qt::AlignLeft);

    QLabel* iconsSourceLabel = getLabel(QString("%1 %2").arg("This application uses").arg(Url.arg("FatCow icons").arg("http://www.fatcow.com/free-icons")), 8, false, Qt::AlignLeft);
    iconsSourceLabel->setOpenExternalLinks(true);

    QLabel* licenseLabel = getLabel(QString("License: %1").arg(AppInfo::license), 8, false, Qt::AlignLeft);

    QLabel* copyrightLabel = getLabel(QString("(c) %1, %2").arg(AppInfo::years).arg(Url.arg(AppInfo::author).arg(AppInfo::Url)), 8, false, Qt::AlignCenter);
    copyrightLabel->setOpenExternalLinks(true);

    layout->addWidget(iconLabel,                                0, 0, 3, 1);
    layout->addWidget(applicationNameLabel,                     0, 1, 1, 2);
    layout->addWidget(versionLabel,                             1, 1, 1, 2);
    layout->addWidget(buildDateLabel,                           2, 1, 1, 2);
    layout->addItem(new QSpacerItem(SPACER_SIZE, SPACER_SIZE),  3, 2, 1, 1);
    layout->addWidget(iconsSourceLabel,                         4, 0, 1, 3);
    layout->addItem(new QSpacerItem(SPACER_SIZE, SPACER_SIZE),  5, 2, 1, 1);
    layout->addWidget(licenseLabel,                             6, 0, 1, 3);
    layout->addItem(new QSpacerItem(SPACER_SIZE, SPACER_SIZE),  7, 2, 1, 1);
    layout->addWidget(copyrightLabel,                           8, 0, 1, 3);
}
예제 #4
0
    QLabel* createLink(QString path)
    {
        QLabel *label = new QLabel();
        label->setTextFormat(Qt::RichText);
        label->setTextInteractionFlags(Qt::TextBrowserInteraction);
        label->setOpenExternalLinks(true);

        QString link("<a href=" + path + ">" + path + "</a>");

        label->setText(link);
        return label;
    }
예제 #5
0
//! @return The widget contained by the tab "Translators"
QWidget *AboutQUCS::translatorsTab() const
{
    QLabel *translators = new QLabel();

    addAuthor(translators, "Pablo Daniel Pareja Obregon", "*****@*****.**",
            tr("Spanish translation"));

    translators->setAlignment(Qt::AlignCenter);
    translators->setOpenExternalLinks(true);
    translators->setTextFormat(Qt::RichText);
    return translators;
}
예제 #6
0
LongMessageWidget::LongMessageWidget( QWidget *anchor, const QString &message,
                                     Amarok::Logger::MessageType type )
        : PopupWidget( anchor )
        , m_counter( 0 )
        , m_timeout( 6000 )
{
    DEBUG_BLOCK
    Q_UNUSED( type )

    setFrameStyle( QFrame::StyledPanel | QFrame::Raised );

    setContentsMargins( 4, 4, 4, 4 );

    setMinimumWidth( 26 );
    setMinimumHeight( 26 );
    setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );

    QPalette p = QToolTip::palette();
    setPalette( p );

    KHBox *hbox = new KHBox( this );
    layout()->addWidget( hbox );

    hbox->setSpacing( 12 );

    m_countdownFrame = new CountdownFrame( hbox );
    m_countdownFrame->setObjectName( "counterVisual" );
    m_countdownFrame->setFixedWidth( fontMetrics().width( "X" ) );
    m_countdownFrame->setFrameStyle( QFrame::Plain | QFrame::Box );
    QPalette pal;
    pal.setColor( m_countdownFrame->foregroundRole(), p.dark().color() );
    m_countdownFrame->setPalette( pal );

    QLabel *alabel = new QLabel( message, hbox );
    alabel->setWordWrap( true );
    alabel->setOpenExternalLinks( true );
    alabel->setObjectName( "label" );
    alabel->setTextFormat( Qt::RichText );
    alabel->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
    alabel->setPalette( p );

    hbox = new KHBox( this );
    layout()->addWidget( hbox );

    KPushButton *button = new KPushButton( KStandardGuiItem::close(), hbox );
    button->setObjectName( "closeButton" );
    connect( button, SIGNAL( clicked() ), SLOT( close() ) );

    reposition();

    show();
    m_timerId = startTimer( m_timeout / m_countdownFrame->height() );
}
예제 #7
0
MantidAbout::MantidAbout(QWidget *parent) : MantidQt::API::MantidDialog(parent)
{
  m_uiForm.setupUi(this);

  QLabel* releasedate = m_uiForm.release_datevalue;
  QString releaseDate(Mantid::Kernel::MantidVersion::releaseDate());
  releasedate->setText(releaseDate);

  QString version(Mantid::Kernel::MantidVersion::version());
  QLabel* releaseversion = m_uiForm.release_versionvalue;
  releaseversion->setText(version);

  QString release(Mantid::Kernel::MantidVersion::revision());
  release.insert(0, "<p>");
  release.append(" (<a href=\"http://github.com/mantidproject/mantid/commit/");
  release.append(Mantid::Kernel::MantidVersion::revisionFull());
  release.append("\">on github</a>)</p>");
  QLabel* releaselabel = m_uiForm.revision_value;
  releaselabel->setText(release);
  releaselabel->setOpenExternalLinks(true);

  QLabel* builtusing_labelvalue = m_uiForm.builtusing_labelvalue;
  QString builtusing = "QtiPlot " + QString::number(maj_version) + "." + QString::number(min_version)
      + "." + QString::number(patch_version) + extra_version + "  ";
  builtusing += "Released: " + QString(release_date) + "<br>";
  builtusing += QString(copyright_string);
  builtusing_labelvalue->setText(builtusing);

  QString mantidurl =
      "<p><a href = http://www.mantidproject.org/Main_Page>http://www.mantidproject.org</a></p>";
  QLabel* url = m_uiForm.mantidurl;
  url->setText(mantidurl);
  url->setOpenExternalLinks(true);

  QString mantidDOI = QString::fromStdString("<p><a href = " +\
                      Mantid::Kernel::MantidVersion::doi() + ">" +\
                      Mantid::Kernel::MantidVersion::doi() + "</a></p>");
  m_uiForm.mantiddoi->setText(mantidDOI);
  m_uiForm.mantiddoi->setOpenExternalLinks(true);
}
예제 #8
0
MainWidget::MainWidget(QWidget *parent)
	: QWidget(parent)
{
	QCoreApplication::setApplicationName(tr("HypnoVocabulary"));
	QCoreApplication::setApplicationVersion(VERSION);
	this->setWindowFlags(Qt::WindowTitleHint | Qt::WindowCloseButtonHint);

	stripe_ = new Stripe;

	buttonFont_            = new QPushButton(tr("Choose font"));
	buttonFontColor_       = new QPushButton(tr("Choose font color"));
	buttonBackgroundColor_ = new QPushButton(tr("Choose background color"));
	QHBoxLayout *hl1 = new QHBoxLayout;
	buttonOpenDictionary_  = new QPushButton(tr("Open dictionary"));
	buttonReloadDictionary_= new QPushButton(tr("✅"));
	hl1->addWidget(buttonOpenDictionary_);
	hl1->addWidget(buttonReloadDictionary_);

	QHBoxLayout *hl2 = new QHBoxLayout;
	spinboxInterval_ = new QSpinBox();
	spinboxInterval_->setValue(stripe_->interval());
	spinboxInterval_->setRange(1,86400);
	hl2->addWidget(new QLabel(tr("Interval (sec.)")));
	hl2->addWidget(spinboxInterval_);

	QFrame *f = new QFrame();
	f->setFrameShape(QFrame::HLine);
	QLabel *l = new QLabel(tr("HypnoVocabulary")+" "+QString("(%1)").arg(VERSION)+"<br><a href='http://github.com/rokashevich/hypnovocabulary'>github.com/rokashevich/hypnovocabulary</a>");
	l->setOpenExternalLinks(true);

	QVBoxLayout *vl = new QVBoxLayout;
	vl->addWidget(buttonFont_);
	vl->addWidget(buttonFontColor_);
	vl->addWidget(buttonBackgroundColor_);
	vl->addLayout(hl1);
	vl->addLayout(hl2);
	vl->addWidget(f);
	vl->addWidget(l);
	this->setLayout(vl);

	tray_ = new QSystemTrayIcon();
	tray_->setIcon(QIcon(":/hypnovocabulary.ico"));
	tray_->show();

	connect(buttonFont_,            SIGNAL(clicked()), this, SLOT(onButtonFontClicked_()));
	connect(buttonFontColor_,       SIGNAL(clicked()), this, SLOT(onButtonFontColorClicked_()));
	connect(buttonBackgroundColor_, SIGNAL(clicked()), this, SLOT(onButtonBackgroundColorClicked_()));
	connect(buttonOpenDictionary_,  SIGNAL(clicked()), this, SLOT(onButtonOpenDictionary_()));
	connect(buttonReloadDictionary_,  SIGNAL(clicked()), this, SLOT(onButtonReloadDictionary_()));
	connect(tray_,SIGNAL(activated(QSystemTrayIcon::ActivationReason)),this,SLOT(toggle(QSystemTrayIcon::ActivationReason)));
	connect(spinboxInterval_,SIGNAL(valueChanged(int)),this,SLOT(onIntervalClicked_(int)));
}
예제 #9
0
  AboutDialog::AboutDialog(QWidget *parent)
    : QDialog(parent
#ifdef Q_WS_MAC
        , Qt::Tool
#endif
        )
    {
      QGridLayout *layout = new QGridLayout(this);
      QLabel *label = new QLabel(this);
      QLabel *lbl = new QLabel(this);
      QPushButton *cmd = new QPushButton(tr("OK"), this);
      QPixmap logo = QPixmap(":/icons/avogadro.png");

      label->setPixmap(logo.scaled(256, 256,
            Qt::KeepAspectRatio,
            Qt::SmoothTransformation));

      lbl->setWordWrap(true);
      lbl->setOpenExternalLinks(true);

      // Build up the SCM revision numbers if present
      QString scmVersion(SCM_REVISION);
      QString appVersion(VERSION);
      QLatin1String obVersion(BABEL_VERSION);
      QLatin1String qtVersion(QT_VERSION_STR);
      if (scmVersion.length())
        appVersion += ' ' + QString(tr("(Git revision: %1)", "%1 is the Git revision number.")).arg(scmVersion);
      QString libVersion(Library::version());
      if (Library::scmRevision().length())
        libVersion += ' ' + QString(tr("(Git revision: %1)", "%1 is the Git revision number.")).arg(Library::scmRevision());

      lbl->setText(
          tr("<h3>%1</h3>"
            "<br/><br/>Application Version: %2"
            "<br/><br/>Library Version: %3"
            "<br/><br/>Open Babel Version: %4").arg(tr("Avogadro")).arg(appVersion).arg(libVersion).arg(obVersion) +
          tr("<br/><br/>Qt Version: %1"
            "<br/><br/>For more information check the <a href=\"http://avogadro.openmolecules.net/\">Avogadro homepage</a>."
            "<br/><br/>The program is provided AS IS with NO WARRANTY OF ANY KIND,"
            " INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A"
            " PARTICULAR PURPOSE.<br/>"
             ).arg(qtVersion));

      cmd->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
      cmd->setDefault(true);
      connect(cmd, SIGNAL(clicked()),
          this, SLOT(reject()));

      layout->addWidget(label, 0, 0, 1, 1);
      layout->addWidget(lbl, 0, 1, 4, 4);
      layout->addWidget(cmd, 4, 2, 1, 1);
    }
예제 #10
0
QWidget * Label::createQtWidget(Proxy *proxy, UIProxy *uiproxy, QWidget *parent)
{
    QLabel *label = new QLabel(QString::fromStdString(text), parent);
    label->setEnabled(enabled);
    label->setVisible(visible);
    label->setStyleSheet(QString::fromStdString(style));
    label->setWordWrap(wordWrap);
    label->setOpenExternalLinks(false);
    QObject::connect(label, &QLabel::linkActivated, uiproxy, &UIProxy::onLinkActivated);
    setQWidget(label);
    setProxy(proxy);
    return label;
}
void ContactInfoDialog::Private::addInfoRow(InfoRowIndex index, const QString &value)
{
    InfoRow *row = &InfoRows[index];

    // I18N_NOOP only marks the string for translation, the actual lookup of
    // translated row->title happens here
    QLabel *descriptionLabel = new QLabel(i18n(row->title), q);
    QFont font = descriptionLabel->font();
    font.setBold(true);
    descriptionLabel->setFont(font);

    if (editable) {
        if (index == Birthday) {
            KDateComboBox *combo = new KDateComboBox(q);
            combo->setOptions(KDateComboBox::EditDate | KDateComboBox::SelectDate | KDateComboBox::DatePicker);
            combo->setMinimumWidth(200);
            combo->setDate(QDate::fromString(value));
            connect(combo, SIGNAL(dateChanged(QDate)), q, SLOT(onInfoDataChanged()));

            infoValueWidgets.insert(index, combo);
        } else {
            QLineEdit *edit = new QLineEdit(q);
            edit->setMinimumWidth(200);
            edit->setText(value);
            connect(edit, SIGNAL(textChanged(QString)), q, SLOT(onInfoDataChanged()));

            infoValueWidgets.insert(index, edit);
        }
    } else {
        QLabel *label = new QLabel(q);
        label->setOpenExternalLinks(true);
        label->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse);
        if (index == Email) {
            label->setText(QString::fromLatin1("<a href=\"mailto:%1\">%1</a>").arg(value));
        } else if (index == Homepage) {
            QString format;
            if (!value.startsWith(QLatin1String("http"), Qt::CaseInsensitive)) {
                format = QLatin1String("<a href=\"http://%1\">%1</a>");
            } else {
                format = QLatin1String("<a href=\"%1\">%1</a>");
            }
            label->setText(format.arg(value));
        } else {
            label->setText(value);
        }

        infoValueWidgets.insert(index, label);
    }

    infoLayout->addRow(descriptionLabel, infoValueWidgets.value(index));
}
void RoadGraphPlugin::about()
{
  QDialog dlg( mQGisIface->mainWindow() );
  dlg.setWindowFlags( dlg.windowFlags() | Qt::MSWindowsFixedSizeDialogHint );
  dlg.setWindowFlags( dlg.windowFlags() &~ Qt::WindowContextHelpButtonHint );
  dlg.setWindowTitle( tr( "About RoadGraph" ) );
  QVBoxLayout *lines = new QVBoxLayout( &dlg );
  QLabel *title = new QLabel( "<b>RoadGraph plugin</b>" );
  title->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
  QLabel *version = new QLabel( sPluginVersion );
  version->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
  lines->addWidget( title );
  lines->addWidget( version );
  lines->addWidget( new QLabel( tr( "Find shortest path on road's graph" ) ) );
  lines->addWidget( new QLabel( tr( "<b>Developers:</b>" ) ) );
  lines->addWidget( new QLabel( "    Sergey Yakushev" ) );
  lines->addWidget( new QLabel( tr( "<b>Homepage:</b>" ) ) );

  QSettings settings;
  QString localeFullName, localeShortName;
  bool overrideLocale = settings.value( "locale/overrideFlag", QVariant( false ) ).toBool();
  if ( !overrideLocale )
  {
    localeFullName = QLocale().system().name();
  }
  else
  {
    localeFullName = settings.value( "locale/userLocale", QVariant( "" ) ).toString();
  }

  localeShortName = localeFullName.left( 2 );
  QLabel *link = new QLabel();
  if ( localeShortName == "ru" || localeShortName == "uk" )
  {
    link->setText( "<a href=\"http://gis-lab.info/qa/road-graph.html\">http://gis-lab.info/qa/road-graph.html</a>" );
  }
  else
  {
    link->setText( "<a href=\"http://gis-lab.info/qa/road-graph-eng.html\">http://gis-lab.info/qa/road-graph-eng.html</a>" );
  }

  link->setOpenExternalLinks( true );
  lines->addWidget( link );

  QPushButton *btnClose = new QPushButton( tr( "Close" ) );
  lines->addWidget( btnClose );
  QObject::connect( btnClose, SIGNAL( clicked() ), &dlg, SLOT( close() ) );

  dlg.exec();
} //RoadGraphPlugin::about()
예제 #13
0
//! @return The widget contained by the tab "Authors"
QWidget *AboutQUCS::authorsTab() const
{
    QLabel *authors = new QLabel();
    addAuthor(authors, "Stefan Jahn", "*****@*****.**", tr("Original idea"));
    addAuthor(authors, "Bastien Roucaries", "*****@*****.**",
            tr("Programming"));
    addAuthor(authors, "Gopala Krishna", "*****@*****.**", tr("Programming"));
    addAuthor(authors, "Pablo Daniel Pareja Obregon", "*****@*****.**",
            tr("Programming"));
    authors->setAlignment(Qt::AlignCenter);
    authors->setOpenExternalLinks(true);
    authors->setTextFormat(Qt::RichText);
    return authors;
}
예제 #14
0
AboutDialog::AboutDialog(QWidget *parent)
    : QDialog(parent)
{
    setWindowIcon(GuiRegistry::instance().mainWindowIcon());

    setWindowTitle("About Robomongo");
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
    QGridLayout *layout = new QGridLayout(this);
    layout->setSizeConstraint(QLayout::SetFixedSize);

    QString version = AppRegistry::instance().version();

     const QString description = tr(
        "<h3>Robomongo %1</h3>"
        "Shell-centric MongoDB management tool."
        "<br/>"
        "<br/>"
        "Visit Robomongo website: <a href=\"www.robomongo.org\">www.robomongo.org</a> <br/>"
        "<br/>"
        "<a href=\"https://github.com/paralect/robomongo\">Fork</a> project or <a href=\"https://github.com/paralect/robomongo/issues\">submit</a> issues/proposals on GitHub.  <br/>"
        "<br/>"
        "Copyright 2013 <a href=\"http://www.paralect.com\">Paralect</a>. All rights reserved.<br/>"
        "<br/>"
        "The program is provided AS IS with NO WARRANTY OF ANY KIND, "
        "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
        "PARTICULAR PURPOSE.<br/>")
        .arg(version);

    QLabel *copyRightLabel = new QLabel(description);
    copyRightLabel->setWordWrap(true);
    copyRightLabel->setOpenExternalLinks(true);
    copyRightLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);

    QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
    QPushButton *closeButton = buttonBox->button(QDialogButtonBox::Close);
    buttonBox->addButton(closeButton, QDialogButtonBox::ButtonRole(QDialogButtonBox::RejectRole | QDialogButtonBox::AcceptRole));
    connect(buttonBox , SIGNAL(rejected()), this, SLOT(reject()));

    QIcon icon = GuiRegistry::instance().mainWindowIcon();
    QPixmap iconPixmap = icon.pixmap(48, 48);


    QLabel *logoLabel = new QLabel;
    logoLabel->setPixmap(iconPixmap);
    layout->addWidget(logoLabel , 0, 0, 1, 1);
    layout->addWidget(copyRightLabel, 0, 1, 4, 4);
    layout->addWidget(buttonBox, 4, 0, 1, 5);
}
예제 #15
0
OAuthFirstPage::OAuthFirstPage(QWidget* parent) :
  QWizardPage(parent)
{
  setTitle(tr("Welcome to Pumpa!"));

  QVBoxLayout* layout = new QVBoxLayout(this);

  QLabel* infoLabel = 
    new QLabel(tr("<p>In order to use pump.io you need to first register an "
                  "account with a pump.io server. If you haven't done this yet "
                  "you can do it now by trying out one of the existing public "
                  "servers: <br /><a href=\"http://pump.io/tryit.html\">"
                  "http://pump.io/tryit.html</a>.</p>"
                  "<p>When you are done enter your new pump.io account id "
                  "below in the form of <b>username@servername</b>.</p>"),
               this);
  infoLabel->setOpenExternalLinks(true);
  infoLabel->setTextInteractionFlags(Qt::TextSelectableByMouse |
                                     Qt::LinksAccessibleByMouse);
  infoLabel->setWordWrap(true);
  layout->addWidget(infoLabel);
  layout->addStretch();

  m_messageLabel = new QLabel(this);
  layout->addWidget(m_messageLabel);

  QLabel* accountIdLabel =
    new QLabel(tr("<b>Your pump.io account id:</b>"), this);
  QLineEdit* accountIdEdit = new QLineEdit(EXAMPLE_ACCOUNT_ID, this);
  accountIdLabel->setBuddy(accountIdEdit);
  connect(accountIdEdit, SIGNAL(textEdited(const QString&)),
          this, SIGNAL(completeChanged()));

  QCheckBox* sslCheckBox =
    new QCheckBox(tr("Use secure connection (recommended)"), this);
  sslCheckBox->setChecked(true);

  layout->addWidget(accountIdLabel);
  layout->addWidget(accountIdEdit);
  layout->addWidget(sslCheckBox);

  registerField("accountId*", accountIdEdit);
  registerField("useSsl*", sslCheckBox);

  setButtonText(QWizard::CommitButton, tr("Next"));
  setCommitPage(true);
  setLayout(layout);
}
예제 #16
0
QWidget* StorageNotesPlugin::options()
{
        if (!enabled) {
		return 0;
	}
        QWidget *optionsWid = new QWidget();
        QVBoxLayout *vbox= new QVBoxLayout(optionsWid);

        QLabel *wikiLink = new QLabel(tr("<a href=\"http://psi-plus.com/wiki/plugins#storage_notes_plugin\">Wiki (Online)</a>"),optionsWid);
	wikiLink->setOpenExternalLinks(true);

        vbox->addWidget(wikiLink);
        vbox->addStretch();

        return optionsWid;
}
예제 #17
0
void
WarningDialog::addWarning(Message message)
{
    QWidget *tab = new QWidget;
    QVBoxLayout *layout = new QVBoxLayout;
    layout->setAlignment(Qt::AlignTop);
    tab->setLayout(layout);

    QLabel *text = new QLabel(message.first.first);
    text->setWordWrap(true);
    layout->addWidget(text);

    QLabel *informativeText = new QLabel(message.first.second);
    informativeText->setWordWrap(true);
    layout->addWidget(informativeText);

    informativeText->setOpenExternalLinks(true);

    QIcon icon = IconLoader().load("warning");
    QString headline(tr("Warning"));

    switch (message.second) {
    case Midi:
        icon = IconLoader().load("midi-nok");
        headline = tr("MIDI");
        break;
    case Audio:
        icon = IconLoader().load("audio-nok");
        headline = tr("Audio");
        break;
    case Timer:
        icon = IconLoader().load("timer-nok");
        headline = tr("System timer");
        break;
    case Info:
        icon = IconLoader().load("messagebox-information");
        headline = tr("Information");
        break;
    case Other:
    default:
        // icon and text were initialized suitable for this case, so there's
        // nothing to do here
        break;
    }

    m_tabWidget->addTab(tab, icon, headline);
}
예제 #18
0
KeyboardDialog::KeyboardDialog(QWidget* parent): QDialog(parent) {
	m_keyboard = new KeyboardWidget(this);
	m_keyboard->setKeymap(KeyboardWidget::US);
	m_keyboard->setContentsMargins(0, 0, 0, 0);
	connect(m_keyboard, SIGNAL(selected(QString)), this, SIGNAL(selected(QString)));

	QFrame* keyboardFrame = new QFrame(this);
	keyboardFrame->setFrameShape(QFrame::WinPanel);
	keyboardFrame->setFrameShadow(QFrame::Sunken);
	QVBoxLayout* keyboardFrameLayout = new QVBoxLayout(keyboardFrame);
		keyboardFrameLayout->addWidget(m_keyboard);
	
	QTabBar* tabBar = new QTabBar(this);
	tabBar->addTab(QIcon(":/img/keyboard/usflag.png"), "US Keymap");
	tabBar->addTab(QIcon(":/img/keyboard/deflag.png"), "DE Keymap");
	tabBar->addTab(QIcon(":/img/keyboard/frflag.png"), "FR Keymap");
	tabBar->addTab(QIcon(":/img/keyboard/rawflag.png"), "RAW Codes");
	connect(tabBar, SIGNAL(currentChanged(int)), m_keyboard, SLOT(setKeymap(int)));

	QLabel* selectedLabel = new QLabel("<b>Selected <a href=\"http://www.whdload.de/docs/en/rawkey.html\">raw key code</a>: </b>", this);
	selectedLabel->setOpenExternalLinks(true);

	QLabel* selected = new QLabel("$--", this);
	selected->setFont(QFont("Courier New", 16, QFont::Bold));
	connect(m_keyboard, SIGNAL(selected(QString)), selected, SLOT(setText(QString)));
	
	QPushButton* close = new QPushButton("Done", this);
	connect(close, SIGNAL(clicked()), this, SLOT(accept()));
	
	QVBoxLayout* mainLayout = new QVBoxLayout(this);
		mainLayout->setSizeConstraint(QLayout::SetFixedSize);
		mainLayout->setSpacing(0);
		mainLayout->addWidget(tabBar);
		mainLayout->addWidget(keyboardFrame);
		mainLayout->addSpacing(8);
		QHBoxLayout* selectionLayout = new QHBoxLayout();
			mainLayout->addLayout(selectionLayout);
			selectionLayout->addWidget(selectedLabel);
			selectionLayout->addSpacing(8);
			selectionLayout->addWidget(selected);
			selectionLayout->addStretch();
			selectionLayout->addWidget(close);
	
	setModal(true);
	setWindowTitle(__MAGE__WHDRun__NameAndVersion__ " :: WHDLoad Keyboard");
}
예제 #19
0
KSaneDeviceDialog::KSaneDeviceDialog(QWidget *parent)
    : KDialog(parent)
{

    setButtons(KDialog::User1 | KDialog::Ok | KDialog::Cancel);
    setButtonText(User1, i18n("Reload devices list"));
    
    m_btnGroup = new QButtonGroup(this);

    m_btnBox = new QGroupBox;
    QVBoxLayout *layout = new QVBoxLayout;
    m_btnContainer = new QWidget;
    m_btnLayout = new QVBoxLayout(m_btnContainer);
    QScrollArea *area = new QScrollArea;
    
    m_btnBox->setLayout(layout);

    QLabel *explanation =
      new QLabel(i18n("<html>The SANE (Scanner Access Now Easy) system could not find any device.<br>"
                      "Check that the scanner is plugged in and turned on<br>"
                      "or check your systems scanner setup.<br>"
                      "For details about SANE see the "
                      "<a href='http://www.sane-project.org/'>SANE homepage</a>.</html>"));
    explanation->setOpenExternalLinks(true);
    int l,t,r,b;
    layout->getContentsMargins(&l, &t, &r, &b);
    explanation->setContentsMargins(l, t, r, b);

    layout->addWidget(explanation);
    m_btnBox->adjustSize();  // make sure to see the complete explanation text
    layout->addWidget(area);
    layout->setContentsMargins(0,0,0,0);

    area->setWidgetResizable(true);
    area->setFrameShape(QFrame::NoFrame);
    area->setWidget(m_btnContainer);

    setMainWidget(m_btnBox);
    setMinimumHeight(200);
    m_findDevThread = FindSaneDevicesThread::getInstance();

    connect(m_findDevThread, SIGNAL(finished()), this, SLOT(updateDevicesList()));
    connect(this, SIGNAL(user1Clicked()),        this, SLOT(reloadDevicesList()));

    reloadDevicesList();
}
예제 #20
0
//! @return The widget contained by the tab "About"
QWidget *AboutQUCS::aboutTab() const
{
    QLabel *about = new QLabel(
            tr("Qucs - Quite Universal Circuit Simulator") +
            "<br>" +
            tr("An application for eletric schematics editing and simulation.") +
            "<br><br>" +
            tr("\251 2008-2010 Qucs developer team") +
            "<br><br>"
            "<a href=\"http://qucs.sourceforge.net/\">"
            "http://qucs.sourceforge.net/</a>"
            );
    about->setAlignment(Qt::AlignCenter);
    about->setOpenExternalLinks(true);
    about->setTextFormat(Qt::RichText);
    return about;
}
예제 #21
0
QWidget* PrefsDialog::createProgrammerForm(QList<Platform *> platforms) {
    QGroupBox * formGroupBox = new QGroupBox(tr("Platform Support"));
    QVBoxLayout *layout = new QVBoxLayout();
    layout->setSpacing(SPACING);

    foreach (Platform * platform, platforms) {
        QLabel *platformLb = new QLabel("");
        platformLb->setTextFormat(Qt::RichText);
        platformLb->setText(tr("<b>%1</b>").arg(platform->getName()));
        layout->addWidget(platformLb);

        QFrame * locationFrame = new QFrame(formGroupBox);
        QHBoxLayout * locationLayout = new QHBoxLayout();
        locationLayout->setMargin(0);
        locationLayout->setSpacing(0);
        locationFrame->setLayout(locationLayout);

        QLabel *locationLb = new QLabel(tr("Location:"));
        locationLayout->addWidget(locationLb);
        locationLayout->addSpacing(SPACING);

        QLineEdit * locationLE = new QLineEdit(locationFrame);
        locationLE->setText(platform->getCommandLocation());
        locationLayout->addWidget(locationLE);
        m_programmerLEs.insert(platform->getName(), locationLE);

        QPushButton * locateBtn = new QPushButton(tr("..."),locationFrame);
        locationLayout->addWidget(locateBtn);
        locateBtn->setProperty("platform", platform->getName());
        connect(locateBtn, SIGNAL(clicked()), this, SLOT(chooseProgrammer()));

        layout->addWidget(locationFrame);

        QLabel *hintLb = new QLabel("");
        hintLb->setTextFormat(Qt::RichText);
        hintLb->setOpenExternalLinks(true);
        hintLb->setText(tr("You need to have <a href='%1'>%2</a> (version %3 or newer) installed.")
                        .arg(platform->getDownloadUrl().toString())
                        .arg(platform->getIdeName())
                        .arg(platform->getMinVersion()));
        layout->addWidget(hintLb);

        layout->addSpacing(SPACING);
    }
예제 #22
0
void HelpWidget::placeWidgets()
{
    QLabel *iconLabel = new QLabel(pWidget);
    iconLabel->setPixmap(QPixmap(":/ArpmanetDC/Resources/Logo.png").scaled(100,100, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));

    QLabel *gplLabel = new QLabel(pWidget);
    gplLabel->setPixmap(QPixmap(":/ArpmanetDC/Resources/GPLv3 Logo 128px.png").scaled(48,20, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
   
    QHBoxLayout *aboutLayout = new QHBoxLayout();
    aboutLayout->addWidget(iconLabel);
    
    QLabel *aboutLabel = new QLabel(tr("<b><a href=\"http://code.google.com/p/arpmanetdc/\">ArpmanetDC</a></b><br/>Version %1 Alpha<br/>Copyright (C) 2012, Arpmanet Community<p>Free software licenced under <a href=\"http://www.gnu.org/licenses/\">GPLv3</a></p>").arg(VERSION_STRING), pWidget);
    aboutLabel->setOpenExternalLinks(true);

    QVBoxLayout *aboutVLayout = new QVBoxLayout();
    aboutVLayout->addStretch(1);
    aboutVLayout->addWidget(aboutLabel);
    aboutVLayout->addWidget(gplLabel);
    aboutVLayout->addStretch(1);

    QVBoxLayout *progressLayout = new QVBoxLayout;
    progressLayout->setAlignment(Qt::AlignCenter);
    progressLayout->addStretch(1);
    progressLayout->addWidget(updateLabel);
    progressLayout->addWidget(progress);
    progressLayout->addWidget(updateButton);
    //progressLayout->addStretch(1);

    aboutLayout->addLayout(aboutVLayout);
    aboutLayout->addStretch(1);
    aboutLayout->addLayout(progressLayout);

    QVBoxLayout *vlayout = new QVBoxLayout();
    vlayout->addLayout(aboutLayout);
    vlayout->addSpacing(20);

    browser->scrollToAnchor("ArpmanetDC");
    vlayout->addWidget(browser);

    vlayout->setStretchFactor(aboutLayout, 0);
    vlayout->setStretchFactor(browser, 1);

    pWidget->setLayout(vlayout);
}
예제 #23
0
AboutWindow::AboutWindow(QWidget* parent)
    : QDialog(parent)
{
    setWindowTitle(tr("About Rabenstein"));
    QPushButton* button = new QPushButton(tr("OK"), this);
    QVBoxLayout* vlayout = new QVBoxLayout(this);
    QLabel* text = new QLabel(this);
    button->setDefault(true);
    text->setWordWrap(true);
    text->setOpenExternalLinks(true);
    text->setText(tr("Rabenstein") +
                  tr("<br/><br/> Version: %1")
                  .arg(Rabenstein::version.c_str()) +
                  tr("<br/><br/>Rabenstein is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>"));
    connect(button, SIGNAL(clicked()),
            this, SLOT(reject()));
    vlayout->addWidget(text);
    vlayout->addWidget(button);
}
예제 #24
0
QWidget *AppAboutPage::createPage(QWidget *parent)
{
    QWidget *w = new QWidget(parent);
    QVBoxLayout *layout = new QVBoxLayout(w);
    layout->setSpacing(0);
    layout->setMargin(0);

    // Splash label
    QWidget *sw = new QWidget(w);
    QHBoxLayout *swLayout = new QHBoxLayout(sw);
    sw->setLayout(swLayout);
    QLabel *splash = new QLabel(w);
    splash->setPixmap(theme()->splashScreenPixmap(settings()->path(Core::ISettings::SplashScreen)));
    splash->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
    swLayout->addSpacerItem(new QSpacerItem(10, 10, QSizePolicy::Expanding));
    swLayout->addWidget(splash);
    swLayout->addSpacerItem(new QSpacerItem(10, 10, QSizePolicy::Expanding));
    layout->addWidget(sw);
    QFrame *line = new QFrame(w);
    line->setFrameShape(QFrame::HLine);
    line->setFrameShadow(QFrame::Sunken);
    layout->addWidget(line);
    layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Fixed, QSizePolicy::Fixed));

    // Welcome label
    QLabel *label = new QLabel(w);
    label->setWordWrap(true);
    label->setOpenExternalLinks(true);
    layout->addWidget(label);
    layout->addSpacerItem(new QSpacerItem(20,20, QSizePolicy::Expanding, QSizePolicy::Expanding));
    label->clear();
        Utils::UpdateChecker *up = Core::ICore::instance()->updateChecker();
    QString tmp = tkTr(Trans::Constants::APPLICATION_ABOUT_YEAR_1_WEB_2)
                   .arg(QDate::currentDate().year())
                   .arg(qApp->organizationDomain());
    if (up->hasUpdate()) {
        tmp.append(tkTr(Trans::Constants::UPDATE_AVAILABLE));
    } else {
        tmp.append(tkTr(Trans::Constants::VERSION_UPTODATE));
    }
    label->setText(tmp);
    return w;
}
예제 #25
0
파일: aboutdialog.cpp 프로젝트: GSIO01/PS2
void AboutDialog::initComponents()
{
  QVBoxLayout* layout = new QVBoxLayout(this);

  QHBoxLayout* lyt = new QHBoxLayout();
  #ifdef Q_OS_LINUX
  QLabel* icon = new QLabel("<img src=\"/usr/share/icons/hicolor/128x128/apps/qcurve.png\" width=\"64\" height=\"64\"> </img>");
  #elif WIN32
  QLabel* icon = new QLabel("<img src=\":/hi128-app-qcurve.png\" width=\"64\" height=\"64\"> </img>");
  #endif
  icon->setFixedSize(64, 64);

  QVBoxLayout* subLyt = new QVBoxLayout();
  QLabel* progName = new QLabel(QString("<b>%1</b>").arg(tr("QCurve")));
  QLabel* versionName = new QLabel("Version 1.0");
  subLyt->addWidget(progName);
  subLyt->addWidget(versionName);
  subLyt->addStretch();

  lyt->addWidget(icon);
  lyt->addLayout(subLyt);
  lyt->addStretch();

  QWidget* about = new QWidget();
  subLyt = new  QVBoxLayout(about);
  subLyt->addWidget(new QLabel(tr("QCurve - Parametric curve viewer")));
  subLyt->addWidget(new QLabel(tr("(c) 2012-2013 QCurve team")));

  QLabel* url = new QLabel(QString("<a href=\"http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt\">%1</a>")
  .arg(tr("License: LGPL 2.1 License")));
  url->setOpenExternalLinks(true);
  subLyt->addWidget(url);

  QWidget* authors = new QWidget();

  m_tabWgt = new QTabWidget();
  m_tabWgt->addTab(about, tr("About"));
  m_tabWgt->addTab(authors, tr("Authors"));

  layout->addLayout(lyt);
  layout->addWidget(m_tabWgt);
}
예제 #26
0
QList<QWidget*> ItemsViewDelegate::createItemWidgets() const
{
    QList<QWidget*> list;

    QLabel * infoLabel = new QLabel();
    infoLabel->setOpenExternalLinks(true);
    list << infoLabel;

    QToolButton * installButton = new QToolButton();
    list << installButton;
    setBlockedEventTypes(installButton, QList<QEvent::Type>() << QEvent::MouseButtonPress
                         << QEvent::MouseButtonRelease << QEvent::MouseButtonDblClick);
    connect(installButton, SIGNAL(triggered(QAction*)), this, SLOT(slotActionTriggered(QAction*)));
    connect(installButton, SIGNAL(clicked()), this, SLOT(slotInstallClicked()));

    QLabel * ratingLabel = new QLabel();
    list << ratingLabel;

    return list;
}
예제 #27
0
QWidget* CleanerPlugin::options()
{
        if (!enabled) {
		return 0;
	}
        QWidget *options = new QWidget();
        QVBoxLayout *hbox= new QVBoxLayout(options);
        QPushButton *goButton = new QPushButton(tr("Launch Cleaner"));
	QHBoxLayout *h = new QHBoxLayout;
	h->addWidget(goButton);
	h->addStretch();
	hbox->addLayout(h);
        QLabel *wikiLink = new QLabel(tr("<a href=\"http://psi-plus.com/wiki/plugins#cleaner_plugin\">Wiki (Online)</a>"));
	wikiLink->setOpenExternalLinks(true);
        hbox->addStretch();
        hbox->addWidget(wikiLink);
        connect(goButton, SIGNAL(released()), SLOT(start()));

        return options;
}
예제 #28
0
AboutDialog::AboutDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AboutDialog)
{
    ui->setupUi(this);

    QString aboutString;

    aboutString.append( "<center>" )
            .append( "<h2>" )
            .append( "AstRawDark" )
            .append( "</h2>" )
            .append( "<p>" )
            .append( tr( "Version" ) )
            .append( " : " )
            .append( Globals::VERSION_STRING )
            .append( "</p>" )
            .append( "<p>" )
            .append( tr( "Author" ) )
            .append(
            " : Fr&eacute;d&eacute;ric CORNU <a href=\"mailto:[email protected]\">[email protected]</a>" )
            .append( "</p>" )
            .append( "<p>" )
            .append( tr( "License" ) )
            .append( " : <a href=\"http://www.gnu.org/licenses/gpl-3.0.txt\">General Public License v3</a>" )
            .append( "</p>" )
            .append( "</center>" );

    ui->aboutLabel->setText( aboutString );

    QLabel* lblCreditExiv2 = new QLabel(this);
    lblCreditExiv2->setText(QString("<a href=\"http://www.exiv2.org/\">Exiv2 library</a> : ").append(tr("EXIF metadata handling")));
    lblCreditExiv2->setOpenExternalLinks(true);
    ui->grpCredits->layout()->addWidget(lblCreditExiv2);

    QLabel* lblCreditsQCustomPlot = new QLabel(this);
    lblCreditsQCustomPlot->setText(QString("<a href=\"http://www.qcustomplot.com/\">QCustomPlot Widget</a> : ").append(tr("Data plotting")));
    lblCreditsQCustomPlot->setOpenExternalLinks(true);
    ui->grpCredits->layout()->addWidget(lblCreditsQCustomPlot);

}
예제 #29
0
void FingerprintDialog::handleResults()
{
    p_r = t->fetchResults();

    if ( ! p_r )
    {
        ui->stackedWidget->setCurrentWidget( ui->error );
        return;
    }

    if ( vlc_array_count( & p_r->results.metas_array ) == 0 )
    {
        fingerprint_request_Delete( p_r );
        p_r = NULL;
        ui->stackedWidget->setCurrentWidget( ui->error );
        return;
    }

    ui->stackedWidget->setCurrentWidget( ui->results );

    for ( int i=0; i< vlc_array_count( & p_r->results.metas_array ) ; i++ )
    {
        vlc_meta_t *p_meta =
                (vlc_meta_t *) vlc_array_item_at_index( & p_r->results.metas_array, i );
        QListWidgetItem *item = new QListWidgetItem();
        ui->recordsList->addItem( item );
        QString mb_id( vlc_meta_GetExtra( p_meta, "musicbrainz-id" ) );
        QLabel *label = new QLabel(
                    QString( "<h3 style=\"margin: 0\"><a style=\"text-decoration:none\" href=\"%1\">%2</a></h3>"
                             "<span style=\"padding-left:20px\">%3</span>" )
                    .arg( QString( "http://mb.videolan.org/recording/%1" ).arg( mb_id ) )
                    .arg( qfu( vlc_meta_Get( p_meta, vlc_meta_Title ) ) )
                    .arg( qfu( vlc_meta_Get( p_meta, vlc_meta_Artist ) ) )
        );
        label->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
        label->setOpenExternalLinks( true );
        item->setSizeHint( label->sizeHint() );
        ui->recordsList->setItemWidget( item, label );
    }
    ui->recordsList->setCurrentIndex( ui->recordsList->model()->index( 0, 0 ) );
}
예제 #30
0
QWizardPage* FirstRunWizard::createIntroPage()
{
  QWizardPage *intro = new QWizardPage(this);
  QHBoxLayout *lay = new QHBoxLayout(intro);
  QLabel *desc = new QLabel(intro);
  lay->addWidget(desc);
  intro->setLayout(lay);

  desc->setWordWrap(true);
  intro->setTitle(i18n("Welcome to Simon"));
  desc->setOpenExternalLinks(true);
  desc->setText(i18n("<html><head /><body>"
    "<p>Simon is a speech recognition solution enabling you to control your computer with your voice.</p>"
    "<p>This assistant will help you to get Simon up and running.</p>"
    "<p>Go through the following steps carefully and read the instructions.</p>"
    "<p>You can still change these options later (see the manual for more information)."
    "<p>Find more instructions on <a href=\"http://userbase.kde.org/Simon\">our wiki</a>.</p>"
    "</body></html>"));

  return intro;
}