[QGIS Commit] r12294 - in trunk/qgis: resources/context_help src/core src/helpviewer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Nov 29 17:16:57 EST 2009


Author: timlinux
Date: 2009-11-29 17:16:56 -0500 (Sun, 29 Nov 2009)
New Revision: 12294

Modified:
   trunk/qgis/resources/context_help/QgsOpenVectorLayerDialog-en_US
   trunk/qgis/src/core/qgsapplication.cpp
   trunk/qgis/src/helpviewer/CMakeLists.txt
   trunk/qgis/src/helpviewer/qgshelpviewer.cpp
   trunk/qgis/src/helpviewer/qgshelpviewerbase.ui
Log:
Switch to using QWebView to allow rich html in help viewer

Modified: trunk/qgis/resources/context_help/QgsOpenVectorLayerDialog-en_US
===================================================================
--- trunk/qgis/resources/context_help/QgsOpenVectorLayerDialog-en_US	2009-11-29 21:59:36 UTC (rev 12293)
+++ trunk/qgis/resources/context_help/QgsOpenVectorLayerDialog-en_US	2009-11-29 22:16:56 UTC (rev 12294)
@@ -1 +1,6 @@
 <h3>Open Vector Layer Dialog</h3>
+
+<p class="overview">
+The open vector layer dialog is used to add vector data to the QGIS map view. Vector data are spatial data described using geometries of points, lines and polygons (enclosed areas).</p>
+
+<img src=":/themes/default/mActionDelete.png">

Modified: trunk/qgis/src/core/qgsapplication.cpp
===================================================================
--- trunk/qgis/src/core/qgsapplication.cpp	2009-11-29 21:59:36 UTC (rev 12293)
+++ trunk/qgis/src/core/qgsapplication.cpp	2009-11-29 22:16:56 UTC (rev 12294)
@@ -385,6 +385,7 @@
             "padding-bottom: 8px;"
             "border: 1px solid #6c6c6c;"
             "}"
+            ".overview{ font: 1.82em; font-weight: bold;}"
             "h1 {font-size : 22pt; }"
             "h2 {font-size : 18pt; }"
             "h3 {font-size : 14pt; }";

Modified: trunk/qgis/src/helpviewer/CMakeLists.txt
===================================================================
--- trunk/qgis/src/helpviewer/CMakeLists.txt	2009-11-29 21:59:36 UTC (rev 12293)
+++ trunk/qgis/src/helpviewer/CMakeLists.txt	2009-11-29 22:16:56 UTC (rev 12294)
@@ -59,6 +59,7 @@
   ${QT_QTNETWORK_LIBRARY} 
   ${QT_QTSVG_LIBRARY} 
   ${QT_QTXML_LIBRARY} 
+  ${QT_QTWEBKIT_LIBRARY} 
     )
 ENDIF (${QTVERSION} STRLESS "4.3.0")
 

Modified: trunk/qgis/src/helpviewer/qgshelpviewer.cpp
===================================================================
--- trunk/qgis/src/helpviewer/qgshelpviewer.cpp	2009-11-29 21:59:36 UTC (rev 12293)
+++ trunk/qgis/src/helpviewer/qgshelpviewer.cpp	2009-11-29 22:16:56 UTC (rev 12294)
@@ -151,7 +151,9 @@
     file.close();
 
     // Set the browser text to the help contents
-    txtBrowser->setHtml( helpContents );
+    QString myStyle = QgsApplication::reportStyleSheet();
+    helpContents = "<head><style>" + myStyle + "</style></head><body>" + helpContents + "</body>";
+    webView->setHtml( helpContents );
     setWindowTitle( tr( "Quantum GIS Help" ) );
 
   }
@@ -179,7 +181,7 @@
         {
           // there should only be one row returned
           // Set the browser text to the record from the database
-          txtBrowser->setText(( char* )sqlite3_column_text( ppStmt, 0 ) );
+          webView->setHtml(( char* )sqlite3_column_text( ppStmt, 0 ) );
           setWindowTitle( tr( "Quantum GIS Help - %1" ).arg(( char* )sqlite3_column_text( ppStmt, 1 ) ) );
         }
       }

Modified: trunk/qgis/src/helpviewer/qgshelpviewerbase.ui
===================================================================
--- trunk/qgis/src/helpviewer/qgshelpviewerbase.ui	2009-11-29 21:59:36 UTC (rev 12293)
+++ trunk/qgis/src/helpviewer/qgshelpviewerbase.ui	2009-11-29 22:16:56 UTC (rev 12294)
@@ -21,17 +21,13 @@
   <property name="sizeGripEnabled">
    <bool>true</bool>
   </property>
-  <layout class="QGridLayout">
-   <property name="margin">
-    <number>9</number>
-   </property>
-   <property name="spacing">
-    <number>6</number>
-   </property>
+  <layout class="QGridLayout" name="gridLayout">
    <item row="0" column="0">
-    <widget class="QTextBrowser" name="txtBrowser">
-     <property name="acceptDrops">
-      <bool>false</bool>
+    <widget class="QWebView" name="webView">
+     <property name="url">
+      <url>
+       <string>about:blank</string>
+      </url>
      </property>
     </widget>
    </item>
@@ -45,6 +41,13 @@
   </layout>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+  <customwidget>
+   <class>QWebView</class>
+   <extends>QWidget</extends>
+   <header>QtWebKit/QWebView</header>
+  </customwidget>
+ </customwidgets>
  <resources/>
  <connections>
   <connection>



More information about the QGIS-commit mailing list