Skip to content

File tree

3 files changed

+33
-32
lines changed

3 files changed

+33
-32
lines changed
 

‎src/gui/main.cpp

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,23 @@
1616
***************************************************************************/
1717
/* $Id$ */
1818

19-
#include <qgsconfig.h>
19+
//qt includes
20+
#include <QBitmap>
21+
#include <QDir>
22+
#include <QFile>
23+
#include <QFileInfo>
24+
#include <QFont>
25+
#include <QMessageBox>
26+
#include <QPixmap>
27+
#include <QPixmap>
28+
#include <QSettings>
29+
#include <QSplashScreen>
30+
#include <QString>
31+
#include <QStringList>
32+
#include <QStyle>
33+
#include <QTextCodec>
34+
#include <QTranslator>
35+
2036

2137
#include <iostream>
2238
#include <cstdio>
@@ -26,26 +42,13 @@
2642

2743
#include <stdio.h>
2844
#include <stdlib.h>
29-
#include <qdir.h>
30-
#include <qfont.h>
31-
#include <qfile.h>
32-
#include <qfileinfo.h>
33-
#include <qmessagebox.h>
34-
#include <qstring.h>
35-
#include <qtextcodec.h>
36-
#include <qtranslator.h>
37-
#include <qstyle.h>
38-
#include <qpixmap.h>
39-
#include <qstringlist.h>
40-
#include <QSplashScreen>
41-
#include <QPixmap>
42-
#include <QBitmap>
4345
#ifdef Q_OS_MACX
4446
#include <ApplicationServices/ApplicationServices.h>
4547
#endif
4648

4749
#include "qgisapp.h"
4850
#include "qgsapplication.h"
51+
#include <qgsconfig.h>
4952
#include "qgsexception.h"
5053
#include "qgsproject.h"
5154

@@ -420,19 +423,28 @@ int main(int argc, char *argv[])
420423
a.installTranslator(&qgistor);
421424
}
422425

423-
//set up masking
426+
//set up splash screen
424427
QString mySplashPath(QgsApplication::splashPath());
425428
QPixmap myPixmap(mySplashPath+QString("splash.png"));
426429
QSplashScreen *mypSplash = new QSplashScreen(myPixmap);
427-
QPixmap myMaskPixmap(mySplashPath+QString("splash_mask.png"), 0, Qt::ThresholdDither | Qt::ThresholdAlphaDither | Qt::AvoidDither );
428-
mypSplash->setMask( myMaskPixmap.createHeuristicMask() );
429-
mypSplash->show();
430+
QSettings mySettings;
431+
if (mySettings.value("/qgis/hideSplash").toBool())
432+
{
433+
//splash screen hidden
434+
}
435+
else
436+
{
437+
QPixmap myMaskPixmap(mySplashPath+QString("splash_mask.png"), 0, Qt::ThresholdDither | Qt::ThresholdAlphaDither | Qt::AvoidDither );
438+
mypSplash->setMask( myMaskPixmap.createHeuristicMask() );
439+
mypSplash->show();
440+
}
430441

431442

432443

433444

434445
QgisApp *qgis = new QgisApp(mypSplash); // "QgisApp" used to find canonical instance
435446
qgis->setName( "QgisApp" );
447+
436448

437449
/////////////////////////////////////////////////////////////////////
438450
// If no --project was specified, parse the args to look for a //

‎src/gui/qgsoptions.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,10 @@ QgsOptions::QgsOptions(QWidget *parent, const char *name, bool modal) :
4646
QSettings settings;
4747
QString browser = settings.readEntry("/qgis/browser");
4848
cmbBrowser->setCurrentText(browser);
49-
// set the show splash option
5049
std::cout << "Standard Identify radius setting: " << QGis::DEFAULT_IDENTIFY_RADIUS << std::endl;
5150
int identifyValue = settings.readNumEntry("/Map/identifyRadius",QGis::DEFAULT_IDENTIFY_RADIUS);
5251
std::cout << "Standard Identify radius setting read from settings file: " << identifyValue << std::endl;
5352
spinBoxIdentifyValue->setValue(identifyValue);
54-
bool hideSplashFlag = false;
55-
if (settings.readEntry("/Splash/hideSplash")=="true")
56-
{
57-
hideSplashFlag =true;
58-
}
59-
cbxHideSplash->setChecked(hideSplashFlag);
6053

6154
// set the current theme
6255
cmbTheme->setCurrentText(settings.readEntry("/Themes"));
@@ -99,9 +92,10 @@ QgsOptions::QgsOptions(QWidget *parent, const char *name, bool modal) :
9992
}
10093
// set the theme combo
10194
cmbTheme->setCurrentText(settings.readEntry("/Themes","default"));
102-
//set teh state of the antialiasing checkbox
95+
//set teh state of the checkboxes
10396
chkAntiAliasing->setChecked(settings.value("/qgis/enable_anti_aliasing").toBool());
10497
chkAddedVisibility->setChecked(!settings.value("/qgis/new_layers_visible").toBool());
98+
cbxHideSplash->setChecked(settings.value("/qgis/hideSplash").toBool());
10599
}
106100

107101
//! Destructor
@@ -162,10 +156,6 @@ void QgsOptions::saveOptions()
162156
}
163157

164158

165-
void QgsOptions::on_cbxHideSplash_toggled( bool )
166-
{
167-
168-
}
169159

170160

171161

‎src/gui/qgsoptions.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class QgsOptions :public QDialog, private Ui::QgsOptionsBase
4646
//! Slot called when user chooses to change the project wide projection.
4747
void on_pbnSelectProjection_clicked();
4848
void on_btnFindBrowser_clicked();
49-
void on_cbxHideSplash_toggled( bool );
5049
void saveOptions();
5150
//! Slot to change the theme this is handled when the user
5251
// activates or highlights a theme name in the drop-down list

0 commit comments

Comments
 (0)
Please sign in to comment.