Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add first run and settings migration screen (#5838)
- Loading branch information
Showing
5 changed files
with
293 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*************************************************************************** | ||
qgsfirstrundialog.cpp - qgsfirstrundialog | ||
--------------------- | ||
begin : 11.12.2017 | ||
copyright : (C) 2017 by Nathan Woodrow | ||
email : woodrow.nathan@gmail.com | ||
*************************************************************************** | ||
* * | ||
* 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. * | ||
* * | ||
***************************************************************************/ | ||
#include "qgsfirstrundialog.h" | ||
#include "qgis.h" | ||
|
||
QgsFirstRunDialog::QgsFirstRunDialog( QWidget *parent ) : QDialog( parent ) | ||
{ | ||
setupUi( this ); | ||
mWelcomeDevLabel->hide(); | ||
mWelcomeLabel->setText( tr( "Welcome to QGIS %1" ).arg( Qgis::QGIS_VERSION ) ); | ||
if ( Qgis::QGIS_VERSION.endsWith( QLatin1String( "Master" ) ) ) | ||
{ | ||
mWelcomeDevLabel->show(); | ||
} | ||
} | ||
|
||
bool QgsFirstRunDialog::migrateSettings() | ||
{ | ||
return ( mImportSettingsYes->isChecked() ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/*************************************************************************** | ||
qgsfirstrundialog.h - qgsfirstrundialog | ||
--------------------- | ||
begin : 11.12.2017 | ||
copyright : (C) 2017 by Nathan Woodrow | ||
email : woodrow.nathan@gmail.com | ||
*************************************************************************** | ||
* * | ||
* 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. * | ||
* * | ||
***************************************************************************/ | ||
#ifndef QGSFIRSTRUNDIALOG_H | ||
#define QGSFIRSTRUNDIALOG_H | ||
|
||
#include <QWidget> | ||
#include <QDialog> | ||
#include "qgis_app.h" | ||
|
||
#include "ui_qgsfirstrundialog.h" | ||
|
||
class APP_EXPORT QgsFirstRunDialog : public QDialog, private Ui::QgsFirstRunDialog | ||
{ | ||
Q_OBJECT | ||
public: | ||
QgsFirstRunDialog( QWidget *parent = 0 ); | ||
|
||
bool migrateSettings(); | ||
|
||
signals: | ||
|
||
public slots: | ||
}; | ||
|
||
#endif // QGSFIRSTRUNDIALOG_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>QgsFirstRunDialog</class> | ||
<widget class="QDialog" name="QgsFirstRunDialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>659</width> | ||
<height>464</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Dialog</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout_2"> | ||
<item row="2" column="1"> | ||
<widget class="QPushButton" name="pushButton"> | ||
<property name="text"> | ||
<string>Let's get started!</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="0" colspan="2"> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<property name="leftMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>0</number> | ||
</property> | ||
<item row="2" column="1" rowspan="2"> | ||
<widget class="QLabel" name="mWelcomeLabel"> | ||
<property name="font"> | ||
<font> | ||
<pointsize>23</pointsize> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string>Welcome to QGIS 3</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="0" rowspan="3"> | ||
<widget class="QLabel" name="label_3"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Maximum" vsizetype="Maximum"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="text"> | ||
<string/> | ||
</property> | ||
<property name="pixmap"> | ||
<pixmap resource="../../images/images.qrc">:/images/icons/qgis-icon-60x60.png</pixmap> | ||
</property> | ||
<property name="scaledContents"> | ||
<bool>false</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="6" column="0" colspan="2"> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="font"> | ||
<font> | ||
<pointsize>16</pointsize> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string><html><head/><body><p><a href="http://changelog.qgis.org/en/qgis/version/3.0.0/"><span style=" text-decoration: underline; color:#2a76c6;">Check out </span></a>the change log for all the new stuff.</p></body></html></string> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="openExternalLinks"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="4" column="1"> | ||
<widget class="QLabel" name="mWelcomeDevLabel"> | ||
<property name="text"> | ||
<string><html><head/><body><p><span style=" font-style:italic;">You are running a dev version. We would love your feedback and testing.</span></p></body></html></string> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="5" column="0"> | ||
<spacer name="verticalSpacer_3"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeType"> | ||
<enum>QSizePolicy::Preferred</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>40</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
</layout> | ||
</item> | ||
<item row="1" column="0" colspan="2"> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<spacer name="verticalSpacer_2"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeType"> | ||
<enum>QSizePolicy::Expanding</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>40</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string>Ready to go?</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QRadioButton" name="mImportSettingsYes"> | ||
<property name="text"> | ||
<string>Import settings from QGIS 2.</string> | ||
</property> | ||
<property name="checked"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QRadioButton" name="mImportSettingsNo"> | ||
<property name="text"> | ||
<string>I want a clean start. Don't import my QGIS 2 settings.</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="verticalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>40</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="label_4"> | ||
<property name="text"> | ||
<string>Settings will be imported into the default profile and you will only see this screen once.</string> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources> | ||
<include location="../../images/images.qrc"/> | ||
</resources> | ||
<connections> | ||
<connection> | ||
<sender>pushButton</sender> | ||
<signal>clicked()</signal> | ||
<receiver>QgsFirstRunDialog</receiver> | ||
<slot>accept()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>350</x> | ||
<y>424</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>188</x> | ||
<y>453</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
</connections> | ||
</ui> |