Esempio n. 1
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow),
    isUntitled(true)
{
    ui->setupUi(this);

    setCurFile(tr("untitled.txt"));

    findDlg = new QDialog(this);
    findDlg->setWindowTitle(tr("Find"));
    findLineEdit = new QLineEdit(findDlg);
    auto btn = new QPushButton(tr("Find next"), findDlg);
    auto layout = new QVBoxLayout(findDlg);
    layout->addWidget(findLineEdit);
    layout->addWidget(btn);
    connect(btn, SIGNAL(clicked()), this, SLOT(showFindText()));

//    ui->statusBar->showMessage(tr("Welcome!"), 2000);
    statusLabel = new QLabel;
    statusLabel->setMinimumSize(150, 20);
    statusLabel->setFrameShape(QFrame::Shape::WinPanel);
    statusLabel->setFrameShadow(QFrame::Shadow::Sunken);
    ui->statusBar->addWidget(statusLabel);
    statusLabel->setText(tr("Welcome!"));

    auto permanent = new QLabel(this);
    permanent->setFrameStyle(QFrame::Shape::Box | QFrame::Shadow::Sunken);
    permanent->setText(tr("<a href=\"http://www.163.com\">netease</a>"));
    permanent->setTextFormat(Qt::TextFormat::RichText);
    permanent->setOpenExternalLinks(true);
    ui->statusBar->addPermanentWidget(permanent);
}
Esempio n. 2
0
TsupportNootka::TsupportNootka(QWidget *parent) :
  TtouchArea(parent)
{
  QString makinkBetter = tr("You also can help with making Nootka better.");
  QString littleEnglish = tr("It requires little bit English, so if you can read a text below there will be something you may get involved.");
  QString br = QStringLiteral("<br>");
  auto headLab = new QLabel(QLatin1String("<big><b>") + makinkBetter + QLatin1String("</big></b><br>") + littleEnglish, this);
    headLab->setWordWrap(true);
    headLab->setAlignment(Qt::AlignCenter);
    headLab->setStyleSheet("background: palette(base)");
    headLab->setContentsMargins(5, 5, 5, 5);

//   auto donateLab = new QLabel(this);
//     donateLab->setWordWrap(true);
//     donateLab->setOpenExternalLinks(true);
// //     donateLab->setContentsMargins(5, 5, 5, 5);
//     donateLab->setStyleSheet(QStringLiteral("background: #0F3F0A; color: #FFFFFF;"));
//     donateLab->setText(QLatin1String("<ul>") + coloredLi("#42DA06", tr("Donate Nootka campaign")) + QLatin1String("<big>")
//        + tr("Feature by feature and Nootka became big and complex project.<br>"
//           "To be able developing this application further,<br>"
//           "to finish version for Android (and other mobile systems later on),<br>"
//           "an equipment capable for that is needed.<br>"
//           "Simply, the PC I'm working on is to old for that…<br>"
//           "Donate Nootka, please.")
//        + QLatin1String("<p><a href=\"http://sourceforge.net/donate/index.php?group_id=515420\">")
//        + tr("Through PayPal or a card") + QLatin1String("</a></p>")
//        + QLatin1String("<p align=\"center\"><a href=\"mailto:seelook.gmail.com\">")
//        + tr("or send email for an account number") + QLatin1String("</a></big></p>") + endLi + QLatin1String("</ul><br>"));
  QString supp;
  supp += QLatin1String("<ul>");
//   supp += QLatin1String("<li><big><b style=\"color: #FF8000;\">Make a donation</b></big><br>Nootka is free of charge but it requires some expenses.<br>To make donation use <a href=\"http://nootka.sourceforge.net\">Nootka site</a><br></li>");
  supp += coloredLi("#42DA06", tr("Donate Nootka campaign"))
       + QLatin1String("<a href=\"http://sourceforge.net/donate/index.php?group_id=515420\">")
       + tr("Through PayPal or a card") + QLatin1String("</a>")
       + QLatin1String("<p align=\"center\"><a href=\"mailto:seelook.gmail.com\">")
       + tr("or send email for an account number") + QLatin1String("</a></p>") + endLi;
  supp += coloredLi("#E57300", "Test Android version") + QLatin1String("Using <a href=\"http://sourceforge.net/p/nootka/bugs/\">bug tracker</a> or <a href=\"mailto:seelook.gmail.com\">email</a> send your phone/tablet model to inform that it works (or not)") + br + endLi;
  supp += QLatin1String("<li><big><b style=\"color: #0000C0;\">Translate Nootka</b></big><br>It does not require any programming skills. Just read <a href=\"http://sourceforge.net/p/nootka/hg/ci/default/tree/lang/how-to-translate.txt\">the instructions</a>,<br>translate and send your work.<br></li>");
  supp += QLatin1String("<li><big><b style=\"color: #FF0000;\">Report an issue</b></big><br>If you find any issue or a bug than request it through:<br><a href=\"http://sourceforge.net/p/nootka/bugs/\">bug tracker</a><br></li>");
  supp += QLatin1String("<li><big><b style=\"color: #C000C0;\">Vote on Nootka</b></big><br>There are a lot of services. For example:<br><a href=\"http://kde-apps.org/content/show.php/Nootka?content=143598\">Kde-Apps</a>, <a href=\"http://qt-apps.org/content/show.php/Nootka?content=148705\">Qt-Apps</a>, <a href=\"http://www.softpedia.com/get/Others/Home-Education/Nootka.shtml\">Softpedia</a><br>or add <b>like</b> or/and <b>g+</b> on <a href=\"http://nootka.sourceforge.net\">Nootka site</a><br></li>");
  supp += QLatin1String("<li><big><b>Express your opinion</b></big><br>Simply <a href=\"mailto:seelook.gmail.com\">send an email</a></li>");
  supp += QLatin1String("</ul><p>&nbsp;&nbsp;Thanks in advance<br>&nbsp;&nbsp;Author</p><br>");
  auto textLab = new QLabel(supp, this);
  textLab->setWordWrap(true);
  textLab->setOpenExternalLinks(true);

  auto lay = new QVBoxLayout;
#if !defined (Q_OS_ANDROID)
    lay->setContentsMargins(0, 0, 0, 0);
#endif
//     lay->addWidget(donateLab);
    lay->addWidget(headLab);
    lay->addWidget(textLab);
    lay->addStretch();
  setLayout(lay);

#if !defined (Q_OS_ANDROID)
  setMinimumWidth(fontMetrics().boundingRect("w").width() * 60);
#endif
}
CreditsDialog::CreditsDialog(QWidget *parent) :
    QDialog(parent)
{
    auto mainLayout = new QVBoxLayout();

    auto titleLabel = new QLabel(tr("Credits"), this);
    titleLabel->setObjectName("CreditsDialogTitleLabel");

    auto programmersLabel = new QLabel(tr("Programmers"), this);
    programmersLabel->setObjectName("CreditsDialogProgrammersLabel");

    auto iconsLabel = new QLabel(tr("Icons"), this);
    iconsLabel->setObjectName("CreditsDialogIconsLabel");

    auto icons8LinkLabel = new QLabel("<a href=\"http://icons8.com/\">http://icons8.com/</a>", this);
    icons8LinkLabel->setObjectName("CreditsDialogIcons8LinkLabel");
    icons8LinkLabel->setTextFormat(Qt::RichText);
    icons8LinkLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
    icons8LinkLabel->setOpenExternalLinks(true);

    mainLayout->addWidget(titleLabel);

    mainLayout->addWidget(programmersLabel);

    mainLayout->addWidget(iconsLabel);
    mainLayout->addWidget(icons8LinkLabel);

    this->setLayout(mainLayout);
}
Esempio n. 4
0
int QLabel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QFrame::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 12)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 12;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QString*>(_v) = text(); break;
        case 1: *reinterpret_cast< Qt::TextFormat*>(_v) = textFormat(); break;
        case 2: _a[0] = const_cast<void*>(reinterpret_cast<const void*>(pixmap())); break;
        case 3: *reinterpret_cast< bool*>(_v) = hasScaledContents(); break;
        case 4: *reinterpret_cast< Qt::Alignment*>(_v) = alignment(); break;
        case 5: *reinterpret_cast< bool*>(_v) = wordWrap(); break;
        case 6: *reinterpret_cast< int*>(_v) = margin(); break;
        case 7: *reinterpret_cast< int*>(_v) = indent(); break;
        case 8: *reinterpret_cast< bool*>(_v) = openExternalLinks(); break;
        case 9: *reinterpret_cast< Qt::TextInteractionFlags*>(_v) = textInteractionFlags(); break;
        case 10: *reinterpret_cast< bool*>(_v) = hasSelectedText(); break;
        case 11: *reinterpret_cast< QString*>(_v) = selectedText(); break;
        }
        _id -= 12;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setText(*reinterpret_cast< QString*>(_v)); break;
        case 1: setTextFormat(*reinterpret_cast< Qt::TextFormat*>(_v)); break;
        case 2: setPixmap(*reinterpret_cast< QPixmap*>(_v)); break;
        case 3: setScaledContents(*reinterpret_cast< bool*>(_v)); break;
        case 4: setAlignment(*reinterpret_cast< Qt::Alignment*>(_v)); break;
        case 5: setWordWrap(*reinterpret_cast< bool*>(_v)); break;
        case 6: setMargin(*reinterpret_cast< int*>(_v)); break;
        case 7: setIndent(*reinterpret_cast< int*>(_v)); break;
        case 8: setOpenExternalLinks(*reinterpret_cast< bool*>(_v)); break;
        case 9: setTextInteractionFlags(*reinterpret_cast< Qt::TextInteractionFlags*>(_v)); break;
        }
        _id -= 12;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 12;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 12;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 12;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 12;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 12;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 12;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Esempio n. 5
