Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

clickable_label.h
1 /* clickable_label.h
2 *
3 * Taken from https://wiki.qt.io/Clickable_QLabel and adapted for usage
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
12 #ifndef CLICKABLE_LABEL_H_
13 #define CLICKABLE_LABEL_H_
14
15 #include <QLabel>
16
17 class ClickableLabel : public QLabel
18 {
19 Q_OBJECT
20 public:
21 explicit ClickableLabel( QWidget* parent=0 );
22
23 signals:
24 void clicked();
25 void clickedAt(const QPoint &global_pos, Qt::MouseButton button);
26
27 protected:
28 void mouseReleaseEvent(QMouseEvent* event);
29 void mousePressEvent(QMouseEvent *event);
30 void contextMenuEvent(QContextMenuEvent *event);
31 };
32
33 #endif /* CLICKABLE_LABEL_H_ */
34
35 /*
36 * Editor modelines
37 *
38 * Local Variables:
39 * c-basic-offset: 4
40 * tab-width: 8
41 * indent-tabs-mode: nil
42 * End:
43 *
44 * ex: set shiftwidth=4 tabstop=8 expandtab:
45 * :indentSize=4:tabSize=8:noTabs=true:
46 */
ClickableLabel
Definition: clickable_label.h:17