File: qgsstatusbar.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 (116 lines) | stat: -rw-r--r-- 3,736 bytes parent folder | download | duplicates (6)
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
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsstatusbar.h                                               *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsStatusBar : QWidget
{
%Docstring(signature="appended")
A proxy widget for QStatusBar.

Unlike QStatusBar, :py:class:`QgsStatusBar` allows finer control of
widget placement, including the option to locate permanent widgets on
the left side of the bar.

:py:class:`QgsStatusBar` is designed to be embedded into an existing
window's QStatusBar, as a permanent widget. This allows reuse of the
special QStatusBar handling for resize grips and other platform specific
status bar tweaks.

Instead of adding child widgets and showing messages directly in the
window's status bar, these widgets (and messages) should instead be
added into the embedded :py:class:`QgsStatusBar`.
%End

%TypeHeaderCode
#include "qgsstatusbar.h"
%End
  public:
    enum Anchor /BaseType=IntEnum/
    {
      AnchorLeft,
      AnchorRight,
    };

    QgsStatusBar( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsStatusBar.
%End

    void addPermanentWidget( QWidget *widget /Transfer/, int stretch = 0, Anchor anchor = AnchorRight );
%Docstring
Adds the given ``widget`` permanently to this status bar, reparenting
the widget if it isn't already a child of this object.

The ``stretch`` parameter is used to compute a suitable size for the
given widget as the status bar grows and shrinks. The default stretch
factor is 0, i.e giving the widget a minimum of space.

The ``anchor`` parameter controls which side of the status bar the
widget should be anchored to.
%End

    void removeWidget( QWidget *widget );
%Docstring
Removes a ``widget`` from the status bar. Ownership of the widget
remains unchanged, and the widget itself is not deleted.
%End

    QString currentMessage() const;
%Docstring
Returns the current message shown in the status bar.

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

  public slots:

    void showMessage( const QString &message, int timeout = 0 );
%Docstring
Displays the given ``message`` for the specified number of milli-seconds
(``timeout``). If ``timeout`` is 0 (default), the message remains
displayed until the :py:func:`~QgsStatusBar.clearMessage` slot is called
or until the :py:func:`~QgsStatusBar.showMessage` slot is called again
to change the message.

.. seealso:: :py:func:`clearMessage`

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

    void clearMessage();
%Docstring
Removes any temporary message being shown.

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

    void setParentStatusBar( QStatusBar *statusBar );
%Docstring
Sets the parent status bar. Messages that are shown on the parent status
bar will be intercepted and shown on this status bar too.

.. versionadded:: 3.8
%End


  protected:
    virtual void changeEvent( QEvent *event );


};

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