0
SongInfoTextView::SongInfoTextView(QWidget* parent)
    : QTextBrowser(parent), last_width_(-1), recursion_filter_(false) {
  setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
  setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

  setOpenExternalLinks(true);
  ReloadSettings();
}
Esempio n. 6
0
YaLabel::YaLabel(QWidget* parent)
	: M11EditableLabel(parent)
	, effectiveWidth_(-1)
	, isEventNotifierLabel_(false)
{
	setOpenExternalLinks(false);
	setEditable(false);
}
Esempio n. 7
0
HelpBrowser::HelpBrowser(QWidget *parent) :
    QTextBrowser(parent)
{
    setOpenLinks(true);
    setOpenExternalLinks(true);
    loadResource(QTextDocument::StyleSheetResource, QUrl(":/help/about.css"));
    connect(this, SIGNAL(sourceChanged(QUrl)), SLOT(slotSourceChanged(QUrl)));
}
Esempio n. 8
0
BrowserView::BrowserView( QWidget* parent): QTextBrowser(parent)
{
  setAttribute(Qt::WA_DeleteOnClose);
  setReadOnly(true);
  setOpenExternalLinks(true);
  setFrameStyle(QFrame::Plain);
  m_filename = "";
  m_alias = "";
}
 explicit DataItem( const QString& text, const QUrl& url ) 
 :m_url(url),
  m_text(text)
 {
     setOpenExternalLinks( true );
     setTextInteractionFlags( Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse );
     QString ss = qobject_cast<unicorn::Application*>(qApp)->loadedStyleSheet();
     setText( "<style>" + ss + "</style><a href=\"" + url.toString() + "\">" + text + "</a>" );
 }
