lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
LinkedModelGroupViews.h
Go to the documentation of this file.
1
/*
2
* LinkedModelGroupViews.h - view for groups of linkable models
3
*
4
* Copyright (c) 2019-2019 Johannes Lorenz <j.git$$$lorenz-ho.me, $$$=@>
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_LINKED_MODEL_GROUP_VIEWS_H
26
#define LMMS_GUI_LINKED_MODEL_GROUP_VIEWS_H
27
28
#include <cstddef>
29
#include <memory>
30
#include <QWidget>
31
32
namespace
lmms
33
{
34
35
36
class
LinkedModelGroup
;
37
class
LinkedModelGroups
;
38
39
40
namespace
gui
41
{
42
43
class
Control
;
// IWYU pragma: keep
44
49
50
62
class
LinkedModelGroupView
:
public
QWidget
63
{
64
public
:
68
LinkedModelGroupView
(QWidget* parent,
LinkedModelGroup
* model, std::size_t colNum);
69
70
~LinkedModelGroupView
()
override
=
default
;
71
73
void
modelChanged
(
LinkedModelGroup
* linkedModelGroup);
74
75
protected
:
78
void
addControl
(
Control
* ctrl,
const
std::string &
id
,
79
const
std::string& display,
bool
removable);
80
81
void
removeControl
(
const
QString &key);
82
83
void
removeFocusFromSearchBar
();
84
85
private
:
86
class
LinkedModelGroup
*
m_model
;
87
89
std::size_t
m_colNum
;
90
class
ControlLayout
*
m_layout
;
91
std::map<std::string, std::unique_ptr<class Control>>
m_widgets
;
92
};
93
94
101
class
LinkedModelGroupsView
102
{
103
protected
:
104
~LinkedModelGroupsView
() =
default
;
105
107
void
modelChanged
(
LinkedModelGroups
* ctrlBase);
108
109
private
:
112
virtual
LinkedModelGroupView
*
getGroupView
() = 0;
113
};
114
115
116
}
// namespace gui
117
118
}
// namespace lmms
119
120
#endif
// LMMS_GUI_LINKED_MODEL_GROUP_VIEWS_H
lmms::LinkedModelGroup
Definition
LinkedModelGroups.h:54
lmms::LinkedModelGroups
Definition
LinkedModelGroups.h:156
lmms::gui::Control
Definition
Controls.h:56
lmms::gui::ControlLayout
Definition
ControlLayout.h:96
lmms::gui::LinkedModelGroupView
Definition
LinkedModelGroupViews.h:63
lmms::gui::LinkedModelGroupView::m_layout
class ControlLayout * m_layout
Definition
LinkedModelGroupViews.h:90
lmms::gui::LinkedModelGroupView::removeFocusFromSearchBar
void removeFocusFromSearchBar()
Definition
LinkedModelGroupViews.cpp:148
lmms::gui::LinkedModelGroupView::~LinkedModelGroupView
~LinkedModelGroupView() override=default
lmms::gui::LinkedModelGroupView::modelChanged
void modelChanged(LinkedModelGroup *linkedModelGroup)
Reconnect models if model changed.
Definition
LinkedModelGroupViews.cpp:58
lmms::gui::LinkedModelGroupView::m_colNum
std::size_t m_colNum
column number in surrounding grid in LinkedModelGroupsView
Definition
LinkedModelGroupViews.h:89
lmms::gui::LinkedModelGroupView::m_widgets
std::map< std::string, std::unique_ptr< class Control > > m_widgets
Definition
LinkedModelGroupViews.h:91
lmms::gui::LinkedModelGroupView::addControl
void addControl(Control *ctrl, const std::string &id, const std::string &display, bool removable)
Definition
LinkedModelGroupViews.cpp:84
lmms::gui::LinkedModelGroupView::m_model
class LinkedModelGroup * m_model
Definition
LinkedModelGroupViews.h:86
lmms::gui::LinkedModelGroupView::LinkedModelGroupView
LinkedModelGroupView(QWidget *parent, LinkedModelGroup *model, std::size_t colNum)
Definition
LinkedModelGroupViews.cpp:41
lmms::gui::LinkedModelGroupView::removeControl
void removeControl(const QString &key)
Definition
LinkedModelGroupViews.cpp:124
lmms::gui::LinkedModelGroupsView
Definition
LinkedModelGroupViews.h:102
lmms::gui::LinkedModelGroupsView::~LinkedModelGroupsView
~LinkedModelGroupsView()=default
lmms::gui::LinkedModelGroupsView::getGroupView
virtual LinkedModelGroupView * getGroupView()=0
lmms::gui::LinkedModelGroupsView::modelChanged
void modelChanged(LinkedModelGroups *ctrlBase)
Reconnect models if model changed; to be called by child virtuals.
Definition
LinkedModelGroupViews.cpp:159
lmms::gui
Definition
AudioPortAudio.cpp:209
lmms
Definition
RemotePluginBase.cpp:34
Generated on
for lmms by
1.18.0