// This file is part of RSS Guard. // // Copyright (C) 2011-2014 by Martin Rotter // // RSS Guard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // RSS Guard is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with RSS Guard. If not, see . #include "gui/formwelcome.h" #include "core/defs.h" #if !defined(Q_OS_WIN) #include "gui/messagebox.h" #endif #include #include #include #include FormWelcome::FormWelcome(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormWelcome) { m_ui->setupUi(this); // Set flags. setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog); #if !defined(Q_OS_WIN) MessageBox::iconify(m_ui->m_buttonBox); #endif // Set icon. setWindowIcon(QIcon(APP_ICON_PATH)); m_ui->m_lblLogo->setPixmap(QPixmap(APP_ICON_PATH)); // Move the dialog into the middle of the screen. QRect screen = qApp->desktop()->screenGeometry(); move(screen.center() - rect().center()); // Make sure that clicked hyperlinks are opened in defult web browser. connect(m_ui->m_lblInfo, SIGNAL(linkActivated(QString)), this, SLOT(openLink(QString))); // Setup the text. m_ui->m_lblCaption->setText(tr("Welcome to %1").arg(APP_NAME)); m_ui->m_lblInfo->setText( tr("

%3 is a (very) easy-to-use feed reader. " "It supports all major feed formats, including RSS, " "ATOM and RDF.

" "

Make sure you explore all available features. " "If you find a bug or if you want to propose new " "feature, then create new " "issue " "report.

" "

%3 can be translated to any language. " "Contact its author " "in case of your interest.


").arg(APP_URL_ISSUES, APP_EMAIL, APP_NAME)); } void FormWelcome::openLink(const QString &link) { QDesktopServices::openUrl(QUrl(link)); } FormWelcome::~FormWelcome() { delete m_ui; }