[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/base/marble
From:       Nikolas Zimmermann <wildfox () kde ! org>
Date:       2007-03-24 21:54:47
Message-ID: 1174773287.431945.24903.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 646185 by wildfox:

Allow easy compilation on mac osx. Creating packages using PackageManager works fine.
Changes: don't include moc files, offer simple qmake build. Works out of the box if Qt/Mac is installed.

Approved by tackat.


 AM            BuildOnOSX.sh  
 M  +2 -0      src/httpfetchfile.cpp  
 M  +2 -0      src/katlascontrol.cpp  
 M  +2 -0      src/katlascrosshair.cpp  
 M  +4 -2      src/katlasdirs.h  
 M  +2 -0      src/katlasflag.cpp  
 M  +6 -0      src/katlasmapscale.cpp  
 M  +2 -0      src/katlasthemeselectview.cpp  
 M  +2 -0      src/katlastilecreatordialog.cpp  
 M  +2 -0      src/katlasview.cpp  
 M  +4 -0      src/katlasviewinputhandler.cpp  
 M  +3 -0      src/katlasviewpopupmenu.cpp  
 M  +7 -0      src/katlaswindrose.cpp  
 M  +2 -0      src/maptheme.cpp  
 A             src/marbleosx.pro  
 M  +7 -1      src/measuretool.cpp  
 M  +2 -0      src/placemarkinfodialog.cpp  
 M  +2 -0      src/placemarkmodel.cpp  
 M  +13 -6     src/placemarkpainter.cpp  
 M  +2 -0      src/searchcombobox.cpp  
 M  +2 -0      src/searchlistview.cpp  
 M  +2 -0      src/tilescissor.cpp  
 M  +3 -0      src/tinywebbrowser.cpp  


** trunk/playground/base/marble/BuildOnOSX.sh #property svn:executable
   + *
--- trunk/playground/base/marble/src/httpfetchfile.cpp #646184:646185
@@ -103,4 +103,6 @@
 	}
 }
 
+#ifndef Q_OS_MACX
 #include "httpfetchfile.moc"
+#endif
--- trunk/playground/base/marble/src/katlascontrol.cpp #646184:646185
@@ -75,5 +75,7 @@
 	katlasview->moveDown();
 }
 
+#ifndef Q_OS_MACX
 #include "katlastoolbox.moc"
 #include "katlascontrol.moc"
+#endif
--- trunk/playground/base/marble/src/katlascrosshair.cpp #646184:646185
@@ -18,4 +18,6 @@
 	}	
 }
 
+#ifndef Q_OS_MACX
 #include "katlascrosshair.moc"
+#endif
--- trunk/playground/base/marble/src/katlasdirs.h #646184:646185
@@ -25,10 +25,12 @@
     static QString systemDir() 
 	{ 
           return QDir( qApp->applicationDirPath() 
-#if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || defined(Q_OS_UNIX)
+#if defined(Q_OS_MACX)
+	+ QLatin1String("/Resources/data")
+#elif defined(Q_OS_UNIX)
 	+ QLatin1String("/../share/apps/marble/data")
 #elif defined(Q_OS_WIN)
-    + QLatin1String("/data")
+	+ QLatin1String("/data")
 #endif
 	  ).canonicalPath();
         }
--- trunk/playground/base/marble/src/katlasflag.cpp #646184:646185
@@ -38,4 +38,6 @@
 	emit flagDone();
 }
 
+#ifndef Q_OS_MACX
 #include "katlasflag.moc"
+#endif
--- trunk/playground/base/marble/src/katlasmapscale.cpp #646184:646185
@@ -10,7 +10,11 @@
 	m_scalebarwidth=250;
 	m_scalebarheight=5;
 
+#ifdef Q_OS_MACX
+	m_font = QFont("Sans Serif",10);
+#else
 	m_font = QFont("Sans Serif",8);
