diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-04-06 19:28:01 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-06-06 13:41:50 +0200 |
commit | 20706f754c96bf3bb27b3ef392ecab67b7908d53 (patch) | |
tree | 50022002f7cee63d1cedda0b48662375aa74760a /src | |
parent | 979244a91274e5e888da867d4f15fd43ef733a3c (diff) |
doc: Add docs for PdfStyle
Pick-to: 6.3
Task-number: QTBUG-81560
Change-Id: Ib0485618a1d5cdafcad928f0b05996f242ef9bd4
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/pdfquick/PdfStyle.qml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/pdfquick/PdfStyle.qml b/src/pdfquick/PdfStyle.qml index 8b9d4be22..5a63113aa 100644 --- a/src/pdfquick/PdfStyle.qml +++ b/src/pdfquick/PdfStyle.qml @@ -40,13 +40,70 @@ import QtQuick import QtQuick.Controls import QtQuick.Shapes +/*! + \qmltype PdfStyle + \inqmlmodule QtQuick.Pdf + \brief A styling interface for the PDF viewer components. + + PdfStyle provides properties to modify the appearance of PdfMultiPageView, + PdfScrollablePageView, and PdfPageView. + + Default styles are provided to match the + \l {Styling Qt Quick Controls}{styles in Qt Quick Controls}. + \l {Using File Selectors with Qt Quick Controls}{File selectors} + are used to load the PDF style corresponding to the Controls style in use. + Custom styles are possible, using different \l {QFileSelector}{file selectors}. +*/ QtObject { + /*! \internal + \qmlproperty SystemPalette PdfStyle::palette + */ property SystemPalette palette: SystemPalette { } + + /*! \internal + \qmlmethod color PdfStyle::withAlpha() + */ function withAlpha(color, alpha) { return Qt.hsla(color.hslHue, color.hslSaturation, color.hslLightness, alpha) } + + /*! + \qmlproperty color PdfStyle::selectionColor + + The color of translucent rectangles that are overlaid on + \l {PdfMultiPageView::selectedText}{selected text}. + + \sa PdfSelection + */ property color selectionColor: withAlpha(palette.highlight, 0.5) + + /*! + \qmlproperty color PdfStyle::pageSearchResultsColor + + The color of translucent rectangles that are overlaid on text that + matches the \l {PdfMultiPageView::searchString}{search string}. + + \sa PdfSearchModel + */ property color pageSearchResultsColor: "#80B0C4DE" + + /*! + \qmlproperty color PdfStyle::currentSearchResultStrokeColor + + The color of the box outline around the + \l {PdfSearchModel::currentResult}{current search result}. + + \sa PdfMultiPageView::searchBack(), PdfMultiPageView::searchForward(), PdfSearchModel::currentResult + */ property color currentSearchResultStrokeColor: "cyan" + + /*! + \qmlproperty real PdfStyle::currentSearchResultStrokeWidth + + The line width of the box outline around the + \l {PdfSearchModel::currentResult}{current search result}. + + \sa PdfMultiPageView::searchBack(), PdfMultiPageView::searchForward(), PdfSearchModel::currentResult + */ property real currentSearchResultStrokeWidth: 2 } |