File: qgsrichtexteditor.sip.in

package info (click to toggle)
qgis 3.22.16%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,186,020 kB
  • sloc: cpp: 1,275,562; python: 194,091; xml: 15,597; perl: 3,471; sh: 3,368; sql: 2,485; ansic: 2,219; yacc: 1,056; lex: 574; javascript: 504; lisp: 411; makefile: 227
file content (96 lines) | stat: -rw-r--r-- 2,673 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsrichtexteditor.h                                          *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/





class QgsRichTextEditor : QWidget, protected Ui::QgsRichTextEditorBase
{
%Docstring(signature="appended")
A widget for editing rich text documents, with support for user controlled formatting of text
and insertion of hyperlinks and images.

:py:class:`QgsRichTextEditor` provides a reusable widget for allowing users to edit rich text documents,
and retrieving and setting the documents via HTML formatted strings.

.. versionadded:: 3.20
%End

%TypeHeaderCode
#include "qgsrichtexteditor.h"
%End
  public:

    QgsRichTextEditor( QWidget *parent = 0 );
%Docstring
Constructor for QgsRichTextEditor, with the specified ``parent`` widget.
%End

    QString toPlainText() const;
%Docstring
Returns the widget's content as a plain text string.

.. seealso:: :py:func:`toHtml`
%End

    QString toHtml() const;
%Docstring
Returns the widget's content as a HTML string.

.. seealso:: :py:func:`toPlainText`
%End

    QTextDocument *document();
%Docstring
Returns a reference to the QTextDocument shown in the widget.
%End

    QTextCursor textCursor() const;
%Docstring
Returns a reference to the text cursor.

.. seealso:: :py:func:`setTextCursor`
%End

    void setTextCursor( const QTextCursor &cursor );
%Docstring
Sets the current text ``cursor``.

.. seealso:: :py:func:`textCursor`
%End

  public slots:

    void setText( const QString &text );
%Docstring
Sets the ``text`` to show in the widget.

The ``text`` can either be a plain text string or a HTML document.
%End

    void clearSource();
%Docstring
Clears the current text from the widget.
%End

  protected:
    virtual void focusInEvent( QFocusEvent *event );


};



/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsrichtexteditor.h                                          *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/