LMMS
Loading...
Searching...
No Matches
ControllerView.h
Go to the documentation of this file.
1/*
2 * ControllerView.h - view-component for an control
3 *
4 * Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
5 *
6 * This file is part of LMMS - https://lmms.io
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
22 *
23 */
24
25#ifndef LMMS_GUI_CONTROLLER_VIEW_H
26#define LMMS_GUI_CONTROLLER_VIEW_H
27
28#include <QFrame>
29
30#include "AutomatableModel.h"
31#include "Controller.h"
32#include "ModelView.h"
33
34class QGroupBox;
35class QLabel;
36class QPushButton;
37class QMdiSubWindow;
38
39namespace lmms::gui
40{
41
42
43class LedCheckBox;
44
45
46class ControllerView : public QFrame, public ModelView
47{
48 Q_OBJECT
49public:
50 ControllerView( Controller * _controller, QWidget * _parent );
51 ~ControllerView() override;
52
54 {
55 return( castModel<Controller>() );
56 }
57
58 inline const Controller * getController() const
59 {
60 return( castModel<Controller>() );
61 }
62
63
64public slots:
65 void editControls();
66 void removeController();
67 void renameController();
68 void moveUp();
69 void moveDown();
70
71signals:
75
76
77protected:
78 void contextMenuEvent( QContextMenuEvent * _me ) override;
79 void modelChanged() override;
80 void mouseDoubleClickEvent( QMouseEvent * event ) override;
81
82
83private:
84 QMdiSubWindow * m_subWindow;
86 QLabel * m_nameLabel;
87};
88
89
90} // namespace lmms::gui
91
92#endif // LMMS_GUI_CONTROLLER_VIEW_H
Definition Controller.h:51
Definition ControllerDialog.h:42
void contextMenuEvent(QContextMenuEvent *_me) override
Definition ControllerView.cpp:156
void removedController(ControllerView *view)
ControllerDialog * m_controllerDlg
Definition ControllerView.h:85
Controller * getController()
Definition ControllerView.h:53
void removeController()
Definition ControllerView.cpp:121
~ControllerView() override
Definition ControllerView.cpp:90
void editControls()
Definition ControllerView.cpp:101
void modelChanged() override
Definition ControllerView.cpp:150
ControllerView(Controller *_controller, QWidget *_parent)
Definition ControllerView.cpp:47
void moveDown()
Definition ControllerView.cpp:119
void movedDown(ControllerView *view)
void movedUp(ControllerView *view)
const Controller * getController() const
Definition ControllerView.h:58
void mouseDoubleClickEvent(QMouseEvent *event) override
Definition ControllerView.cpp:143
void renameController()
Definition ControllerView.cpp:123
QLabel * m_nameLabel
Definition ControllerView.h:86
void moveUp()
Definition ControllerView.cpp:117
QMdiSubWindow * m_subWindow
Definition ControllerView.h:84
Definition LedCheckBox.h:37
ModelView(Model *model, QWidget *widget)
Definition ModelView.cpp:33
T * castModel()
Definition ModelView.h:54
Definition AudioPortAudio.cpp:223