Showing with 111 additions and 30 deletions.
  1. +5 −8 src/app/qgisapp.cpp
  2. +9 −3 src/app/qgsrasterlayerproperties.cpp
  3. +6 −0 src/gui/qgsoptionsdialogbase.cpp
  4. +58 −19 src/ui/qgsprojectpropertiesbase.ui
  5. +33 −0 src/ui/qgsrasterlayerpropertiesbase.ui
13 changes: 5 additions & 8 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,19 +711,16 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
// supposedly all actions have been added, now register them to the shortcut manager
QgsShortcutsManager::instance()->registerAllChildrenActions( this );

// request notification of FileOpen events (double clicking a file icon in Mac OS X Finder)
QgsApplication::setFileOpenEventReceiver( this );

QgsProviderRegistry::instance()->registerGuis( this );

// update windows
qApp->processEvents();

// check if a project has been loaded already via drag/drop or filesystem loading
if ( !QgsProject::instance() )
{
fileNewBlank(); // prepare empty project
}
fileNewBlank(); // prepare empty project, also skips any default templates from loading

// request notification of FileOpen events (double clicking a file icon in Mac OS X Finder)
// should come after fileNewBlank to ensure project is properly set up to receive any data source files
QgsApplication::setFileOpenEventReceiver( this );

} // QgisApp ctor

Expand Down
12 changes: 9 additions & 3 deletions src/app/qgsrasterlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,6 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
.arg( pyramidSentence2 ).arg( pyramidSentence3 )
.arg( pyramidSentence4 ).arg( pyramidSentence5 ) );

QSettings settings;
restoreGeometry( settings.value( "/Windows/RasterLayerProperties/geometry" ).toByteArray() );

setWindowTitle( tr( "Layer Properties - %1" ).arg( lyr->name() ) );

tableTransparency->horizontalHeader()->setResizeMode( 0, QHeaderView::Stretch );
Expand Down Expand Up @@ -381,6 +378,15 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
// update based on lyr's current state
sync();

QSettings settings;
// if dialog hasn't been opened/closed yet, default to Styles tab, which is used most often
// this will be read by restoreOptionsBaseUi()
if ( !settings.contains( QString( "/Windows/RasterLayerProperties/tab" ) ) )
{
settings.setValue( QString( "/Windows/RasterLayerProperties/tab" ),
mOptStackedWidget->indexOf( mOptsPage_Style ) );
}

restoreOptionsBaseUi();
} // QgsRasterLayerProperties ctor

Expand Down
6 changes: 6 additions & 0 deletions src/gui/qgsoptionsdialogbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <QDialog>
#include <QDialogButtonBox>
#include <QLayout>
#include <QListWidget>
#include <QMessageBox>
#include <QScrollBar>
Expand Down Expand Up @@ -45,6 +46,11 @@ QgsOptionsDialogBase::~QgsOptionsDialogBase()

