File: qgsoptionsdialogbase.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 (204 lines) | stat: -rw-r--r-- 6,429 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsoptionsdialogbase.h                                       *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/










class QgsOptionsDialogBase : QDialog
{
%Docstring(signature="appended")
A base dialog for options and properties dialogs that offers vertical
tabs. It handles saving/restoring of geometry, splitter and current tab
states, switching vertical tabs between icon/text to icon-only modes
(splitter collapsed to left), and connecting QDialogButtonBox's
accepted/rejected signals to dialog's accept/reject slots

To use:

- Start with copy of qgsoptionsdialog_template.ui and build
  options/properties dialog.
- In source file for dialog, inherit this class instead of QDialog, then
  in constructor: ... setupUi( this ); // set up .ui file objects
  initOptionsBase( ``False`` ); // set up this class to use .ui objects,
  optionally restoring base ui ... :py:func:`~restoreOptionsBaseUi`; //
  restore the base ui with initOptionsBase or use this later on
%End

%TypeHeaderCode
#include "qgsoptionsdialogbase.h"
%End
  public:
    QgsOptionsDialogBase( const QString &settingsKey, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = Qt::WindowFlags(), QgsSettings *settings = 0 );
%Docstring
Constructor

:param settingsKey: :py:class:`QgsSettings` subgroup key for
                    saving/restore ui states, e.g. "ProjectProperties".
:param parent: parent object (owner)
:param fl: widget flags
:param settings: custom :py:class:`QgsSettings` pointer
%End
    ~QgsOptionsDialogBase();

    void initOptionsBase( bool restoreUi = true, const QString &title = QString() );
%Docstring
Set up the base ui connections for vertical tabs.

:param restoreUi: Whether to restore the base ui at this time.
:param title: the window title
%End

    void setSettings( QgsSettings *settings );

    void restoreOptionsBaseUi( const QString &title = QString() );
%Docstring
Restore the base ui. Sometimes useful to do at end of subclass's
constructor.

:param title: the window title (it does not need to be defined if
              previously given to
              :py:func:`~QgsOptionsDialogBase.initOptionsBase`;
%End

    void restoreLastPage();
%Docstring
Refocus the active tab from the last time the dialog was shown.

.. versionadded:: 3.14
%End

    void resizeAlltabs( int index );
%Docstring
Resizes all tabs when the dialog is resized

:param index: current tab index

.. versionadded:: 3.10
%End

    bool iconOnly();
%Docstring
Determine if the options list is in icon only mode
%End

    void setCurrentPage( const QString &page );
%Docstring
Sets the dialog ``page`` (by object name) to show.

.. versionadded:: 3.14
%End

    void addPage( const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget /Transfer/, const QStringList &path = QStringList(), const QString &key = QString() );
%Docstring
Adds a new page to the dialog pages.

The ``title``, ``tooltip`` and ``icon`` arguments dictate the page list
item title, tooltip and icon respectively.

The page content is specified via the ``widget`` argument. Ownership of
``widget`` is transferred to the dialog.

Since QGIS 3.22, the optional ``path`` argument can be used to set the
path of the item's entry in the tree view (for dialogs which show a tree
view of options pages only).

Since QGIS 3.32, the optional ``key`` argument can be used to set an
untranslated key that ``path`` can refer to in following calls. Default
to ``title``.

.. seealso:: :py:func:`insertPage`

.. versionadded:: 3.14
%End

    void insertPage( const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget /Transfer/, const QString &before, const QStringList &path = QStringList(), const QString &key = QString() );
%Docstring
Inserts a new page into the dialog pages.

The ``title``, ``tooltip`` and ``icon`` arguments dictate the page list
item title, tooltip and icon respectively.

The page content is specified via the ``widget`` argument. Ownership of
``widget`` is transferred to the dialog.

The ``before`` argument specifies the object name of an existing page.
The new page will be inserted directly before the matching page.

Since QGIS 3.22, the optional ``path`` argument can be used to set the
path of the item's entry in the tree view (for dialogs which show a tree
view of options pages only).

Since QGIS 3.32, the optional ``key`` argument can be used to set an
untranslated key that ``path`` can refer to in following calls. Default
to ``title``.

.. seealso:: :py:func:`addPage`

.. versionadded:: 3.14
%End

  public slots:

    void searchText( const QString &text );
%Docstring
searchText searches for a text in all the pages of the stacked widget
and highlight the results

:param text: the text to search
%End

  protected slots:
    virtual void updateOptionsListVerticalTabs();
%Docstring
Update tabs on the splitter move
%End
    virtual void optionsStackedWidget_CurrentChanged( int index );
%Docstring
Select relevant tab on current page change
%End
    virtual void optionsStackedWidget_WidgetRemoved( int index );
%Docstring
Remove tab and unregister widgets on page remove
%End

    void warnAboutMissingObjects();

  protected:
    virtual void showEvent( QShowEvent *e );

    virtual void paintEvent( QPaintEvent *e );


    virtual void updateWindowTitle();

    void registerTextSearchWidgets();
%Docstring
register widgets in the dialog to search for text in it it is
automatically called if a line edit has "mSearchLineEdit" as object
name.
%End





};

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