File indexing completed on 2024-05-19 05:08:21
0001 /* 0002 SPDX-FileCopyrightText: 2009 Alvaro Soliverez <asoliverez@gmail.com> 0003 SPDX-FileCopyrightText: 2021 Dawid Wróbel <me@dawidwrobel.com> 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 // ---------------------------------------------------------------------------- 0008 // Project Includes 0009 0010 #include "kwelcomepage.h" 0011 0012 // ---------------------------------------------------------------------------- 0013 // QT Includes 0014 0015 #include <QString> 0016 #include <QStringList> 0017 #include <QUrl> 0018 #include <QStandardPaths> 0019 #include <QApplication> 0020 0021 // ---------------------------------------------------------------------------- 0022 // KDE Includes 0023 0024 #include <KLocalizedString> 0025 0026 KWelcomePage::KWelcomePage() 0027 { 0028 } 0029 0030 KWelcomePage::~KWelcomePage() 0031 { 0032 } 0033 0034 bool KWelcomePage::isGroupHeader(const QString& item) 0035 { 0036 return item.startsWith(QLatin1Char('*')); 0037 } 0038 0039 bool KWelcomePage::isGroupItem(const QString& item) 0040 { 0041 return item.startsWith(QLatin1Char('-')); 0042 } 0043 0044 0045 const QString KWelcomePage::welcomePage() 0046 { 0047 QString header; 0048 QString footer; 0049 QString body; 0050 0051 //header 0052 header = QString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">"); 0053 header = QString("<html>"); 0054 header += QString("<head>"); 0055 header += QString("<title>" + i18n("Home Page") + "</title>"); 0056 header += QString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">"); 0057 0058 header += QString("</head>"); 0059 0060 //body of the page 0061 body = QString("<body style=\"margin-top:100px; background: url(qrc:/html/images/bg-texture.png)\">"); 0062 0063 //topright 0064 body += QString("<table cellpadding=10 align=center width=80% height=100%\">"); 0065 body += QString("<tr><td><h1 id=\"title\">" + i18n("Welcome to KMyMoney") + "</h3></td></tr>"); 0066 body += QString("<tr><td><h3 id=\"subtitle\">" + i18n("The free, easy to use, personal finance manager by KDE") + "</h4></td></tr>"); 0067 body += QString("<tr>"); 0068 body += QString("<td align=left valign='middle'>"); 0069 body += QString("<table width=100% height=100%>"); 0070 0071 //Welcome menu 0072 body += QString("<tr><td width=5%></td><td width=95%></td></tr>"); 0073 body += QString("<tr><td><img src=\"qrc:/icons/breeze/actions/22/document-new.svg\"></td>"); 0074 body += QString("<td><a href=\"/action?id=file_new\">" + i18n("Get started and setup accounts") + "</a></td></tr>"); 0075 body += QString("<tr><td><img src=\"qrc:/icons/breeze/actions/22/document-open.svg\"></td>"); 0076 body += QString("<td><a href=\"/action?id=file_open\">" + i18n("Open an existing data file") + "</a></td></tr>"); 0077 body += QString("<tr><td><img src=\"qrc:/icons/breeze/actions/22/help-contents.svg\"></td>"); 0078 body += QString("<td><a href=\"/action?id=help_contents\">" + i18n("Open the Handbook and learn how to use KMyMoney") + "</a></td></tr>"); 0079 body += QString("<tr><td><img src=\"qrc:/icons/breeze/actions/22/globe.svg\"></td>"); 0080 body += QString("<td><a href=\"/action?id=help_visit_website\">" + i18n("Visit our website") + "</a></td></tr>"); 0081 body += QString("<tr><td><img src=\"qrc:/icons/breeze/actions/22/system-users.svg\"></td>"); 0082 body += QString("<td><a href=\"/action?id=help_get_online_help\">" + i18n("Get help from our community") + "</a></td></tr>"); 0083 body += QString("<tr><td><img src=\"qrc:/icons/breeze/status/22/dialog-information.svg\"></td>"); 0084 body += QString("<td><a href=\"/action?id=help_whats_new\">" + i18n("See what's new in this version") + "</a></td></tr>"); 0085 0086 body += QString("</table>"); 0087 body += QString("</td>"); 0088 body += QString("<td></td>"); 0089 body += QString("</tr>"); 0090 body += QString("</table>"); 0091 0092 body += QString("</body>"); 0093 0094 //footer 0095 footer = "</html>"; 0096 0097 return header + body + footer; 0098 }