void QgsOptionsDialogBase::initOptionsBase( bool restoreUi )
{
// don't add to dialog margins
// redefine now, or those in inherited .ui file will be added
if ( layout() )
layout()->setContentsMargins( 12, 12, 12, 12 ); // Qt default spacing

// start with copy of qgsoptionsdialog_template.ui to ensure existence of these objects
mOptListWidget = findChild<QListWidget*>( "mOptionsListWidget" );
mOptStackedWidget = findChild<QStackedWidget*>( "mOptionsStackedWidget" );
Expand Down
77 changes: 58 additions & 19 deletions src/ui/qgsprojectpropertiesbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,18 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<y>-19</y>
<width>631</width>
<height>698</height>
<height>686</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QgsCollapsibleGroupBox" name="titleBox">
<property name="title">
Expand Down Expand Up @@ -462,7 +468,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>0</height>
</size>
</property>
</spacer>
Expand Down Expand Up @@ -634,7 +640,7 @@
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
<verstretch>3</verstretch>
</sizepolicy>
</property>
<property name="title">
Expand Down Expand Up @@ -725,7 +731,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>0</height>
</size>
</property>
</spacer>
Expand Down Expand Up @@ -770,11 +776,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>303</width>
<height>75</height>
<width>646</width>
<height>667</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="cbxProjectionEnabled">
<property name="title">
Expand Down Expand Up @@ -824,13 +836,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>132</width>
<height>111</height>
<width>646</width>
<height>669</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<property name="topMargin">
<number>12</number>
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox_3">
Expand Down Expand Up @@ -903,11 +918,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>378</width>
<height>351</height>
<width>646</width>
<height>669</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QgsCollapsibleGroupBox" name="groupBox">
<property name="title">
Expand Down Expand Up @@ -1275,11 +1296,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>525</width>
<height>1270</height>
<width>631</width>
<height>1254</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_13">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QgsCollapsibleGroupBox" name="grpOWSServiceCapabilities">
<property name="title">
Expand Down Expand Up @@ -1485,7 +1512,7 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>244</width>
<width>0</width>
<height>20</height>
</size>
</property>
Expand Down Expand Up @@ -1761,7 +1788,7 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>81</width>
<width>0</width>
<height>20</height>
</size>
</property>
Expand All @@ -1775,6 +1802,12 @@
</item>
<item>
<widget class="QgsCollapsibleGroupBox" name="grpWFSCapabilities">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>3</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>WFS capabilitities</string>
</property>
Expand Down Expand Up @@ -1842,7 +1875,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>0</height>
</size>
</property>
</spacer>
Expand Down Expand Up @@ -1881,11 +1914,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>158</width>
<height>143</height>
<width>646</width>
<height>669</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_17">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="grpPythonMacros">
<property name="title">
Expand Down
33 changes: 33 additions & 0 deletions src/ui/qgsrasterlayerpropertiesbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@
<property name="title">
<string>Layer info</string>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">rastergeneral</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="2">
<widget class="QLabel" name="label_8">
Expand Down Expand Up @@ -343,6 +346,9 @@
<property name="title">
<string>Coordinate reference system</string>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">rastergeneral</string>
</property>
<layout class="QGridLayout" name="_6">
<property name="margin">
<number>11</number>
Expand Down Expand Up @@ -381,6 +387,9 @@
<property name="checked">
<bool>false</bool>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">rastergeneral</string>
</property>
<layout class="QGridLayout" name="_5">
<property name="margin">
<number>11</number>
Expand Down Expand Up @@ -699,6 +708,9 @@
<property name="title">
<string>Description</string>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">rastermeta</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="3" column="1">
<widget class="QTextEdit" name="mLayerAbstractTextEdit">
Expand Down Expand Up @@ -747,6 +759,9 @@
<property name="title">
<string>Properties</string>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">rastermeta</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QTextBrowser" name="txtbMetadata"/>
Expand Down Expand Up @@ -823,6 +838,9 @@
<property name="title">
<string>Band rendering</string>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">rasterstyle</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_21">
<property name="leftMargin">
<number>0</number>
Expand Down Expand Up @@ -914,6 +932,9 @@
<property name="saveCollapsedState" stdset="0">
<bool>true</bool>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">rasterstyle</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0">
<widget class="QLabel" name="labelSaturation">
Expand Down Expand Up @@ -1213,6 +1234,9 @@
<property name="saveCollapsedState" stdset="0">
<bool>true</bool>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">rasterstyle</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="mZoomedInResamplingLabel">
Expand Down Expand Up @@ -1325,6 +1349,9 @@
<property name="title">
<string>Global transparency</string>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">rastertransp</string>
</property>
<layout class="QGridLayout" name="_3">
<item row="0" column="0" colspan="5">
<widget class="QSlider" name="sliderTransparency">
Expand Down Expand Up @@ -1406,6 +1433,9 @@
<property name="title">
<string>No data value</string>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">rastertransp</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_5">
Expand Down Expand Up @@ -1477,6 +1507,9 @@
<property name="title">
<string>Custom transparency options</string>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">rastertransp</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0">
<widget class="QTableWidget" name="tableTransparency">
Expand Down