forked from tryphon/rivendell2-debian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rdbutton_panel.h
68 lines (60 loc) · 1.87 KB
/
rdbutton_panel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// rdbutton_panel.h
//
// The sound panel widget for RDAirPlay
//
// (C) Copyright 2002-2003 Fred Gleason <[email protected]>
//
// $Id: rdbutton_panel.h,v 1.10.6.2 2014/02/06 20:43:47 cvs Exp $
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#ifndef RDBUTTON_PANEL_H
#define RDBUTTON_PANEL_H
#include <qwidget.h>
#include <qdatetime.h>
#include <qlabel.h>
#include <rdairplay_conf.h>
#include <rdstation.h>
#include <rduser.h>
#include <rdpanel_button.h>
#include <rdbutton_dialog.h>
//
// Widget Settings
//
#define PANEL_MAX_BUTTON_COLUMNS 20
#define PANEL_MAX_BUTTON_ROWS 20
#define PANEL_BUTTON_SIZE_X 88
#define PANEL_BUTTON_SIZE_Y 80
class RDButtonPanel
{
public:
RDButtonPanel(RDAirPlayConf::PanelType type,int panel,int cols,int rows,
RDStation *station,bool flash,QWidget *parent);
~RDButtonPanel();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
RDPanelButton *panelButton(int row,int col) const;
void setActionMode(RDAirPlayConf::ActionMode mode);
void setAllowDrags(bool state);
void setAcceptDrops(bool state);
void hide();
void show();
void clear();
private:
RDPanelButton *panel_button[PANEL_MAX_BUTTON_ROWS][PANEL_MAX_BUTTON_COLUMNS];
RDStation *panel_station;
int panel_button_columns;
int panel_button_rows;
};
#endif