Skip to content
Permalink
Browse files
Ability to change splash screen using QgsCustomization
  • Loading branch information
NathanW2 committed Mar 17, 2013
1 parent 0108251 commit 8966e9ec3f356836cd54bf96aac35a3a3595500d
Showing with 17 additions and 1 deletion.
  1. +1 −1 src/app/main.cpp
  2. +13 −0 src/app/qgscustomization.cpp
  3. +3 −0 src/app/qgscustomization.h
@@ -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();

0 comments on commit 8966e9e

Please sign in to comment.