mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
Ability to change splash screen using QgsCustomization
This commit is contained in:
parent
0108251f3b
commit
8966e9ec3f
@ -697,7 +697,7 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
|
||||
//set up splash screen
|
||||
QString mySplashPath( QgsApplication::splashPath() );
|
||||
QString mySplashPath( QgsCustomization::instance()->splashPath() );
|
||||
QPixmap myPixmap( mySplashPath + QString( "splash.png" ) );
|
||||
QSplashScreen *mypSplash = new QSplashScreen( myPixmap );
|
||||
if ( mySettings.value( "/qgis/hideSplash" ).toBool() || myHideSplash )
|
||||
|
@ -907,6 +907,19 @@ void QgsCustomization::preNotify( QObject * receiver, QEvent * event, bool * don
|
||||
}
|
||||
}
|
||||
|
||||
QString QgsCustomization::splashPath()
|
||||
{
|
||||
if ( isEnabled() )
|
||||
{
|
||||
QString path = mSettings->value( "/Customization/splashpath", QgsApplication::splashPath() ).toString();
|
||||
return path;
|
||||
}
|
||||
else
|
||||
{
|
||||
return QgsApplication::splashPath();
|
||||
}
|
||||
}
|
||||
|
||||
void QgsCustomization::loadDefault()
|
||||
{
|
||||
QSettings mySettings;
|
||||
|
@ -128,6 +128,9 @@ class QgsCustomization : public QObject
|
||||
|
||||
void setSettings( QSettings* settings ) { mSettings = settings ;}
|
||||
|
||||
// Return the path to the splash screen
|
||||
QString splashPath();
|
||||
|
||||
// Load and set default customization
|
||||
void loadDefault();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user