예제 #1
0
AboutDialog::AboutDialog(QWidget *parent) :
    QDialog(parent)
{
    setupUi(this);
    setWindowTitle(tr("About Flacon"));

    logoLabel->setFixedSize(48, 48);
    logoLabel->setScaledContents(true);
    logoLabel->setPixmap(QPixmap(":logo"));

    authorsEdit->viewport()->setAutoFillBackground(false);
    thanksEdit->viewport()->setAutoFillBackground(false);
    translationsEdit->viewport()->setAutoFillBackground(false);
    programsEdit->viewport()->setAutoFillBackground(false);


    QString css="<style TYPE='text/css'> "
                    "body { font-family: sans-serif;} "
                    ".name { font-size: 16pt; } "
                    "a { white-space: nowrap ;} "
                    "h2 { font-size: 10pt;} "
                    "li { line-height: 120%;} "
                    ".techInfoKey { white-space: nowrap ; margin: 0 20px 0 16px; } "
                "</style>";

    titleLabel->setText(css + titleText());

    aboutLabel->setText(descriptionText() +
                        "<br><br><br>" +
                        copyrightText() +
                        "<hr>" +

                        tr("Homepage: %1").arg(homepageText()) +
                        "<p>" +

                        tr("Bug tracker %1", "About dialog, About tab").arg(bugTrackerText()) +
                        "<p>" +

                        tr("License: %1").arg(licenseText()));


    authorsEdit->setHtml(css + authorsInfo().asString());
    thanksEdit->setHtml(css + tr("Special thanks to:") + thanksInfo().asString());
    translationsEdit->setHtml(css + translationsText());
    programsEdit->setHtml(css + tr("Flacon uses external programs. Many thanks to their authors!") + programsInfo().asString());
}
예제 #2
0
RazorAboutDLGPrivate::RazorAboutDLGPrivate()
{
    libTranslate("librazorqt");
    setupUi(this);

    QString css="<style TYPE='text/css'> "
                    "body { font-family: sans-serif;} "
                    ".name { font-size: 16pt; } "
                    "a { white-space: nowrap ;} "
                    "h2 { font-size: 10pt;} "
                    "li { line-height: 120%;} "
                    ".techInfoKey { white-space: nowrap ; margin: 0 20px 0 16px; } "
                "</style>"
            ;

    iconLabel->setFixedSize(48, 48);
    iconLabel->setScaledContents(true);
    iconLabel->setPixmap(QPixmap(QString(SHARE_DIR) + "/graphics/razor_logo.png"));

    nameLabel->setText(css + titleText());

    aboutBrowser->setHtml(css + aboutText());
    aboutBrowser->viewport()->setAutoFillBackground(false);

    autorsBrowser->setHtml(css + authorsText());
    autorsBrowser->viewport()->setAutoFillBackground(false);

    thanksBrowser->setHtml(css + thanksText());
    thanksBrowser->viewport()->setAutoFillBackground(false);

    translationsBrowser->setHtml(css + translationsText());
    translationsBrowser->viewport()->setAutoFillBackground(false);

    TechnicalInfo info;
    techBrowser->setHtml(info.html());
    techBrowser->viewport()->setAutoFillBackground(false);

    connect(techCopyToClipboardButton, SIGNAL(clicked()), this, SLOT(copyToCliboardTechInfo()));
    this->setAttribute(Qt::WA_DeleteOnClose);
    show();

}
예제 #3
0
//AboutDialogPrivate::AboutDialogPrivate()
AboutDialog::AboutDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AboutDialog)
{
//    this->setAttribute(Qt::WA_DeleteOnClose);
    ui->setupUi(this);

    QString css="<style TYPE='text/css'> "
                    "body { font-family: sans-serif;} "
                    ".name { font-size: 16pt; } "
                    "a { white-space: nowrap ;} "
                    "h2 { font-size: 10pt;} "
                    "li { line-height: 120%;} "
                    ".techInfoKey { white-space: nowrap ; margin: 0 20px 0 16px; } "
                "</style>"
            ;

    ui->iconLabel->setFixedSize(48, 48);
    ui->iconLabel->setScaledContents(true);
    //iconLabel->setPixmap(QPixmap(QString(SHARE_DIR) + "/graphics/razor_logo.png"));

    ui->nameLabel->setText(css + titleText());

    ui->aboutBrowser->setHtml(css + aboutText());
    ui->aboutBrowser->viewport()->setAutoFillBackground(false);

    ui->autorsBrowser->setHtml(css + authorsText());
    ui->autorsBrowser->viewport()->setAutoFillBackground(false);

    ui->thanksBrowser->setHtml(css + thanksText());
    ui->thanksBrowser->viewport()->setAutoFillBackground(false);
    ui->thanksTab->setVisible(false);

    ui->translationsBrowser->setHtml(css + translationsText());
    ui->translationsBrowser->viewport()->setAutoFillBackground(false);


    //    show();
}