Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ability to change splash screen using QgsCustomization
  • Loading branch information
NathanW2 committed Mar 17, 2013
1 parent 0108251 commit 8966e9e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/main.cpp
Expand Up @@ -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 )
Expand Down
13 changes: 13 additions & 0 deletions src/app/qgscustomization.cpp
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/app/qgscustomization.h
Expand Up @@ -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();

Expand Down

0 comments on commit 8966e9e

Please sign in to comment.