Skip to content
Permalink
Browse files

Remove news feed tab from start page

Fix #13497
Fix #13471
  • Loading branch information
m-kuhn committed Oct 3, 2015
1 parent 67082a9 commit 95c377a607757b4cc9d03a6e399b5516d0b44dcd
Showing with 2 additions and 182 deletions.
  1. +0 −149 doc/whatsnew.html
  2. +1 −30 src/app/qgswelcomepage.cpp
  3. +1 −3 src/app/qgswelcomepage.h

This file was deleted.

@@ -18,16 +18,14 @@
#include "qgisapp.h"
#include "qgsversioninfo.h"
#include "qgsapplication.h"
#include "qgsnetworkaccessmanager.h"

#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QListView>
#include <QSettings>
#include <QDesktopServices>

QgsWelcomePage::QgsWelcomePage( QWidget* parent )
: QTabWidget( parent )
: QWidget( parent )
{
QVBoxLayout* mainLayout = new QVBoxLayout;
mainLayout->setMargin( 0 );
@@ -52,28 +50,6 @@ QgsWelcomePage::QgsWelcomePage( QWidget* parent )

addTab( recentProjctsContainer, "Recent Projects" );

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->page()->setNetworkAccessManager( QgsNetworkAccessManager::instance() );

whatsNewPage->setUrl( QUrl::fromLocalFile( QgsApplication::whatsNewFilePath() ) );
whatsNewPage->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
whatsNewPage->setContextMenuPolicy( Qt::NoContextMenu );
whatsNewPage->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
whatsNewPage->setStyleSheet( "background:transparent" );
whatsNewPage->setAttribute( Qt::WA_TranslucentBackground );

whatsNewContainer->layout()->addWidget( whatsNewPage );
// whatsNewContainer->setMaximumWidth( 250 );
// whatsNewContainer->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
addTab( whatsNewContainer, "News" );

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

mVersionInformation = new QLabel;
mainLayout->addWidget( mVersionInformation );
mVersionInformation->setVisible( false );
@@ -117,8 +93,3 @@ void QgsWelcomePage::versionInfoReceived()
"}" );
}
}

void QgsWelcomePage::whatsNewLinkClicked( const QUrl& url )
{
QDesktopServices::openUrl( url );
}
@@ -16,15 +16,14 @@
#ifndef QGSWELCOMEDIALOG_H
#define QGSWELCOMEDIALOG_H

#include <QTabWidget>
#include <QWidget>
#include <QLabel>

#include "qgswelcomepageitemsmodel.h"

class QgsVersionInfo;

class QgsWelcomePage : public QTabWidget
class QgsWelcomePage : public QWidget
{
Q_OBJECT

@@ -38,7 +37,6 @@ class QgsWelcomePage : public QTabWidget
private slots:
void itemActivated( const QModelIndex& index );
void versionInfoReceived();
void whatsNewLinkClicked( const QUrl& url );

private:
QgsWelcomePageItemsModel* mModel;

0 comments on commit 95c377a

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