mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Use proper toolbar in documentation browser for consistency
And show frame for web view
This commit is contained in:
parent
454f5ecab4
commit
18764a3452
@ -16,6 +16,7 @@
|
|||||||
#include "qgsdocumentationpanelwidget.h"
|
#include "qgsdocumentationpanelwidget.h"
|
||||||
#include "moc_qgsdocumentationpanelwidget.cpp"
|
#include "moc_qgsdocumentationpanelwidget.cpp"
|
||||||
#include "qgisapp.h"
|
#include "qgisapp.h"
|
||||||
|
#include "qgsguiutils.h"
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#ifdef HAVE_WEBENGINE
|
#ifdef HAVE_WEBENGINE
|
||||||
@ -33,6 +34,9 @@ QgsDocumentationPanelWidget::QgsDocumentationPanelWidget( QWidget *parent )
|
|||||||
: QgsDevToolWidget( parent )
|
: QgsDevToolWidget( parent )
|
||||||
{
|
{
|
||||||
setupUi( this );
|
setupUi( this );
|
||||||
|
|
||||||
|
mToolbar->setIconSize( QgsGuiUtils::iconSize( true ) );
|
||||||
|
|
||||||
#ifdef HAVE_WEBENGINE
|
#ifdef HAVE_WEBENGINE
|
||||||
mWebView = new QWebEngineView( this );
|
mWebView = new QWebEngineView( this );
|
||||||
#else
|
#else
|
||||||
@ -41,10 +45,9 @@ QgsDocumentationPanelWidget::QgsDocumentationPanelWidget( QWidget *parent )
|
|||||||
|
|
||||||
mWebViewContainer->layout()->addWidget( mWebView );
|
mWebViewContainer->layout()->addWidget( mWebView );
|
||||||
|
|
||||||
connect( mPyQgisHomeButton, &QToolButton::clicked, this, [] {QgisApp::instance()->showApiDocumentation( Qgis::DocumentationApi::PyQgis, Qgis::DocumentationBrowser::DeveloperToolsPanel );} );
|
connect( mActionPyQgis, &QAction::triggered, this, [] {QgisApp::instance()->showApiDocumentation( Qgis::DocumentationApi::PyQgis, Qgis::DocumentationBrowser::DeveloperToolsPanel );} );
|
||||||
connect( mQtHomeButton, &QToolButton::clicked, this, [] {QgisApp::instance()->showApiDocumentation( Qgis::DocumentationApi::Qt, Qgis::DocumentationBrowser::DeveloperToolsPanel );} );
|
connect( mActionQt, &QAction::triggered, this, [] {QgisApp::instance()->showApiDocumentation( Qgis::DocumentationApi::Qt, Qgis::DocumentationBrowser::DeveloperToolsPanel );} );
|
||||||
connect( mOpenUrlButton, &QToolButton::clicked, this, [this] {QgisApp::instance()->openURL( mWebView->url().toString(), false );} );
|
connect( mActionOpenInBrowser, &QAction::triggered, this, [this] {QgisApp::instance()->openURL( mWebView->url().toString(), false );} );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsDocumentationPanelWidget::showUrl( const QUrl &url )
|
void QgsDocumentationPanelWidget::showUrl( const QUrl &url )
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
<normaloff>:/images/themes/default/mActionHelpContents.svg</normaloff>:/images/themes/default/mActionHelpContents.svg</iconset>
|
<normaloff>:/images/themes/default/mActionHelpContents.svg</normaloff>:/images/themes/default/mActionHelpContents.svg</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -31,90 +34,33 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<widget class="QToolBar" name="mToolbar">
|
||||||
<item>
|
<property name="iconSize">
|
||||||
<widget class="QToolButton" name="mPyQgisHomeButton">
|
<size>
|
||||||
<property name="toolTip">
|
<width>24</width>
|
||||||
<string>PyQGIS API Documentation</string>
|
<height>24</height>
|
||||||
</property>
|
</size>
|
||||||
<property name="icon">
|
</property>
|
||||||
<iconset resource="../../images/images.qrc">
|
<property name="floatable">
|
||||||
<normaloff>:/images/icons/qgis_icon.svg</normaloff>:/images/icons/qgis_icon.svg</iconset>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<addaction name="mActionPyQgis"/>
|
||||||
<size>
|
<addaction name="mActionQt"/>
|
||||||
<width>24</width>
|
<addaction name="separator"/>
|
||||||
<height>24</height>
|
<addaction name="mActionOpenInBrowser"/>
|
||||||
</size>
|
</widget>
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="mQtHomeButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Qt API Documentation</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../images/images.qrc">
|
|
||||||
<normaloff>:/images/themes/default/mIconQt.svg</normaloff>:/images/themes/default/mIconQt.svg</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="mOpenUrlButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Open in Web Browser</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../images/images.qrc">
|
|
||||||
<normaloff>:/images/themes/default/mIconWms.svg</normaloff>:/images/themes/default/mIconWms.svg</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="mWebViewContainer" native="true">
|
<widget class="QFrame" name="mWebViewContainer">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
@ -132,6 +78,48 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
<action name="mActionPyQgis">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../images/images.qrc">
|
||||||
|
<normaloff>:/images/icons/qgis_icon.svg</normaloff>:/images/icons/qgis_icon.svg</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>PyQGIS API Documentation</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>PyQGIS API Documentation</string>
|
||||||
|
</property>
|
||||||
|
<property name="menuRole">
|
||||||
|
<enum>QAction::NoRole</enum>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="mActionQt">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../images/images.qrc">
|
||||||
|
<normaloff>:/images/themes/default/mIconQt.svg</normaloff>:/images/themes/default/mIconQt.svg</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Qt API Documentation</string>
|
||||||
|
</property>
|
||||||
|
<property name="menuRole">
|
||||||
|
<enum>QAction::NoRole</enum>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="mActionOpenInBrowser">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../images/images.qrc">
|
||||||
|
<normaloff>:/images/themes/default/mIconWms.svg</normaloff>:/images/themes/default/mIconWms.svg</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open in Web Browser</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Open in Web Browser</string>
|
||||||
|
</property>
|
||||||
|
<property name="menuRole">
|
||||||
|
<enum>QAction::NoRole</enum>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user