Sayonara Player
src
GUI
Library
Helper
DiscPopupMenu.h
1
/* DiscPopupMenu.h */
2
3
/* Copyright (C) 2013 Lucio Carreras
4
*
5
* This file is part of sayonara player
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
22
23
#ifndef DISC_POPUP_MENU_H_
24
#define DISC_POPUP_MENU_H_
25
26
#include <QMenu>
27
#include <QAction>
28
#include <QList>
29
#include <QString>
30
#include <QDebug>
31
#include <QMouseEvent>
32
33
34
class
DiscAction
:
public
QAction {
35
36
Q_OBJECT
37
38
signals:
39
void
sig_disc_pressed(
int
);
40
41
private
slots:
42
void
disc_hover();
43
44
public
:
45
DiscAction
(QWidget* parent,
const
QIcon& icon);
46
};
47
48
49
class
DiscPopupMenu
:
public
QMenu {
50
51
Q_OBJECT
52
53
signals:
54
void
sig_disc_pressed(
int
);
55
56
private
slots:
57
void
disc_pressed(
int
disc);
58
59
60
public
:
61
DiscPopupMenu
(QWidget* parent,
QList<quint8>
discs);
62
~
DiscPopupMenu
();
63
64
protected
:
65
void
mouseReleaseEvent(QMouseEvent* e);
66
67
private
:
68
QList<DiscAction*>
_actions;
69
70
void
clean_up();
71
};
72
73
74
75
76
77
#endif
DiscPopupMenu
Definition:
DiscPopupMenu.h:49
QList< quint8 >
DiscAction
Definition:
DiscPopupMenu.h:34
Generated on Tue Oct 11 2016 10:33:35 for Sayonara Player by
1.8.12