Skip to content
Permalink
Browse files

Add titles to the welcome page

  • Loading branch information
m-kuhn committed Aug 19, 2015
1 parent 651a223 commit 23edcdb7c4de093974ba37552811bd7a661d0c38
Showing with 21 additions and 5 deletions.
  1. +0 −1 doc/whatsnew.html
  2. +21 −4 src/app/qgswelcomepage.cpp
@@ -83,7 +83,6 @@
</script>
</head>
<body>
<h1>QGIS News</h1>
<div id="feed"></div>
</body>
</html>
@@ -37,11 +37,15 @@ QgsWelcomePage::QgsWelcomePage( QWidget* parent )

mainLayout->addLayout( layout );

QWidget* recentProjctsContainer = new QWidget;
recentProjctsContainer->setLayout( new QVBoxLayout );
QLabel* recentProjectsTitle = new QLabel( QString( "<h1>%1</h1>").arg( tr( "Recent Projects" ) ) );
recentProjctsContainer->layout()->addWidget( recentProjectsTitle );

QListView* welcomeScreenListView = new QListView();
mModel = new QgsWelcomePageItemsModel();
welcomeScreenListView->setModel( mModel );
welcomeScreenListView->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
layout->addWidget( welcomeScreenListView );
welcomeScreenListView->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::MinimumExpanding );
welcomeScreenListView->setStyleSheet( "QListView::item {"
" margin-top: 5px;"
" margin-bottom: 5px;"
@@ -57,12 +61,25 @@ QgsWelcomePage::QgsWelcomePage( QWidget* parent )
" background: #aaaaaa;"
"}");

recentProjctsContainer->layout()->addWidget( welcomeScreenListView );

layout->addWidget( recentProjctsContainer );


QWidget* whatsNewContainer = new QWidget;
whatsNewContainer->setLayout( new QVBoxLayout );
QLabel* whatsNewTitle = new QLabel( QString( "<h1>%1</h1>").arg( tr( "QGIS News" ) ) );
whatsNewContainer->layout()->addWidget( whatsNewTitle );

QgsWebView* whatsNewPage = new QgsWebView();
whatsNewPage->setUrl( QUrl::fromLocalFile( QgsApplication::whatsNewFilePath() ) );
whatsNewPage->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
whatsNewPage->setContextMenuPolicy( Qt::NoContextMenu );
whatsNewPage->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
layout->addWidget( whatsNewPage );
whatsNewPage->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::MinimumExpanding );

whatsNewContainer->layout()->addWidget( whatsNewPage );
layout->addWidget( whatsNewContainer );

connect( whatsNewPage, SIGNAL(linkClicked(QUrl)), this, SLOT(whatsNewLinkClicked(QUrl)));

mVersionInformation = new QLabel;

0 comments on commit 23edcdb

Please sign in to comment.
You can’t perform that action at this time.