File: qgsoptionsdialoghighlightwidget.sip.in

package info (click to toggle)
qgis 3.40.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,183,672 kB
  • sloc: cpp: 1,595,771; python: 372,544; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 161
file content (90 lines) | stat: -rw-r--r-- 2,782 bytes parent folder | download | duplicates (12)
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
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsoptionsdialoghighlightwidget.h                            *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/






class QgsOptionsDialogHighlightWidget
{
%Docstring(signature="appended")
Container for a widget to be used to search text in the option dialog If
the widget type is handled, it is valid. It can perform a text search in
the widget and highlight it in case of success. This uses stylesheets.
%End

%TypeHeaderCode
#include "qgsoptionsdialoghighlightwidget.h"
%End
  public:
    static QgsOptionsDialogHighlightWidget *createWidget( QWidget *widget ) /Factory/;
%Docstring
create a highlight widget implementation for the proper widget type. For
instance a :py:class:`QgsOptionsDialogHighlightButton` for button.

:return: a QgsOptionsDialogHighlightWidget or ``None`` if there is no
         implementation for the given widget.
%End

    virtual ~QgsOptionsDialogHighlightWidget();

    bool isValid();
%Docstring
Returns if it valid: if the widget type is handled and if the widget is
not still available
%End

    bool searchHighlight( const QString &text );
%Docstring
search for a text pattern and highlight the widget if the text is found

:return: ``True`` if the text pattern is found
%End

    QWidget *widget();
%Docstring
Returns the widget
%End

  protected:
    virtual bool searchText( const QString &text ) = 0;
%Docstring
Search for the ``text`` in the widget and return ``True`` if it was
found
%End

    virtual bool highlightText( const QString &text ) = 0;
%Docstring
Highlight the ``text`` in the widget.

:return: ``True`` if the text could be highlighted.
%End

    virtual void reset() = 0;
%Docstring
reset the style of the widgets to its original state
%End

    explicit QgsOptionsDialogHighlightWidget( QWidget *widget = 0 );
%Docstring
Constructor

:param widget: the widget used to search text into
%End


};

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