Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
c6df40a5
Commit
c6df40a5
authored
May 11, 2009
by
Daniel Molkentin
Browse files
Add more sections. Getting started is still a stub.
parent
dbc877e7
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/coreplugin.pro
View file @
c6df40a5
...
...
@@ -2,6 +2,7 @@ TEMPLATE = lib
TARGET
=
Core
DEFINES
+=
CORE_LIBRARY
QT
+=
xml
\
network
\
script
\
svg
include
(..
/../
qtcreatorplugin
.
pri
)
...
...
@@ -19,6 +20,7 @@ DEPENDPATH += dialogs \
scriptmanager
SOURCES
+=
mainwindow
.
cpp
\
welcomemode
.
cpp
\
rssfetcher
.
cpp
\
editmode
.
cpp
\
tabpositionindicator
.
cpp
\
fancyactionbar
.
cpp
\
...
...
@@ -78,6 +80,7 @@ SOURCES += mainwindow.cpp \
HEADERS
+=
mainwindow
.
h
\
welcomemode
.
h
\
welcomemode_p
.
h
\
rssfetcher
.
h
\
editmode
.
h
\
tabpositionindicator
.
h
\
fancyactionbar
.
h
\
...
...
src/plugins/coreplugin/welcomemode.cpp
View file @
c6df40a5
...
...
@@ -31,6 +31,7 @@
#include
"coreconstants.h"
#include
"uniqueidmanager.h"
#include
"modemanager.h"
#include
"rssfetcher.h"
#include
<QtGui/QToolBar>
#include
<QtGui/QDesktopServices>
...
...
@@ -53,7 +54,7 @@ struct WelcomeModePrivate
QWidget
*
m_widget
;
QWidget
*
m_welcomePage
;
Ui
::
WelcomePage
ui
;
RSSFetcher
*
rssFetcher
;
WelcomeMode
::
WelcomePageData
lastData
;
};
...
...
@@ -97,11 +98,14 @@ WelcomeMode::WelcomeMode() :
l
->
setMargin
(
0
);
l
->
setSpacing
(
0
);
l
->
addWidget
(
new
QToolBar
(
m_d
->
m_widget
));
m_d
->
rssFetcher
=
new
RSSFetcher
(
6
,
this
);
m_d
->
m_welcomePage
=
new
QWidget
(
m_d
->
m_widget
);
m_d
->
ui
.
setupUi
(
m_d
->
m_welcomePage
);
m_d
->
ui
.
sessTreeWidget
->
viewport
()
->
setAutoFillBackground
(
false
);
m_d
->
ui
.
projTreeWidget
->
viewport
()
->
setAutoFillBackground
(
false
);
m_d
->
ui
.
newsTreeWidget
->
viewport
()
->
setAutoFillBackground
(
false
);
m_d
->
ui
.
sitesTreeWidget
->
viewport
()
->
setAutoFillBackground
(
false
);
m_d
->
ui
.
tutorialTreeWidget
->
viewport
()
->
setAutoFillBackground
(
false
);
l
->
addWidget
(
m_d
->
m_welcomePage
);
updateWelcomePage
(
WelcomePageData
());
...
...
@@ -118,6 +122,29 @@ WelcomeMode::WelcomeMode() :
connect
(
m_d
->
ui
.
restoreSessionButton
,
SIGNAL
(
clicked
()),
SLOT
(
slotRestoreLastSession
()));
connect
(
m_d
->
ui
.
sessTreeWidget
,
SIGNAL
(
activated
(
QString
)),
SLOT
(
slotSessionClicked
(
QString
)));
connect
(
m_d
->
ui
.
projTreeWidget
,
SIGNAL
(
activated
(
QString
)),
SLOT
(
slotProjectClicked
(
QString
)));
connect
(
m_d
->
ui
.
newsTreeWidget
,
SIGNAL
(
activated
(
QString
)),
SLOT
(
slotUrlClicked
(
QString
)));
connect
(
m_d
->
ui
.
sitesTreeWidget
,
SIGNAL
(
activated
(
QString
)),
SLOT
(
slotUrlClicked
(
QString
)));
connect
(
m_d
->
rssFetcher
,
SIGNAL
(
newsItemReady
(
QString
,
QString
)),
m_d
->
ui
.
newsTreeWidget
,
SLOT
(
slotAddItem
(
QString
,
QString
)));
//: Add localized feed here only if one exists
m_d
->
rssFetcher
->
fetch
(
QUrl
(
tr
(
"http://labs.trolltech.com/blogs/feed"
)));
m_d
->
ui
.
sitesTreeWidget
->
addItem
(
tr
(
"Qt Software"
),
QLatin1String
(
"http://www.qtsoftware.com"
));
m_d
->
ui
.
sitesTreeWidget
->
addItem
(
tr
(
"Qt Labs"
),
QLatin1String
(
"http://labs.qtsoftware.com"
));
m_d
->
ui
.
sitesTreeWidget
->
addItem
(
tr
(
"Qt Git Hosting"
),
QLatin1String
(
"http://qt.gitorious.org"
));
m_d
->
ui
.
sitesTreeWidget
->
addItem
(
tr
(
"Qt Centre"
),
QLatin1String
(
"http://www.qtcentre.org"
));
m_d
->
ui
.
sitesTreeWidget
->
addItem
(
tr
(
"Qt/S60 at Forum Nokia"
),
QLatin1String
(
"http://discussion.forum.nokia.com/forum/forumdisplay.php?f=196"
));
m_d
->
ui
.
tutorialTreeWidget
->
addItem
(
tr
(
"Tutorial 1"
),
QLatin1String
(
""
));
m_d
->
ui
.
tutorialTreeWidget
->
addItem
(
tr
(
"Tutorial 2"
),
QLatin1String
(
""
));
m_d
->
ui
.
tutorialTreeWidget
->
addItem
(
tr
(
"Tutorial 3"
),
QLatin1String
(
""
));
m_d
->
ui
.
tutorialTreeWidget
->
addItem
(
tr
(
"Tutorial 4"
),
QLatin1String
(
""
));
m_d
->
ui
.
tutorialTreeWidget
->
addItem
(
tr
(
"Tutorial 5"
),
QLatin1String
(
""
));
// ### check for first start, select getting started in this case
m_d
->
ui
.
developSectButton
->
animateClick
();
}
WelcomeMode
::~
WelcomeMode
()
...
...
@@ -218,6 +245,11 @@ void WelcomeMode::slotProjectClicked(const QString &data)
activateEditMode
();
}
void
WelcomeMode
::
slotUrlClicked
(
const
QString
&
data
)
{
QDesktopServices
::
openUrl
(
QUrl
(
data
));
}
void
WelcomeMode
::
slotRestoreLastSession
()
{
emit
requestSession
(
m_d
->
lastData
.
previousSession
);
...
...
@@ -310,6 +342,11 @@ QTreeWidgetItem *WelcomeModeTreeWidget::addItem(const QString &label, const QStr
return
item
;
}
void
WelcomeModeTreeWidget
::
slotAddItem
(
const
QString
&
label
,
const
QString
&
data
)
{
addTopLevelItem
(
addItem
(
label
,
data
));
}
void
WelcomeModeTreeWidget
::
slotItemClicked
(
QTreeWidgetItem
*
item
)
{
emit
activated
(
item
->
data
(
0
,
Qt
::
UserRole
).
toString
());
...
...
src/plugins/coreplugin/welcomemode.h
View file @
c6df40a5
...
...
@@ -85,6 +85,7 @@ private slots:
void
slotRestoreLastSession
();
void
slotSessionClicked
(
const
QString
&
data
);
void
slotProjectClicked
(
const
QString
&
data
);
void
slotUrlClicked
(
const
QString
&
data
);
private:
void
activateEditMode
();
...
...
src/plugins/coreplugin/welcomemode.ui
View file @
c6df40a5
This diff is collapsed.
Click to expand it.
src/plugins/coreplugin/welcomemode_p.h
View file @
c6df40a5
...
...
@@ -68,6 +68,9 @@ public:
WelcomeModeTreeWidget
(
QWidget
*
parent
=
0
);
QTreeWidgetItem
*
addItem
(
const
QString
&
label
,
const
QString
&
data
);
public
slots
:
void
slotAddItem
(
const
QString
&
label
,
const
QString
&
data
);
signals:
void
activated
(
const
QString
&
data
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment