Skip to content

Commit

Permalink
Hide splash option works again now
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@4663 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jan 12, 2006
1 parent 3847f76 commit 9c6133e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 32 deletions.
50 changes: 31 additions & 19 deletions src/gui/main.cpp
Expand Up @@ -16,7 +16,23 @@
***************************************************************************/
/* $Id$ */

#include <qgsconfig.h>
//qt includes
#include <QBitmap>
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QFont>
#include <QMessageBox>
#include <QPixmap>
#include <QPixmap>
#include <QSettings>
#include <QSplashScreen>
#include <QString>
#include <QStringList>
#include <QStyle>
#include <QTextCodec>
#include <QTranslator>


#include <iostream>
#include <cstdio>
Expand All @@ -26,26 +42,13 @@

#include <stdio.h>
#include <stdlib.h>
#include <qdir.h>
#include <qfont.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qmessagebox.h>
#include <qstring.h>
#include <qtextcodec.h>
#include <qtranslator.h>
#include <qstyle.h>
#include <qpixmap.h>
#include <qstringlist.h>
#include <QSplashScreen>
#include <QPixmap>
#include <QBitmap>
#ifdef Q_OS_MACX
#include <ApplicationServices/ApplicationServices.h>
#endif

#include "qgisapp.h"
#include "qgsapplication.h"
#include <qgsconfig.h>
#include "qgsexception.h"
#include "qgsproject.h"

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

//set up masking
//set up splash screen
QString mySplashPath(QgsApplication::splashPath());
QPixmap myPixmap(mySplashPath+QString("splash.png"));
QSplashScreen *mypSplash = new QSplashScreen(myPixmap);
QPixmap myMaskPixmap(mySplashPath+QString("splash_mask.png"), 0, Qt::ThresholdDither | Qt::ThresholdAlphaDither | Qt::AvoidDither );
mypSplash->setMask( myMaskPixmap.createHeuristicMask() );
mypSplash->show();
QSettings mySettings;
if (mySettings.value("/qgis/hideSplash").toBool())
{
//splash screen hidden
}
else
{
QPixmap myMaskPixmap(mySplashPath+QString("splash_mask.png"), 0, Qt::ThresholdDither | Qt::ThresholdAlphaDither | Qt::AvoidDither );
mypSplash->setMask( myMaskPixmap.createHeuristicMask() );
mypSplash->show();
}




QgisApp *qgis = new QgisApp(mypSplash); // "QgisApp" used to find canonical instance
qgis->setName( "QgisApp" );


/////////////////////////////////////////////////////////////////////
// If no --project was specified, parse the args to look for a //
Expand Down
14 changes: 2 additions & 12 deletions src/gui/qgsoptions.cpp
Expand Up @@ -46,17 +46,10 @@ QgsOptions::QgsOptions(QWidget *parent, const char *name, bool modal) :
QSettings settings;
QString browser = settings.readEntry("/qgis/browser");
cmbBrowser->setCurrentText(browser);
// set the show splash option
std::cout << "Standard Identify radius setting: " << QGis::DEFAULT_IDENTIFY_RADIUS << std::endl;
int identifyValue = settings.readNumEntry("/Map/identifyRadius",QGis::DEFAULT_IDENTIFY_RADIUS);
std::cout << "Standard Identify radius setting read from settings file: " << identifyValue << std::endl;
spinBoxIdentifyValue->setValue(identifyValue);
bool hideSplashFlag = false;
if (settings.readEntry("/Splash/hideSplash")=="true")
{
hideSplashFlag =true;
}
cbxHideSplash->setChecked(hideSplashFlag);

// set the current theme
cmbTheme->setCurrentText(settings.readEntry("/Themes"));
Expand Down Expand Up @@ -99,9 +92,10 @@ QgsOptions::QgsOptions(QWidget *parent, const char *name, bool modal) :
}
// set the theme combo
cmbTheme->setCurrentText(settings.readEntry("/Themes","default"));
//set teh state of the antialiasing checkbox
//set teh state of the checkboxes
chkAntiAliasing->setChecked(settings.value("/qgis/enable_anti_aliasing").toBool());
chkAddedVisibility->setChecked(!settings.value("/qgis/new_layers_visible").toBool());
cbxHideSplash->setChecked(settings.value("/qgis/hideSplash").toBool());
}

//! Destructor
Expand Down Expand Up @@ -162,10 +156,6 @@ void QgsOptions::saveOptions()
}


void QgsOptions::on_cbxHideSplash_toggled( bool )
{

}



Expand Down
1 change: 0 additions & 1 deletion src/gui/qgsoptions.h
Expand Up @@ -46,7 +46,6 @@ class QgsOptions :public QDialog, private Ui::QgsOptionsBase
//! Slot called when user chooses to change the project wide projection.
void on_pbnSelectProjection_clicked();
void on_btnFindBrowser_clicked();
void on_cbxHideSplash_toggled( bool );
void saveOptions();
//! Slot to change the theme this is handled when the user
// activates or highlights a theme name in the drop-down list
Expand Down

0 comments on commit 9c6133e

Please sign in to comment.