LMMS
Loading...
Searching...
No Matches
ControllerRackView.h
Go to the documentation of this file.
1/*
2 * ControllerRackView.h - view for song's controllers
3 *
4 * Copyright (c) 2008-2009 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_RACK_VIEW_H
26#define LMMS_GUI_CONTROLLER_RACK_VIEW_H
27
28#include <QWidget>
29
30#include "SerializingObject.h"
31
32class QPushButton;
33class QScrollArea;
34class QVBoxLayout;
35
36
37namespace lmms
38{
39
40class Controller;
41
42namespace gui
43{
44
45class ControllerView;
46
47class ControllerRackView : public QWidget, public SerializingObject
48{
49 Q_OBJECT
50public:
52 ~ControllerRackView() override = default;
53
54 void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
55 void loadSettings( const QDomElement & _this ) override;
56
57 inline QString nodeName() const override
58 {
59 return "ControllerRackView";
60 }
61
62
63public slots:
65 void moveUp(ControllerView* view);
66 void moveDown(ControllerView* view);
69
70private slots:
71 void addController();
72
73
74private:
75 QVector<ControllerView *> m_controllerViews;
76
77 QScrollArea * m_scrollArea;
78 QVBoxLayout * m_scrollAreaLayout;
79 QPushButton * m_addButton;
80
81 // Stores the index of where to insert the next ControllerView.
82 // Needed so that the StretchItem always stays at the last position.
84} ;
85
86} // namespace gui
87
88} // namespace lmms
89
90#endif // LMMS_GUI_CONTROLLER_RACK_VIEW_H
Controller controller
Definition main.C:5
Definition Controller.h:51
SerializingObject()
Definition SerializingObject.cpp:32
void deleteController(ControllerView *view)
Definition ControllerRackView.cpp:116
void addController()
Definition ControllerRackView.cpp:221
QVBoxLayout * m_scrollAreaLayout
Definition ControllerRackView.h:78
void loadSettings(const QDomElement &_this) override
Definition ControllerRackView.cpp:108
void moveUp(ControllerView *view)
Definition ControllerRackView.cpp:138
~ControllerRackView() override=default
ControllerRackView()
Definition ControllerRackView.cpp:48
int m_nextIndex
Definition ControllerRackView.h:83
void saveSettings(QDomDocument &_doc, QDomElement &_parent) override
Definition ControllerRackView.cpp:99
QString nodeName() const override
Definition ControllerRackView.h:57
QScrollArea * m_scrollArea
Definition ControllerRackView.h:77
void moveDown(ControllerView *view)
Definition ControllerRackView.cpp:152
QVector< ControllerView * > m_controllerViews
Definition ControllerRackView.h:75
QPushButton * m_addButton
Definition ControllerRackView.h:79
void removeController(Controller *controller)
Definition ControllerRackView.cpp:193
Definition ControllerView.h:47
Definition AudioPortAudio.cpp:223
Definition AudioAlsa.cpp:35