Esempio n. 10
0
		MyTextBrowser::MyTextBrowser(QWidget* parent, const char*)
			: QTextBrowser(parent),
				forward_(false),
				backward_(false)
		{
			setOpenExternalLinks(true);
//   			connect(this, SIGNAL(backwardAvailable(bool)), this, SLOT(setBackwardAvailable(bool)));
//   			connect(this, SIGNAL(forwardAvailable(bool)), this, SLOT(setForwardAvailable(bool)));
		}
QScrollDownTextBrowser::QScrollDownTextBrowser()
{
    autoClear = true;
    setReadOnly(true);
    setOpenExternalLinks(true);
    linecount = 0;
    // Take standard menu, add clear to it, save for later use.
    menu = NULL;
}
Esempio n. 12
0
RSTextBrowser::RSTextBrowser(QWidget *parent) :
    QTextBrowser(parent)
{
    setOpenExternalLinks(true);
    setOpenLinks(false);

    mShowImages = true;
    mImageBlockWidget = NULL;

    connect(this, SIGNAL(anchorClicked(QUrl)), this, SLOT(linkClicked(QUrl)));
}
Esempio n. 13
0
int QTextControl::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 38)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 38;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QString*>(_v) = toHtml(); break;
        case 1: *reinterpret_cast< bool*>(_v) = overwriteMode(); break;
        case 2: *reinterpret_cast< bool*>(_v) = acceptRichText(); break;
        case 3: *reinterpret_cast< int*>(_v) = cursorWidth(); break;
        case 4: *reinterpret_cast< Qt::TextInteractionFlags*>(_v) = textInteractionFlags(); break;
        case 5: *reinterpret_cast< bool*>(_v) = openExternalLinks(); break;
        case 6: *reinterpret_cast< bool*>(_v) = ignoreUnusedNavigationEvents(); break;
        }
        _id -= 7;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setHtml(*reinterpret_cast< QString*>(_v)); break;
        case 1: setOverwriteMode(*reinterpret_cast< bool*>(_v)); break;
        case 2: setAcceptRichText(*reinterpret_cast< bool*>(_v)); break;
        case 3: setCursorWidth(*reinterpret_cast< int*>(_v)); break;
        case 4: setTextInteractionFlags(*reinterpret_cast< Qt::TextInteractionFlags*>(_v)); break;
        case 5: setOpenExternalLinks(*reinterpret_cast< bool*>(_v)); break;
        case 6: setIgnoreUnusedNavigationEvents(*reinterpret_cast< bool*>(_v)); break;
        }
        _id -= 7;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 7;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 7;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 7;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 7;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 7;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 7;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Esempio n. 14
