Skip to content

Commit 17d0f01

Browse files
author
timlinux
committedMay 22, 2005
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
1 parent cf6451b commit 17d0f01

File tree

7 files changed

+32
-4
lines changed

7 files changed

+32
-4
lines changed
 

‎ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Version 0.6 'Simon' .... development version
44
QGIS Change Log
55

6+
2005-04-17 [timlinux] 0.6devel25
7+
** More updates to qgsspatialrefsys. Changed splash to be a masked widget &
8+
added the xcf masters for the splash. Splash still needs some minor
9+
updating relating to text placement.
610
2005-04-17 [timlinux] 0.6devel24
711
** Added logic for reverse mapping a wkt or proj4string to an srsid - not
812
very well tested at this stage but works for me with my test dataset

‎configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dnl ---------------------------------------------------------------------------
2525
MAJOR_VERSION=0
2626
MINOR_VERSION=6
2727
MICRO_VERSION=0
28-
EXTRA_VERSION=24
28+
EXTRA_VERSION=25
2929
if test $EXTRA_VERSION -eq 0; then
3030
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
3131
else

‎src/images/splash/splash.png

-184 KB
Loading

‎src/images/splash/splash_mask.png

-4.1 KB
Loading

‎src/qgsspatialrefsys.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,3 +1083,10 @@ bool QgsSpatialRefSys::equals(const char *theProj4CharArray)
10831083
}
10841084
return myMatchFlag;
10851085
}
1086+
1087+
OGRSpatialReference QgsSpatialRefSys::toOgrSrs()
1088+
{
1089+
OGRSpatialReference myOgrSpatialRef1;
1090+
OGRErr myInputResult1 = myOgrSpatialRef1.importFromProj4((char *)mProj4String.latin1());
1091+
return myOgrSpatialRef1;
1092+
}

‎src/qgsspatialrefsys.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,12 @@ class QgsSpatialRefSys
180180
* is inconclusive.
181181
*/
182182
bool equals(const char *theProj4CharArray);
183-
bool operator==(const char* abc) { return true;};
183+
/*! A helper to get an ogr representation of this srs
184+
* @return OGRSpatialReference
185+
*/
186+
OGRSpatialReference toOgrSrs();
187+
188+
184189
// Accessors -----------------------------------
185190

186191
/*! Get the SrsId - if possible

‎src/splashscreen.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,28 @@
2121
#include "splashscreen.h"
2222
#include "qfont.h"
2323
#include "qgis.h"
24+
#include "qbitmap.h"
2425
#if defined(WIN32) || defined(Q_OS_MACX)
2526
QString PKGDATAPATH = qApp->applicationDirPath() + "/share/qgis";
2627
#endif
2728
#define STATUS_TEXT_X 10
2829
#define STATUS_TEXT_Y 10
2930
SplashScreen::SplashScreen():QWidget(0, 0, WStyle_Customize | WStyle_Splash)
3031
{
31-
splashImage.load(QString(PKGDATAPATH) + QString("/images/splash/splash.png"));
32-
setErasePixmap(splashImage);
32+
//set up masking
33+
splashImage.load(QString(PKGDATAPATH) + QString("/images/splash/splash.png"), 0, Qt::ThresholdDither | Qt::AvoidDither );
3334
resize(splashImage.size());
35+
//
36+
// NOTES! the mask must be a 1 BIT IMAGE or it wont work!
37+
//
38+
QPixmap myMaskPixmap( 564, 300, -1, QPixmap::BestOptim );
39+
myMaskPixmap.load( QString(PKGDATAPATH) + QString("/images/splash/splash_mask.png"), 0, Qt::ThresholdDither | Qt::ThresholdAlphaDither | Qt::AvoidDither );
40+
setBackgroundPixmap(splashImage);
41+
setMask( myMaskPixmap.createHeuristicMask() );
42+
43+
44+
setErasePixmap(splashImage);
45+
3446
QRect scr = QApplication::desktop()->screenGeometry();
3547
move(scr.center() - rect().center());
3648

0 commit comments

Comments
 (0)
Please sign in to comment.