Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Splashscreen enhancements. Added toOGRSRS for marco to spatial ref sys
git-svn-id: http://svn.osgeo.org/qgis/trunk@3428 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed May 22, 2005
1 parent cf6451b commit 17d0f01
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Expand Up @@ -3,6 +3,10 @@
Version 0.6 'Simon' .... development version
QGIS Change Log

2005-04-17 [timlinux] 0.6devel25
** More updates to qgsspatialrefsys. Changed splash to be a masked widget &
added the xcf masters for the splash. Splash still needs some minor
updating relating to text placement.
2005-04-17 [timlinux] 0.6devel24
** Added logic for reverse mapping a wkt or proj4string to an srsid - not
very well tested at this stage but works for me with my test dataset
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Expand Up @@ -25,7 +25,7 @@ dnl ---------------------------------------------------------------------------
MAJOR_VERSION=0
MINOR_VERSION=6
MICRO_VERSION=0
EXTRA_VERSION=24
EXTRA_VERSION=25
if test $EXTRA_VERSION -eq 0; then
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
else
Expand Down
Binary file modified src/images/splash/splash.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/splash/splash_mask.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/qgsspatialrefsys.cpp
Expand Up @@ -1083,3 +1083,10 @@ bool QgsSpatialRefSys::equals(const char *theProj4CharArray)
}
return myMatchFlag;
}

OGRSpatialReference QgsSpatialRefSys::toOgrSrs()
{
OGRSpatialReference myOgrSpatialRef1;
OGRErr myInputResult1 = myOgrSpatialRef1.importFromProj4((char *)mProj4String.latin1());
return myOgrSpatialRef1;
}
7 changes: 6 additions & 1 deletion src/qgsspatialrefsys.h
Expand Up @@ -180,7 +180,12 @@ class QgsSpatialRefSys
* is inconclusive.
*/
bool equals(const char *theProj4CharArray);
bool operator==(const char* abc) { return true;};
/*! A helper to get an ogr representation of this srs
* @return OGRSpatialReference
*/
OGRSpatialReference toOgrSrs();


// Accessors -----------------------------------

/*! Get the SrsId - if possible
Expand Down
16 changes: 14 additions & 2 deletions src/splashscreen.cpp
Expand Up @@ -21,16 +21,28 @@
#include "splashscreen.h"
#include "qfont.h"
#include "qgis.h"
#include "qbitmap.h"
#if defined(WIN32) || defined(Q_OS_MACX)
QString PKGDATAPATH = qApp->applicationDirPath() + "/share/qgis";
#endif
#define STATUS_TEXT_X 10
#define STATUS_TEXT_Y 10
SplashScreen::SplashScreen():QWidget(0, 0, WStyle_Customize | WStyle_Splash)
{
splashImage.load(QString(PKGDATAPATH) + QString("/images/splash/splash.png"));
setErasePixmap(splashImage);
//set up masking
splashImage.load(QString(PKGDATAPATH) + QString("/images/splash/splash.png"), 0, Qt::ThresholdDither | Qt::AvoidDither );
resize(splashImage.size());
//
// NOTES! the mask must be a 1 BIT IMAGE or it wont work!
//
QPixmap myMaskPixmap( 564, 300, -1, QPixmap::BestOptim );
myMaskPixmap.load( QString(PKGDATAPATH) + QString("/images/splash/splash_mask.png"), 0, Qt::ThresholdDither | Qt::ThresholdAlphaDither | Qt::AvoidDither );
setBackgroundPixmap(splashImage);
setMask( myMaskPixmap.createHeuristicMask() );


setErasePixmap(splashImage);

QRect scr = QApplication::desktop()->screenGeometry();
move(scr.center() - rect().center());

Expand Down

0 comments on commit 17d0f01

Please sign in to comment.