0
ItemText::ItemText(const QString &text, bool isRichText, int maxLines, int maximumHeight, QWidget *parent)
    : QTextBrowser(parent)
    , ItemWidget(this)
    , m_textDocument()
    , m_maximumHeight(maximumHeight)
{
    m_textDocument.setDefaultFont(font());

    setReadOnly(true);
    setUndoRedoEnabled(false);
    setOpenExternalLinks(true);

    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    setFrameStyle(QFrame::NoFrame);

    setContextMenuPolicy(Qt::NoContextMenu);

    viewport()->installEventFilter(this);

    if (isRichText)
        m_textDocument.setHtml( text.left(defaultMaxBytes) );
    else
        m_textDocument.setPlainText( text.left(defaultMaxBytes) );

    m_textDocument.setDocumentMargin(0);

    setProperty("CopyQ_no_style", isRichText);

    if (maxLines > 0) {
        QTextBlock block = m_textDocument.findBlockByLineNumber(maxLines);
        if (block.isValid()) {
            QTextCursor tc(&m_textDocument);
            tc.setPosition(block.position() - 1);
            tc.movePosition(QTextCursor::End, QTextCursor::KeepAnchor);
            tc.removeSelectedText();
            tc.insertHtml( " &nbsp;"
                           "<span style='background:rgba(0,0,0,30);border-radius:4px'>"
                           "&nbsp;&hellip;&nbsp;"
                           "</span>");
        }
    }

    setDocument(&m_textDocument);
}
Esempio n. 15
0
LogOutputWidget::LogOutputWidget(QWidget* parent)
:   LogOutput()
,   QTextBrowser(parent)
{
    setTextInteractionFlags(Qt::TextBrowserInteraction);
    setReadOnly(true);
    setOpenLinks(false);
    setOpenExternalLinks(false);

    m_cursor = new QTextCursor(this->textCursor());
    m_swap = new QTextEdit();

    update();
    clear();

    setCursor(Qt::IBeamCursor);

    setWordWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
}
Esempio n. 16
0
ChatAreaWidget::ChatAreaWidget(QWidget *parent)
    : QTextBrowser(parent)
    , tableFrmt(nullptr)
    , nameWidth(75)
{
    setReadOnly(true);
    viewport()->setCursor(Qt::ArrowCursor);
    setContextMenuPolicy(Qt::CustomContextMenu);
    setUndoRedoEnabled(false);

    setOpenExternalLinks(false);
    setOpenLinks(false);
    setAcceptRichText(false);
    setFrameStyle(QFrame::NoFrame);

    nameFormat.setAlignment(Qt::AlignRight);
    nameFormat.setNonBreakableLines(true);
    dateFormat.setAlignment(Qt::AlignLeft);
    dateFormat.setNonBreakableLines(true);

    connect(this, &ChatAreaWidget::anchorClicked, this, &ChatAreaWidget::onAnchorClicked);
    connect(verticalScrollBar(), SIGNAL(rangeChanged(int,int)), this, SLOT(onSliderRangeChanged()));
}
Esempio n. 17
0
void DetailsWindow::setImage(QSharedPointer<Image> image)
{
	clearLayout(ui->formLayout);

	for (const QPair<QString, QString> &row : image->detailsData())
	{
		if (row.first.isEmpty() && row.second.isEmpty())
		{
			ui->formLayout->addItem(new QSpacerItem(10, 10));
		}
		else
		{
			auto label = new QLabel(QString("<b>%1</b>").arg(row.first), this);
			auto field = new QLabel(row.second, this);
			field->setWordWrap(true);
			field->setOpenExternalLinks(true);
			field->setTextInteractionFlags(Qt::TextBrowserInteraction);
			ui->formLayout->addRow(label, field);
		}
	}

	update();
	resize(sizeHint());
}
Esempio n. 18
0
TextArea::TextArea()
{
    setOpenExternalLinks(true);
}
Esempio n. 19
0
AboutDialog::AboutDialog(QWidget* parent)
    : QDialog(parent)
{
#if defined(Q_OS_WIN)
    resize(530, 620);
    setMinimumSize(530, 620);
#elif defined(Q_OS_MAC)
    resize(660, 690);
    setMinimumSize(660, 690);
#endif

    setWindowModality(Qt::WindowModal);
    QString titleText = tr("About %1").arg(Defs::APP_NAME);
    setWindowTitle(titleText);
    WidgetUtils::removeContextHelpButton(this);

    auto introduction = new QLabel;
    introduction->setText(
        tr("<h2>%1<sup>&reg;</sup> version %2 %3</h2>"
           "<h6>Built on %4 at %5<br />With %7<br /></h6>"
           ).arg(Defs::APP_NAME)
            .arg(Defs::APP_VERSION_STR)
            .arg(Defs::APP_STAGE_STR)
            .arg(QStringLiteral(__DATE__))
            .arg(QStringLiteral(__TIME__))
        #if defined(Q_OS_WIN)
            .arg(Defs::WIN_COMPILER)
        #elif defined(Q_OS_MAC)
            .arg(Defs::MAC_COMPILER)
        #endif
        );
    auto icon = new QLabel;
    auto app_logo_2x = QPixmap(QStringLiteral(":/icons/app-logo-about"));
#if defined(Q_OS_MAC)
    app_logo_2x.setDevicePixelRatio(2.0);
#endif
    icon->setPixmap(app_logo_2x);

    // About information
    auto infoWidget = new QWidget;
    auto infoLabel = new QLabel;
    infoLabel-> setText(
        tr("<br />%1 is an open source software application that is developed, "
           "maintained, supported by LI-COR Biosciences. It originates from "
           "ECO2S, the Eddy COvariance COmmunity Software project, which was "
           "developed as part of the IMECC-EU research project.</p>"
           "<p>We gratefully acknowledge the IMECC consortium, the ECO2S "
           "development team, the University of Tuscia (Italy) and scientists "
           "around the world who assisted with development and testing of the "
           "original version of this software."
           "<p>Copyright &copy; 2011-%2 LI-COR Inc.</p>"
           "<div>Contact LI-COR Inc.:</div><br />"
           "<div style=\"text-indent: 20px;\">4647 Superior Street</div>"
           "<div style=\"text-indent: 20px;\">P.O. Box 4000</div>"
           "<div style=\"text-indent: 20px;\">Lincoln, Nebraska, 68504, USA</div><br />"
           "<div style=\"text-indent: 20px;\">Phone: 1-402-467-3576</div>"
           "<div style=\"text-indent: 20px;\">Toll Free: 800-447-3576</div>"
           "<div style=\"text-indent: 20px;\">Fax: 1-402-467-2819</div>"
           "<div style=\"text-indent: 20px;\">Email: <a href=\"mailto:[email protected]?subject=EddyPro %3\">[email protected]</a></div>"
           "<div style=\"text-indent: 20px;\">Website: <a href=\"http://www.licor.com\">http://www.licor.com</a></div>"
           ).arg(Defs::APP_NAME).arg(Defs::CURRENT_COPYRIGHT_YEAR).arg(Defs::APP_VERSION_STR)
        );
    infoLabel->setOpenExternalLinks(true);
    infoLabel->setWordWrap(true);

    auto infoLayout = new QVBoxLayout;
    infoLayout->addWidget(infoLabel);
    infoLayout->addStretch();
    infoWidget->setLayout(infoLayout);

    // Thanks
    auto thanksWidget = new QWidget;
    auto thanksLabel = new QLabel;
    thanksLabel->setText(
        tr("<br />We would like to thank the whole "
            "Eddy Covariance community, the authors, testers, the users and the "
            "following people (and the missing ones), in no special "
            "order, for their collaboration and source code contribution "
            "to create this free software." ));
    thanksLabel->setWordWrap(true);

    auto thanksEdit = new QTextEdit;
    thanksEdit->setText(
        tr("<h4>Original Authors</h4>"
           "<ul type=\"square\">"
           "<li>Gerardo Fratini ([email protected]): processing engines designer and developer</li>"
           "<li>Antonio Forgione ([email protected]): GUI designer and developer</li>"
           "<li>Dario Papale ([email protected]): project manager and coordinator</li>"
           "</ul>"

           "<h4>Others contributors</h4>"
           "<ul type=\"square\">"
           "<li>Carlo Trotta: code harmonization and documentation</li>"
           "<li>Natascha Kljun: code for footprint estimation, Kljun et al. (2004, BLM)</li>"
           "<li>Taro Nakai: code for angle of attack correction, Nakai et al. (2006, AFM)</li>"
           "<li>Andreas Ibrom: supervision during implementation of a spectral correction procedure, Ibrom et al. (2007, AFM)</li>"
           "<li>Stephen Chan: Revision, refinement and testing of implementation of Massman 2000/2001 spectral correction.</li>"
           "</ul>"

           "<h4>Software validation (intercomparison)</h4>"
           "<ul type=\"square\">"
           "<li>Juha-Pekka Tuovinen</li>"
           "<li>Andreas Ibrom</li>"
           "<li>Ivan Mammarella</li>"
           "<li>Robert Clement</li>"
           "<li>Meelis Molder</li>"
           "<li>Olaf Kolle</li>"
           "<li>Corinna Rebmann</li>"
           "<li>Matthias Mauder</li>"
           "<li>Jan Elbers</li>"
           "</ul>"

           "<h4>User testing and bug notifications</h4>"
           "<ul type=\"square\">"
           "<li>Tarek El-Madany</li>"
           "<li>Sergiy Medinets</li>"
           "<li>Beniamino Gioli</li>"
           "<li>Nicola Arriga</li>"
           "<li>Luca Belelli</li>"
           "<li>Michal Heliasz</li>"
           "<li>Bernard Heinesch</li>"
           "<li>Arnaud Carrara</li>"
           "<li>Patrik Vestin</li>"
           "<li>Matthias Barthel</li>"
           "<li>Karoline Wischnewski</li>"
           "<li>Matthew Wilkinson</li>"
           "<li>Simone Sabbatini</li>"
           "</ul>"

           "<h4>Software discussions</h4>"
           "<ul type=\"square\">"
           "<li>Ian Elbers</li>"
           "<li>George Burba</li>"
           "<li>Christian Wille</li>"
           "</ul>"

           "<h4>Libraries</h4>"
           "<ul type=\"square\">"
           "<li>Arjan van Dijk: libdate module</li>"
           "<li>Michael Baudin, Arjen Markus: m_logging module</li>"
           "<li>University of Chicago: m_levenberg_marquardt from the MINPACK package</li>"
           "<li>netlib.org: FFT routines from the SLATEC Common Mathematical Library</li>"
           "<li>The Qt Company: Qt framework</li>"
           "<li>Boost::math</li>"
           "<li>Trenton Schulz (Trolltech AS): Fader widget</li>"
           "<li>Morgan Leborgne: QProgressIndicator widget</li>"
           "<li>Witold Wysota: Debug helper class</li>"
           "<li>Sergey A. Tachenov: QuaZIP</li>"
           "<li>Mark Summerfield: classes from the book 'Advanced Qt Programming'</li>"
           "</ul>"

           "<h4>Tools</h4>"
           "<ul type=\"square\">"
           "<li>GFortran compiler</li>"
           "<li>MinGW compiler and GDB debugger</li>"
           "<li>Clang compiler</li>"
           "<li>The Qt Company: Qt Creator IDE</li>"
           "<li>Code::Blocks IDE</li>"
           "<li>\n</li>"
           "</ul>"));
    thanksEdit->setReadOnly(true);

    auto thanksLayout = new QVBoxLayout;
    thanksLayout->addWidget(thanksLabel);
    thanksLayout->addWidget(thanksEdit);
    thanksWidget->setLayout(thanksLayout);

    // License
    auto licenseWidget = new QWidget;
    auto licenseLabel = new QLabel;
    licenseLabel->setText(
        tr("<br />The %1 software application is Copyright &copy; 2011-%2 "
           "LI-COR Inc.\n\n"
           "You may use, distribute and copy the %1 programs suite under "
           "the terms of the GNU General Public License version 3, "
           "which is displayed below. If you would like to obtain "
           "a copy of the source package please contact LI-COR "
           "Biosciences at "
           "<a href=\"mailto:[email protected]?subject=%1 %3&body="
           "Please, send me a copy of the source package."
           "\">[email protected]</a>."
        ).arg(Defs::APP_NAME).arg(Defs::CURRENT_COPYRIGHT_YEAR).arg(Defs::APP_VERSION_STR));
    licenseLabel->setWordWrap(true);
    licenseLabel->setOpenExternalLinks(true);

    auto licenseEdit = new QTextEdit;
    QFile licenseFile(QStringLiteral(":/docs/license"));
    qDebug() << licenseFile.open(QIODevice::ReadOnly | QIODevice::Text);
    licenseEdit->setText(QLatin1String(licenseFile.readAll()));
    licenseEdit->setReadOnly(true);
    licenseFile.close();

    auto licenseLayout = new QVBoxLayout;
    licenseLayout->addWidget(licenseLabel);
    licenseLayout->addWidget(licenseEdit);
    licenseWidget->setLayout(licenseLayout);

    // Changelog
    auto changelogWidget = new QWidget;
    auto changelogLabel = new QLabel;
    changelogLabel->setText(
        tr("<br />Software updates include bug fixes, usability "
           "improvements\n\n and feature enhancements. These are summarized "
           "in the change log below."));
    changelogLabel->setWordWrap(true);
    changelogLabel->setOpenExternalLinks(true);

    auto changelogEdit = new QTextEdit;
    QFile changelogFile(QStringLiteral(":/docs/changelog"));
    qDebug() << changelogFile.open(QIODevice::ReadOnly | QIODevice::Text);
    changelogEdit->setText(QLatin1String(changelogFile.readAll()));
    changelogEdit->setReadOnly(true);
    changelogFile.close();

    auto changelogLayout = new QVBoxLayout;
    changelogLayout->addWidget(changelogLabel);
    changelogLayout->addWidget(changelogEdit);
    changelogWidget->setLayout(changelogLayout);

    // Dialog Tabs
    auto tab = new QTabWidget;
    tab->addTab(infoWidget, tr("About"));
    tab->addTab(thanksWidget, tr("Acknowledgments"));
    tab->addTab(licenseWidget, tr("License"));
    tab->addTab(changelogWidget, tr("Changes"));

    auto okButton = WidgetUtils::createCommonButton(this, tr("Ok"));

    auto dialogLayout = new QVBoxLayout(this);
    dialogLayout->addWidget(icon, 0, Qt::AlignCenter);
    dialogLayout->addWidget(introduction, 0, Qt::AlignCenter);
    dialogLayout->addWidget(tab);
    dialogLayout->addWidget(okButton, 0, Qt::AlignCenter);
    dialogLayout->setContentsMargins(30, 30, 30, 30);
    setLayout(dialogLayout);

    connect(okButton, &QPushButton::clicked,
            [=](){ if (this->isVisible()) hide(); });
}
Esempio n. 20
0
TupTextItem::TupTextItem(QGraphicsItem * parent, QGraphicsScene * scene)
    : QGraphicsTextItem(parent, scene), m_flags(flags()), m_isEditable(false)
{
    setOpenExternalLinks(true);
    setEditable(false);
}
Esempio n. 21
0
/** Default constructor. */
HelpTextBrowser::HelpTextBrowser(QWidget *parent)
  : QTextBrowser(parent)
{
  setOpenExternalLinks(false);
}