LMMS
Loading...
Searching...
No Matches
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
32namespace lmms
33{
34
35
38
39
40namespace gui
41{
42
43class Control; // IWYU pragma: keep
44
49
50
62class LinkedModelGroupView : public QWidget
63{
64public:
70 std::size_t colNum);
71 ~LinkedModelGroupView() override = default;
72
74 void modelChanged(LinkedModelGroup* linkedModelGroup);
75
76protected:
79 void addControl(Control* ctrl, const std::string &id,
80 const std::string& display, bool removable);
81
82 void removeControl(const QString &key);
83
85
86private:
88
90 std::size_t m_colNum;
92 std::map<std::string, std::unique_ptr<class Control>> m_widgets;
93};
94
95
103{
104protected:
106
108 void modelChanged(LinkedModelGroups* ctrlBase);
109
110private:
114};
115
116
117} // namespace gui
118
119} // namespace lmms
120
121#endif // LMMS_GUI_LINKED_MODEL_GROUP_VIEWS_H
Definition LinkedModelGroups.h:54
Definition LinkedModelGroups.h:156
Definition Controls.h:56
Definition ControlLayout.h:96
Definition LinkedModelGroupViews.h:63
class ControlLayout * m_layout
Definition LinkedModelGroupViews.h:91
void removeFocusFromSearchBar()
Definition LinkedModelGroupViews.cpp:148
~LinkedModelGroupView() override=default
void modelChanged(LinkedModelGroup *linkedModelGroup)
Reconnect models if model changed.
Definition LinkedModelGroupViews.cpp:58
std::size_t m_colNum
column number in surrounding grid in LinkedModelGroupsView
Definition LinkedModelGroupViews.h:90
std::map< std::string, std::unique_ptr< class Control > > m_widgets
Definition LinkedModelGroupViews.h:92
void addControl(Control *ctrl, const std::string &id, const std::string &display, bool removable)
Definition LinkedModelGroupViews.cpp:84
class LinkedModelGroup * m_model
Definition LinkedModelGroupViews.h:87
LinkedModelGroupView(QWidget *parent, LinkedModelGroup *model, std::size_t colNum)
Definition LinkedModelGroupViews.cpp:41
void removeControl(const QString &key)
Definition LinkedModelGroupViews.cpp:124
Definition LinkedModelGroupViews.h:103
virtual LinkedModelGroupView * getGroupView()=0
void modelChanged(LinkedModelGroups *ctrlBase)
Reconnect models if model changed; to be called by child virtuals.
Definition LinkedModelGroupViews.cpp:159
static uintptr_t parent
Definition pugl.h:1644
Definition AudioPortAudio.cpp:223
Definition AudioAlsa.cpp:35
ZCONST char * key
Definition crypt.c:587