Falkon
Develop
Cross-platform Qt-based web browser
statusbar.h
Go to the documentation of this file.
1
/* ============================================================
2
* Falkon - Qt web browser
3
* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* ============================================================ */
18
#pragma once
19
20
#include <QObject>
21
#include <QStatusBar>
22
23
#include "
qzcommon.h
"
24
#include "
squeezelabelv1.h
"
25
26
class
QTimer;
27
28
class
BrowserWindow
;
29
class
AbstractButtonInterface
;
30
31
class
FALKON_EXPORT
TipLabel
:
public
SqueezeLabelV1
32
{
33
Q_OBJECT
34
35
public
:
36
explicit
TipLabel
(QWidget* parent);
37
38
void
show(QWidget* widget);
39
void
hideDelayed();
40
41
bool
eventFilter(QObject* o, QEvent* e)
override
;
42
43
private
:
44
void
paintEvent
(QPaintEvent* ev)
override
;
45
46
QTimer* m_timer;
47
};
48
49
class
FALKON_EXPORT
StatusBar
:
public
QStatusBar
50
{
51
Q_OBJECT
52
53
public
:
54
explicit
StatusBar
(
BrowserWindow
*window);
55
56
void
showMessage(
const
QString &message,
int
timeout = 0);
57
void
clearMessage();
58
59
void
addButton(
AbstractButtonInterface
*button);
60
void
removeButton(
AbstractButtonInterface
*button);
61
62
protected
:
63
void
mousePressEvent(QMouseEvent *event)
override
;
64
65
private
:
66
BrowserWindow
*m_window;
67
TipLabel
*m_statusBarText;
68
69
struct
WidgetData {
70
QString id;
71
QWidget *widget =
nullptr
;
72
AbstractButtonInterface
*button =
nullptr
;
73
};
74
75
QHash<QString, WidgetData> m_widgets;
76
};
AbstractButtonInterface
Definition:
abstractbuttoninterface.h:30
BrowserWindow
Definition:
browserwindow.h:58
SqueezeLabelV1
Definition:
squeezelabelv1.h:41
SqueezeLabelV1::paintEvent
void paintEvent(QPaintEvent *event) override
Definition:
squeezelabelv1.cpp:36
StatusBar
Definition:
statusbar.h:50
TipLabel
Definition:
statusbar.h:32
qzcommon.h
FALKON_EXPORT
#define FALKON_EXPORT
Definition:
qzcommon.h:28
squeezelabelv1.h
src
lib
other
statusbar.h
Generated by
1.9.3