[QGIS Commit] r11874 - trunk/code_examples/3_basic_labelling

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Oct 31 18:04:09 EDT 2009


Author: timlinux
Date: 2009-10-31 18:04:09 -0400 (Sat, 31 Oct 2009)
New Revision: 11874

Modified:
   trunk/code_examples/3_basic_labelling/CMakeLists.txt
   trunk/code_examples/3_basic_labelling/mainwindow.cpp
   trunk/code_examples/3_basic_labelling/tutorial3.t2t
Log:
Clean cmake code so that it compiles. Other small cleanups.

Modified: trunk/code_examples/3_basic_labelling/CMakeLists.txt
===================================================================
--- trunk/code_examples/3_basic_labelling/CMakeLists.txt	2009-10-31 22:03:48 UTC (rev 11873)
+++ trunk/code_examples/3_basic_labelling/CMakeLists.txt	2009-10-31 22:04:09 UTC (rev 11874)
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 2.6)
 PROJECT(timtut3)
 SET(CMAKE_COLOR_MAKEFILE ON)
 # set path to additional CMake modules
@@ -76,7 +77,7 @@
 
 QT4_ADD_RESOURCES(timtut3_RCC_SRCS ${timtut3_RCCS})
 
-ADD_EXECUTABLE (timtut3 MODULE ${timtut3_SRCS} ${timtut3_MOC_SRCS} ${timtut3_RCC_SRCS} ${timtut3_UIS_H})
+ADD_EXECUTABLE (timtut3 ${timtut3_SRCS} ${timtut3_MOC_SRCS} ${timtut3_RCC_SRCS} ${timtut3_UIS_H})
 
 INCLUDE_DIRECTORIES(
      ${GDAL_INCLUDE_DIR}

Modified: trunk/code_examples/3_basic_labelling/mainwindow.cpp
===================================================================
--- trunk/code_examples/3_basic_labelling/mainwindow.cpp	2009-10-31 22:03:48 UTC (rev 11873)
+++ trunk/code_examples/3_basic_labelling/mainwindow.cpp	2009-10-31 22:04:09 UTC (rev 11874)
@@ -156,6 +156,7 @@
   //and the label attributes associated with the label
   QgsLabelAttributes * mypLabelAttributes;
   mypLabelAttributes = mypLabel->layerAttributes();
+  //note in QGIS 1.4 and up you should use mypLabel->labelAttributes rather
 
   //get the field list associated with the layer
   //we'll print the names out to console for diagnostic purposes

Modified: trunk/code_examples/3_basic_labelling/tutorial3.t2t
===================================================================
--- trunk/code_examples/3_basic_labelling/tutorial3.t2t	2009-10-31 22:03:48 UTC (rev 11873)
+++ trunk/code_examples/3_basic_labelling/tutorial3.t2t	2009-10-31 22:04:09 UTC (rev 11874)
@@ -42,7 +42,7 @@
 
 Before I carry on too far, note that QGIS's automatic labelling algorithm is
 very primative. Martin Dobias is planning to implement a much more useful label
-placement routine - but its not going to be available in QGIS 0.8. For the best
+placement routine - but its not available at the time of writing this. For the best
 label placement results you should defined fields in your attribute table for
 position, rotation etc of the label. Since this is only intended to be a 'get
 you started' introduction, I won't be doing all that here...
@@ -198,6 +198,7 @@
 svn co https://svn.osgeo.org/qgis/trunk/code_examples/3_basic_labelling
 cd 3_basic_labelling
 mkdir build
+cd build
 #optionally specify where your QGIS is installed (should work on all platforms)
 #if your QGIS is installed to /usr or /usr/local you can leave this next step out
 export LIB_DIR=/home/timlinux/apps



More information about the QGIS-commit mailing list