QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsstatusbar.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsstatusbar.h
3
--------------
4
begin : May 2017
5
copyright : (C) 2017 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSSTATUSBAR_H
19
#define QGSSTATUSBAR_H
20
21
#include "qgis_gui.h"
22
#include "
qgis_sip.h
"
23
24
#include <QWidget>
25
26
class
QHBoxLayout;
27
class
QLineEdit;
28
class
QStatusBar;
29
46
class
GUI_EXPORT
QgsStatusBar
:
public
QWidget
47
{
48
Q_OBJECT
49
50
public
:
52
enum
Anchor
53
{
54
AnchorLeft
= 0,
55
AnchorRight
,
56
};
57
61
QgsStatusBar
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
62
72
void
addPermanentWidget( QWidget *widget
SIP_TRANSFER
,
int
stretch = 0, Anchor anchor = AnchorRight );
73
78
void
removeWidget( QWidget *widget );
79
84
QString currentMessage()
const
;
85
86
public
slots:
87
95
void
showMessage(
const
QString &message,
int
timeout = 0 );
96
101
void
clearMessage();
102
110
void
setParentStatusBar( QStatusBar *statusBar );
111
112
protected
:
113
void
changeEvent( QEvent *event )
override
;
114
115
private
slots:
116
void
applyWidgetStyle();
117
118
private
:
119
QHBoxLayout *mLayout =
nullptr
;
120
QLineEdit *mLineEdit =
nullptr
;
121
QTimer *mTempMessageTimer =
nullptr
;
122
QStatusBar *mParentStatusBar =
nullptr
;
123
QMetaObject::Connection mShowMessageConnection;
124
};
125
126
#endif
// QGSSTATUSBAR_H
QgsStatusBar
A proxy widget for QStatusBar.
Definition
qgsstatusbar.h:47
QgsStatusBar::Anchor
Anchor
Placement anchor for widgets.
Definition
qgsstatusbar.h:53
QgsStatusBar::AnchorLeft
@ AnchorLeft
Anchor widget to left of status bar.
Definition
qgsstatusbar.h:54
QgsStatusBar::AnchorRight
@ AnchorRight
Anchor widget to right of status bar.
Definition
qgsstatusbar.h:55
QgsStatusBar::QgsStatusBar
QgsStatusBar(QWidget *parent=nullptr)
Constructor for QgsStatusBar.
Definition
qgsstatusbar.cpp:34
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:35
Generated on
for QGIS API Documentation by
1.17.0