+#endif
 	m_fontheight = QFontMetrics(m_font).ascent();
 	m_leftmargin = QFontMetrics(m_font).boundingRect("0").width()/2;
 	m_rightmargin = QFontMetrics(m_font).boundingRect("0000").width()/2;
@@ -113,4 +117,6 @@
 	m_valueinterval = (int)(bestmagvalue*magnitude/m_bestdivisor);
 }
 
+#ifndef Q_OS_MACX
 #include "katlasmapscale.moc"
+#endif
--- trunk/playground/base/marble/src/katlasthemeselectview.cpp #646184:646185
@@ -31,4 +31,6 @@
     setGridSize(size);
 }
 
+#ifndef Q_OS_MACX
 #include "katlasthemeselectview.moc"
+#endif
--- trunk/playground/base/marble/src/katlastilecreatordialog.cpp #646184:646185
@@ -19,4 +19,6 @@
 	descriptionLabel->setText( summary );
 }
 
+#ifndef Q_OS_MACX
 #include "katlastilecreatordialog.moc"
+#endif
--- trunk/playground/base/marble/src/katlasview.cpp #646184:646185
@@ -274,4 +274,6 @@
 	return zoom;
 }
 
+#ifndef Q_OS_MACX
 #include "katlasview.moc"
+#endif
--- trunk/playground/base/marble/src/katlasviewinputhandler.cpp #646184:646185
@@ -1,6 +1,10 @@
 #include <QtCore/QDebug>
 #include "katlasviewinputhandler.h"
+
+#ifndef Q_OS_MACX
 #include "katlasviewinputhandler.moc"
+#endif
+
 #include "katlasview.h"
 #include "quaternion.h"
 #include "katlasdirs.h"
--- trunk/playground/base/marble/src/katlasviewpopupmenu.cpp #646184:646185
@@ -1,7 +1,10 @@
 #include <QtCore/QDebug>
 #include <QtGui/QMenu>
 
+#ifndef Q_OS_MACX
 #include "katlasviewpopupmenu.moc"
+#endif
+
 #include "katlasviewpopupmenu.h"
 #include "katlasview.h"
 #include "katlasglobe.h"
--- trunk/playground/base/marble/src/katlaswindrose.cpp #646184:646185
@@ -11,7 +11,12 @@
 KAtlasWindRose::KAtlasWindRose(QObject* parent) : QObject(parent) {
 	m_width = 0;
 
+#ifdef Q_OS_MACX
+	m_font = QFont("Sans Serif",10 );
+#else
 	m_font = QFont("Sans Serif",8 );
+#endif
+
 	m_font.setStyleStrategy(QFont::ForceOutline);
 
 	m_fontheight = QFontMetrics(m_font).ascent();
@@ -75,4 +80,6 @@
 
 }
 
+#ifndef Q_OS_MACX
 #include "katlaswindrose.moc"
+#endif
--- trunk/playground/base/marble/src/maptheme.cpp #646184:646185
@@ -289,4 +289,6 @@
 	return mapthememodel;
 }
 
+#ifndef Q_OS_MACX
 #include "maptheme.moc"
+#endif
--- trunk/playground/base/marble/src/measuretool.cpp #646184:646185
@@ -15,8 +15,12 @@
 
 	m_totalDistance = 0;
 
+#ifdef Q_OS_MACX
+	m_font_regular = QFont("Sans Serif",10, 50, false );
+#else
 	m_font_regular = QFont("Sans Serif",8, 50, false );
-	
+#endif
+
 	m_fontheight = QFontMetrics(m_font_regular).height();
 	m_fontascent = QFontMetrics(m_font_regular).ascent();
 
@@ -192,4 +196,6 @@
 	return true;
 }
 
+#ifndef Q_OS_MACX
 #include "measuretool.moc"
+#endif
--- trunk/playground/base/marble/src/placemarkinfodialog.cpp #646184:646185
@@ -117,4 +117,6 @@
 	flag_val_lbl->setPixmap( m_flagcreator->flag() );
 }
 
