Ability to change splash screen using QgsCustomization

This commit is contained in:
Nathan Woodrow 2013-03-17 17:45:59 +10:00
parent 0108251f3b
commit 8966e9ec3f
3 changed files with 17 additions and 1 deletions

View File

@ -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 )

View File

@ -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;

View File

@ -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();