Falkon
Develop
Cross-platform Qt-based web browser
siteicon.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
#ifndef SITEICON_H
19
#define SITEICON_H
20
21
#include "
qzcommon.h
"
22
#include "
toolbutton.h
"
23
24
class
QTimer;
25
26
class
LocationBar
;
27
class
WebView
;
28
class
BrowserWindow
;
29
30
class
FALKON_EXPORT
SiteIcon
:
public
ToolButton
31
{
32
Q_OBJECT
33
34
public
:
35
explicit
SiteIcon
(
LocationBar
*parent);
36
37
void
setBrowserWindow(
BrowserWindow
*window);
38
void
setWebView(
WebView
* view);
39
void
setIcon
(
const
QIcon &icon);
40
41
private
Q_SLOTS:
42
void
updateIcon();
43
void
popupClosed();
44
45
private
:
46
void
contextMenuEvent
(QContextMenuEvent* e)
override
;
47
void
mousePressEvent
(QMouseEvent* e)
override
;
48
void
mouseReleaseEvent
(QMouseEvent* e)
override
;
49
void
mouseMoveEvent(QMouseEvent* e)
override
;
50
51
bool
showPopup();
52
53
BrowserWindow
* m_window;
54
LocationBar
* m_locationBar;
55
WebView
* m_view;
56
QTimer* m_updateTimer;
57
58
QPoint m_dragStartPosition;
59
QIcon m_icon;
60
};
61
62
#endif
// SITEICON_H
BrowserWindow
Definition:
browserwindow.h:58
LocationBar
Definition:
locationbar.h:40
SiteIcon
Definition:
siteicon.h:31
ToolButton
Definition:
toolbutton.h:27
ToolButton::mousePressEvent
void mousePressEvent(QMouseEvent *e) override
Definition:
toolbutton.cpp:186
ToolButton::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *e) override
Definition:
toolbutton.cpp:203
ToolButton::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *e) override
Definition:
toolbutton.cpp:230
ToolButton::setIcon
void setIcon(const QIcon &icon)
Definition:
toolbutton.cpp:85
WebView
Definition:
webview.h:33
qzcommon.h
FALKON_EXPORT
#define FALKON_EXPORT
Definition:
qzcommon.h:28
toolbutton.h
src
lib
navigation
siteicon.h
Generated by
1.9.3