diff options
author | Thomas Hartmann <Thomas.Hartmann@nokia.com> | 2012-03-06 12:26:18 +0100 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-03-06 12:50:02 +0100 |
commit | 6e4aa3f8b9838a46d238a95c389579885590044f (patch) | |
tree | a491e8c212a3a4e4312b10bc8b2d54a2ddb84d71 /src/plugins/qtsupport/gettingstartedwelcomepage.cpp | |
parent | 65d151ce5eab5ccfecb39483780c32a5dfe15ff6 (diff) | |
download | qt-creator-6e4aa3f8b9838a46d238a95c389579885590044f.tar.gz |
WelcomePage: add ids to IWelcomePage and allow replacing
This patch allows replacing specific pages by id() and priority().
Change-Id: Ief0b01e6a43bdc187625c0b7aa97745588322e5e
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/qtsupport/gettingstartedwelcomepage.cpp')
-rw-r--r-- | src/plugins/qtsupport/gettingstartedwelcomepage.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp index 5b112daa2c..496094ee92 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp @@ -35,6 +35,8 @@ #include "exampleslistmodel.h" #include "screenshotcropper.h" +#include "qtsupportconstants.h" + #include <utils/pathchooser.h> #include <utils/fileutils.h> @@ -210,7 +212,7 @@ QString GettingStartedWelcomePage::title() const int GettingStartedWelcomePage::priority() const { - return 0; + return 4; } void GettingStartedWelcomePage::facilitateQml(QDeclarativeEngine *engine) @@ -218,6 +220,11 @@ void GettingStartedWelcomePage::facilitateQml(QDeclarativeEngine *engine) m_engine = engine; } +GettingStartedWelcomePage::Id GettingStartedWelcomePage::id() const +{ + return GettingStarted; +} + ExamplesWelcomePage::ExamplesWelcomePage() : m_engine(0), m_showExamples(false) { @@ -281,6 +288,11 @@ void ExamplesWelcomePage::facilitateQml(QDeclarativeEngine *engine) rootContenxt->setContextProperty(QLatin1String("gettingStarted"), this); } +ExamplesWelcomePage::Id ExamplesWelcomePage::id() const +{ + return m_showExamples ? Examples : Tutorials; +} + void ExamplesWelcomePage::openSplitHelp(const QUrl &help) { Core::ICore::helpManager()->handleHelpRequest(help.toString()+QLatin1String("?view=split")); |