Skip to content
Permalink
Browse files

[addlayerbutton] Added option for modeless layer dialog (default false)

  • Loading branch information
elpaso committed Jun 2, 2017
1 parent 43a3ac7 commit e43dfa2810f1d94913c06bd74798035d325f3c75
Showing with 43 additions and 27 deletions.
  1. +8 −1 src/app/qgisapp.cpp
  2. +2 −0 src/app/qgsoptions.cpp
  3. +33 −26 src/ui/qgsoptionsbase.ui
@@ -1605,7 +1605,14 @@ void QgisApp::dataSourceManager()
connect( mDataSourceManagerDialog, &QgsDataSourceManagerDialog::replaceSelectedVectorLayer, this, &QgisApp::replaceSelectedVectorLayer );
connect( mDataSourceManagerDialog, static_cast<void ( QgsDataSourceManagerDialog::* )()>( &QgsDataSourceManagerDialog::addRasterLayer ), this, static_cast<void ( QgisApp::* )()>( &QgisApp::addRasterLayer ) );
}
mDataSourceManagerDialog->exec();
if ( QgsSettings().value( "/qgis/dataSourceManagerNonModal", true ).toBool( ) )
{
mDataSourceManagerDialog->show();
}
else
{
mDataSourceManagerDialog->exec();
}
}

QgisAppStyleSheet *QgisApp::styleSheetBuilder()
@@ -628,6 +628,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
mLegendGroupsBoldChkBx->setChecked( mSettings->value( QStringLiteral( "/qgis/legendGroupsBold" ), false ).toBool() );
cbxHideSplash->setChecked( mSettings->value( QStringLiteral( "/qgis/hideSplash" ), false ).toBool() );
cbxShowTips->setChecked( mSettings->value( QStringLiteral( "/qgis/showTips%1" ).arg( Qgis::QGIS_VERSION_INT / 100 ), true ).toBool() );
mDataSourceManagerNonModal->setChecked( mSettings->value( "/qgis/dataSourceManagerNonModal", false ).toBool() );
cbxCheckVersion->setChecked( mSettings->value( QStringLiteral( "/qgis/checkVersion" ), true ).toBool() );
cbxAttributeTableDocked->setChecked( mSettings->value( QStringLiteral( "/qgis/dockAttributeTable" ), false ).toBool() );
cbxAddPostgisDC->setChecked( mSettings->value( QStringLiteral( "/qgis/addPostgisDC" ), false ).toBool() );
@@ -1208,6 +1209,7 @@ void QgsOptions::saveOptions()
mSettings->setValue( QStringLiteral( "/qgis/legendGroupsBold" ), mLegendGroupsBoldChkBx->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/hideSplash" ), cbxHideSplash->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/showTips%1" ).arg( Qgis::QGIS_VERSION_INT / 100 ), cbxShowTips->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/dataSourceManagerNonModal" ), mDataSourceManagerNonModal->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/checkVersion" ), cbxCheckVersion->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/dockAttributeTable" ), cbxAttributeTableDocked->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/attributeTableBehavior" ), cmbAttrTableBehavior->currentData() );
@@ -349,8 +349,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>843</width>
<height>702</height>
<width>857</width>
<height>678</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_28">
@@ -666,6 +666,13 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_30">
<item>
<widget class="QCheckBox" name="mDataSourceManagerNonModal">
<property name="text">
<string>Modeless data source manager dialog</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mCustomGroupBoxChkBx">
<property name="text">
@@ -1035,8 +1042,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>579</width>
<height>1110</height>
<width>561</width>
<height>1079</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_22">
@@ -1565,8 +1572,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>531</width>
<height>787</height>
<width>511</width>
<height>719</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_27">
@@ -1933,8 +1940,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>713</width>
<height>1110</height>
<width>692</width>
<height>994</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_22">
@@ -2684,8 +2691,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>151</width>
<height>239</height>
<width>146</width>
<height>241</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_46">
@@ -2835,8 +2842,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>523</width>
<height>370</height>
<width>514</width>
<height>334</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_25">
@@ -3178,8 +3185,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>640</width>
<height>660</height>
<width>625</width>
<height>612</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_30">
@@ -3622,8 +3629,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>509</width>
<height>623</height>
<width>487</width>
<height>588</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_39">
@@ -3891,8 +3898,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>572</width>
<height>828</height>
<width>556</width>
<height>740</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_31">
@@ -4469,8 +4476,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>435</width>
<height>402</height>
<width>427</width>
<height>380</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
@@ -4608,8 +4615,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>437</width>
<height>584</height>
<width>429</width>
<height>549</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_15">
@@ -4821,8 +4828,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>292</width>
<height>258</height>
<width>282</width>
<height>234</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_32">
@@ -4930,8 +4937,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>534</width>
<height>790</height>
<width>509</width>
<height>723</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_33">

0 comments on commit e43dfa2

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