Skip to content
Permalink
Browse files

Switch to using QWebView to allow rich html in help viewer

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12294 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Nov 29, 2009
1 parent e140945 commit ec9f94ecc2081378ab8aba8b1279a2978b87e059
@@ -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">
@@ -385,6 +385,7 @@ QString QgsApplication::reportStyleSheet()
"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; }";
@@ -59,6 +59,7 @@ ELSE (${QTVERSION} STRLESS "4.3.0")
${QT_QTNETWORK_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTXML_LIBRARY}
${QT_QTWEBKIT_LIBRARY}
)
ENDIF (${QTVERSION} STRLESS "4.3.0")

@@ -151,7 +151,9 @@ void QgsHelpViewer::loadContext( const QString &contextId )
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 @@ void QgsHelpViewer::loadContextFromSqlite( const QString &contextId )
{
// 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 ) ) );
}
}
@@ -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>

0 comments on commit ec9f94e

Please sign in to comment.