diff --git a/plan/about/aboutpage.cpp b/plan/about/aboutpage.cpp index 62b220ec5d1..6207764bc41 100644 --- a/plan/about/aboutpage.cpp +++ b/plan/about/aboutpage.cpp @@ -1,323 +1,322 @@ /* This file is part of the KDE project Copyright (C) 2009, 2011 Dag Andersen This program 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 2 of the License, or (at your option) any later version. This program 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 this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "aboutpage.h" #include "kptproject.h" #include #include #include #include #include #include #include #include #include #include #include KPlatoAboutPage::KPlatoAboutPage() : m_project( 0 ) { } KPlatoAboutPage::~KPlatoAboutPage() { } QString KPlatoAboutPage::main() { KIconLoader *iconloader = KIconLoader::global(); QString res = loadFile( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "calligraplan/about/main.html" )); if ( res.isEmpty() ) { return res; } const char *const up_icon_id = koIconNameCStr("go-up"); const QString up_icon_path = iconloader->iconPath(up_icon_id, KIconLoader::Small); const char *const continue_icon_id = (QApplication::isRightToLeft() ? koIconNameCStr("go-previous") : koIconNameCStr("go-next")); const QString continue_icon_path = iconloader->iconPath(continue_icon_id, KIconLoader::Small); QString icon_up = ""; QString icon_path = ""; res = res.arg( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kf5/infopage/kde_infopage.css" ) ); if ( qApp->layoutDirection() == Qt::RightToLeft ) res = res.arg( "@import \"%1\";" ).arg( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kf5/infopage/kde_infopage_rtl.css" ) ); else res = res.arg( "" ); res = res.arg( i18n( "Plan" ) ) .arg( i18nc("KDE 4 tag line, see http://kde.org/img/kde40.png", "Be free.") ) .arg( i18n("Plan is a Project Planning and Management application.") ) .arg( i18n("Welcome to Plan.") ) .arg( i18n("These introductory pages should give you an idea of how to use Plan and what you can use it for.") ) .arg( icon_path ).arg( i18n( "A short introduction." ) ) .arg( icon_path ).arg( i18n( "Tips on how to manipulate and inspect data." ) ) .arg( icon_path ).arg( i18n( "A small tutorial to get you started." ) ) .arg( icon_up ).arg( i18n( "Close" ) ) .arg( i18n( "Note: To view these pages when you are in other parts of Plan, choose the menu option Help -> Introduction to Plan." ) ) ; return res; } QString KPlatoAboutPage::intro() { KIconLoader *iconloader = KIconLoader::global(); QString res = loadFile( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "calligraplan/about/intro.html" )); if ( res.isEmpty() ) { return res; } const char *const up_icon_id = koIconNameCStr("go-up"); const QString up_icon_path = iconloader->iconPath(up_icon_id, KIconLoader::Small); QString icon_up = ""; const char *const prev_icon_id = koIconNameCStr("go-previous"); const QString prev_icon_path = iconloader->iconPath(prev_icon_id, KIconLoader::Small); const char *const next_icon_id = koIconNameCStr("go-next"); const QString next_icon_path = iconloader->iconPath(next_icon_id, KIconLoader::Small); const QString continue_icon_path = QApplication::isRightToLeft() ? prev_icon_path : next_icon_path; const QString back_icon_path = QApplication::isRightToLeft() ? next_icon_path : prev_icon_path; res = res.arg( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kf5/infopage/kde_infopage.css" ) ); if ( qApp->layoutDirection() == Qt::RightToLeft ) res = res.arg( "@import \"%1\";" ).arg( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kf5/infopage/kde_infopage_rtl.css" ) ); else res = res.arg( "" ); res = res.arg( i18n("Plan is a Project Planning and Management application.") ) .arg( i18n( "Plan is intended for managing moderately large projects with multiple resources. To enable you to model your project adequately, Plan offers different types of task dependencies and timing constraints. Usually you will define your tasks, estimate the effort needed to perform each task, allocate resources and then schedule the project according to the dependency network and resource availability." - "

You can find more information in the documentation " - "or online at http://www.calligra.org/plan

" + "

You can find more information online at https://userbase.kde.org/Plan

" ) ) .arg( icon_up ) .arg( i18n( "Close" ) ) .arg( "" ).arg( continue_icon_path ) .arg( i18n( "Next: Tips" ) ) ; return res; } QString KPlatoAboutPage::tips() { QString res = loadFile( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "calligraplan/about/tips.html" )); if ( res.isEmpty() ) { return res; } KIconLoader *iconloader = KIconLoader::global(); QString viewmag_icon_path = iconloader->iconPath(koIconNameCStr("zoom-in"), KIconLoader::Small); QString history_icon_path = iconloader->iconPath(koIconNameCStr("view-history"), KIconLoader::Small); QString openterm_icon_path = iconloader->iconPath(koIconNameCStr("utilities-terminal"), KIconLoader::Small); QString locationbar_erase_rtl_icon_path = iconloader->iconPath(koIconNameCStr("edit-clear-locationbar-rtl"), KIconLoader::Small); QString locationbar_erase_icon_path = iconloader->iconPath(koIconNameCStr("edit-clear-locationbar-ltr"), KIconLoader::Small); QString window_fullscreen_icon_path = iconloader->iconPath(koIconNameCStr("view-fullscreen"), KIconLoader::Small); QString view_left_right_icon_path = iconloader->iconPath(koIconNameCStr("view-split-left-right"), KIconLoader::Small); const char *const up_icon_id = koIconNameCStr("go-up"); const QString up_icon_path = iconloader->iconPath(up_icon_id, KIconLoader::Small); QString icon_up = ""; const char *const prev_icon_id = koIconNameCStr("go-previous"); const QString prev_icon_path = iconloader->iconPath(prev_icon_id, KIconLoader::Small); const char *const next_icon_id = koIconNameCStr("go-next"); const QString next_icon_path = iconloader->iconPath(next_icon_id, KIconLoader::Small); const QString continue_icon_path = QApplication::isRightToLeft() ? prev_icon_path : next_icon_path; const QString back_icon_path = QApplication::isRightToLeft() ? next_icon_path : prev_icon_path; res = res.arg( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kf5/infopage/kde_infopage.css" ) ); if ( qApp->layoutDirection() == Qt::RightToLeft ) res = res.arg( "@import \"%1\";" ).arg( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kf5/infopage/kde_infopage_rtl.css" ) ); else res = res.arg( "" ); res = res.arg( i18n("Editing tips.") ) .arg( i18n( "
To edit project data, different views and editors can be selected in the View Selector docker." "
The views are generally used to inspect data after the project has been scheduled. No data will appear in the views if the project has not been scheduled. Scheduling is done in the Schedules editor." "
You can edit attributes in the various editors by selecting the item you want to edit (doubleclick or press F2), or open a dialog using the context menu." "" ) ) .arg( icon_up ) .arg( i18n( "Close" ) ) .arg( "" ).arg( continue_icon_path ) .arg( i18n( "Next: Create a simple project" ) ) ; return res; } QString KPlatoAboutPage::tutorial( const QString &header, const QString &text, const QString &nextpage, const QString &nexttext) { QString res = loadFile( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "calligraplan/about/tutorial.html" )); if ( res.isEmpty() ) { return res; } KIconLoader *iconloader = KIconLoader::global(); const char *const up_icon_id = koIconNameCStr("go-up"); const QString up_icon_path = iconloader->iconPath(up_icon_id, KIconLoader::Small); QString icon_up = ""; const char *const prev_icon_id = koIconNameCStr("go-previous"); const QString prev_icon_path = iconloader->iconPath(prev_icon_id, KIconLoader::Small); const char *const next_icon_id = koIconNameCStr("go-next"); const QString next_icon_path = iconloader->iconPath(next_icon_id, KIconLoader::Small); const QString continue_icon_path = QApplication::isRightToLeft() ? prev_icon_path : next_icon_path; const QString back_icon_path = QApplication::isRightToLeft() ? next_icon_path : prev_icon_path; res = res.arg( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kf5/infopage/kde_infopage.css" ) ); if ( qApp->layoutDirection() == Qt::RightToLeft ) res = res.arg( "@import \"%1\";" ).arg( QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kf5/infopage/kde_infopage_rtl.css" ) ); else res = res.arg( "" ); res = res.arg( header ) .arg( text ) .arg( "about:close" ) .arg( icon_up ) .arg( i18n("Close") ) .arg( "about:plan/" + nextpage ) .arg( "" ).arg( continue_icon_path ) .arg( nexttext ) ; return res; } QString KPlatoAboutPage::tutorial1() { return tutorial( i18n("Create the simplest project ever."), i18nc( "1=datetime", "Select the task editor Editors->Tasks:" "
    " "
  • Create a task by selecting Add Task in the toolbar.
  • " "
  • Set Type to Duration.
  • " "
  • Set Estimate to 8 hours.
  • " "
  • Set Constraint to As Soon As Possible.
  • " "
" "Select the schedules editor Editors->Schedules:" "
    " "
  • Create a schedule by selecting Add Schedule in the toolbar.
  • " "
  • Calculate the schedule by selecting Calculate in the toolbar.
  • " "
" "The task should now have been scheduled to start %1 with a duration of 8 hours. You can check this by selecting the Gantt chart Views->Gantt." , KFormat().formatRelativeDateTime(m_project->startTime(), QLocale::LongFormat) ), "tutorial2", i18n( "Next: Resource allocation" ) ); } QString KPlatoAboutPage::tutorial2() { DateTime dt = m_project->constraintStartTime(); if ( m_project->defaultCalendar() ) { dt = m_project->defaultCalendar()->firstAvailableAfter( dt, m_project->constraintEndTime() ); } return tutorial( i18n("Allocate a resource to the task."), i18nc( "1=datetime", "Select the task editor Editors->Tasks:" "
    " "
  • Enter a name (e.g. 'John') in the Allocation column." " (Plan will automatically create a resource with name 'John' under resource group 'Resources'.
  • " "
  • Set Type to Effort.
  • " "
" "Now you need to schedule the project again with the new allocation:" "
Select the schedules editor Editors->Schedules and calculate the schedule by selecting Calculate in the toolbar." "

The task should be scheduled to start %1 with a duration of 8 hours. You can check this by selecting the Gantt chart Views->Gantt.

" , KFormat().formatRelativeDateTime(dt, QLocale::LongFormat) ), "main", i18n( "Next: Introduction" ) ); } void KPlatoAboutPage::generatePage( KHTMLPart &part, const QUrl &url) { QString html; if (url.url() == "about:plan/main") html = main(); else if (url.url() == "about:plan/intro") html = intro(); else if (url.url() == "about:plan/tips") html = tips(); else if (url.url() == "about:plan/tutorial") html = tutorial1(); else if (url.url() == "about:plan/tutorial1") html = tutorial1(); else if (url.url() == "about:plan/tutorial2") html = tutorial2(); else html = main(); part.begin(); part.write( html ); part.end(); } QString KPlatoAboutPage::loadFile( const QString& file ) { QString res; if ( file.isEmpty() ) return res; QFile f( file ); if ( !f.open( QIODevice::ReadOnly ) ) return res; QTextStream t( &f ); res = t.readAll(); // otherwise all embedded objects are referenced as about:/... QString basehref = QLatin1String("\n"); res.replace("", "\n\t" + basehref, Qt::CaseInsensitive); return res; } diff --git a/plan/libs/ui/welcome/WelcomeView.ui b/plan/libs/ui/welcome/WelcomeView.ui index 1e3cd90ad7f..b2279436b9a 100644 --- a/plan/libs/ui/welcome/WelcomeView.ui +++ b/plan/libs/ui/welcome/WelcomeView.ui @@ -1,277 +1,346 @@ KPlato::WelcomeView 0 0 688 364 Qt::Horizontal 13 14 <html><head/><body><p><span style=" font-weight:600;">Create a new project</span></p><p>Creates a new project with default values defined in <span style=" font-style:italic;">Settings.</span></p><p>Opens the <span style=" font-style:italic;">project dialog </span>so you can define project specific properties like Project Name and <span style=" font-style:italic;">Target Start</span> and <span style=" font-style:italic;">End</span> times.</p><p>You can change the default settings by selecting <span style=" font-style:italic;">Settings-&gt;Configure Plan</span>.</p></body></html> New project .. Qt::Horizontal 13 17 Qt::Vertical 20 40 Qt::Horizontal 40 20 Create Shared Resources .. Qt::Horizontal 40 20 Qt::Horizontal 40 20 <html><head/><body><p><span style=" font-weight:600;">Open Project</span></p><p>Displays a file dialog enabling you to open an existing project.</p></body></html> Open Project... .. Qt::Horizontal 40 20 <html><head/><body><p><span style=" font-size:8pt; font-style:italic;">Recent projects:</span></p></body></html> Qt::AlignCenter <html><head/><body><p><span style=" font-weight:600;">Recent Projects</span></p><p>A list of the 10 most recent project files opened.</p><p>This enables you to quickly open projects you have worked on recently.</p></body></html> QFrame::Plain false false false false + + + + Qt::Vertical + + + Qt::Horizontal 40 20 <html><head/><body><p><span style=" font-weight:600;">A Short Introduction to Plan</span></p><p>These introductory pages gives you hints and tips on what you can use Plan for, and how to use it.</p></body></html> Introduction .. Qt::Horizontal 40 20 + + + + Qt::Vertical + + + + 20 + 40 + + + + - <html><head/><body><p><span style=" font-size:11pt; font-weight:600;">Context help</span></p><p>Many functions has help and hints that can be displayed with <span style=" font-style:italic;">What's this</span>.</p><p>Activate it by selecting <span style=" font-style:italic;">Help-&gt;What's this</span> or <span style=" font-style:italic;">Shift+F1</span>.</p></body></html> + <html><head/><body><p><span style=" font-weight:600;">Context Help</span></p><p>Many functions has help and hints that can be displayed with <span style=" font-style:italic;">What's this</span>.</p><p>Activate it by selecting <span style=" font-style:italic;">Help-&gt;What's this</span> or <span style=" font-style:italic;">Shift+F1</span>.</p></body></html> true Qt::AlignHCenter|Qt::AlignTop true Qt::Vertical 20 40 + + + + <html><head/><body><p><span style=" font-weight:600;">Other resources</span></p></body></html> + + + Qt::AlignCenter + + + + + + + <a href="https://userbase.kde.org/Plan">Plan</a> + + + Qt::AlignCenter + + + true + + + + + + + <a href="https://forum.kde.org/viewforum.php?f=203">Community</a> + + + Qt::AlignCenter + + + true + + + + + + + <a href="https://calligra.org">Calligra</a> + + + Qt::AlignCenter + + + true + + +