+#ifndef Q_OS_MACX
 #include "placemarkinfodialog.moc"
+#endif
--- trunk/playground/base/marble/src/placemarkmodel.cpp #646184:646185
@@ -72,4 +72,6 @@
 	qStableSort( m_placemarkindex.begin(), m_placemarkindex.end(), nameSort );
 }
 
+#ifndef Q_OS_MACX
 #include "placemarkmodel.moc"
+#endif
--- trunk/playground/base/marble/src/placemarkpainter.cpp #646184:646185
@@ -10,19 +10,25 @@
 #include "placemark.h"
 #include "katlasdirs.h"
 
-#include <QtCore/QDebug>
-
 static const int maxlabels = 100;
 
 PlaceMarkPainter::PlaceMarkPainter(QObject* parent) : QObject(parent) {
+#ifdef Q_OS_MACX
+	m_font_mountain = QFont("Sans Serif",9, 50, false );
 
+	m_font_regular = QFont("Sans Serif",10, 50, false );
+	m_font_regular_italics = QFont("Sans Serif",10, 50, true );
+	m_font_regular_underline = QFont("Sans Serif",10, 50, false );
+#else
 	m_font_mountain = QFont("Sans Serif",7, 50, false );
 
 	m_font_regular = QFont("Sans Serif",8, 50, false );
 	m_font_regular_italics = QFont("Sans Serif",8, 50, true );
 	m_font_regular_underline = QFont("Sans Serif",8, 50, false );
+#endif
+
 	m_font_regular_underline.setUnderline( true );
-	
+
 	m_fontheight = QFontMetrics(m_font_regular).height();
 	m_fontascent = QFontMetrics(m_font_regular).ascent();
 
@@ -202,7 +208,7 @@
 
 							if ( mark->selected() == 0 ) {
 								textpainter.setFont(font);
-								textpainter.setPen(m_labelcolor);	
+								textpainter.setPen(m_labelcolor);
 								textpainter.drawText( 0, m_fontascent, mark->name() );
 							}
 							else {
@@ -219,7 +225,7 @@
 
 							if ( mark->selected() == 0 ) {
 								textpainter.setFont(font);
-								textpainter.setPen(m_labelcolor);	
+								textpainter.setPen(m_labelcolor);
 								textpainter.drawText( 0, m_fontascent, mark->name() );
 							}
 							else {
@@ -284,7 +290,6 @@
 	textpainter.setPen( Qt::NoPen );
 	textpainter.drawPath( outlinepath );
 	textpainter.setRenderHint(QPainter::Antialiasing, false );
-
 }
 
 bool PlaceMarkPainter::testbug(){
@@ -333,4 +338,6 @@
 	return ret;
 }
 
+#ifndef Q_OS_MACX
 #include "placemarkpainter.moc"
+#endif
--- trunk/playground/base/marble/src/searchcombobox.cpp #646184:646185
@@ -38,4 +38,6 @@
 
 }
 
+#ifndef Q_OS_MACX
 #include "searchcombobox.moc"
+#endif
--- trunk/playground/base/marble/src/searchlistview.cpp #646184:646185
@@ -33,4 +33,6 @@
 	else qDebug("noitem!");
 }
 
+#ifndef Q_OS_MACX
 #include "searchlistview.moc"
+#endif
--- trunk/playground/base/marble/src/tilescissor.cpp #646184:646185
@@ -252,4 +252,6 @@
 
 }
 
+#ifndef Q_OS_MACX
 #include "tilescissor.moc"
+#endif
--- trunk/playground/base/marble/src/tinywebbrowser.cpp #646184:646185
@@ -63,4 +63,7 @@
 //		m_urlList.removeAll();
 	}
 }
+
+#ifndef Q_OS_MACX
 #include "tinywebbrowser.moc"
+#endif
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic