LMMS
Loading...
Searching...
No Matches
EffectRackView.h
Go to the documentation of this file.
1/*
2 * EffectRackView.h - view for effectChain-model
3 *
4 * Copyright (c) 2006-2007 Danny McRae <khjklujn@netscape.net>
5 * Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6 *
7 * This file is part of LMMS - https://lmms.io
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program (see COPYING); if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA.
23 *
24 */
25
26#ifndef LMMS_GUI_EFFECT_RACK_VIEW_H
27#define LMMS_GUI_EFFECT_RACK_VIEW_H
28
29#include <QWidget>
30
31#include "EffectChain.h"
32#include "ModelView.h"
33
34class QScrollArea;
35
36namespace lmms::gui
37{
38
39class EffectView;
40class GroupBox;
41
42
43class EffectRackView : public QWidget, public ModelView
44{
45 Q_OBJECT
46public:
47 EffectRackView( EffectChain* model, QWidget* parent = nullptr );
48 ~EffectRackView() override;
49
50 static constexpr int DEFAULT_WIDTH = 245;
51
52public slots:
53 void clearViews();
54 void moveUp(EffectView* view);
55 void moveDown(EffectView* view);
56 void deletePlugin(EffectView* view);
57
58private slots:
59 virtual void update();
60 void addEffect();
61
62
63private:
64 void modelChanged() override;
65 QSize sizeHint() const override;
66 QSize minimumSizeHint() const override { return sizeHint(); }
67
69 {
71 }
72
73 inline const EffectChain* fxChain() const
74 {
76 }
77
78
79 QVector<EffectView *> m_effectViews;
80
82 QScrollArea* m_scrollArea;
83
85
86} ;
87
88} // namespace lmms::gui
89
90#endif // LMMS_GUI_EFFECT_RACK_VIEW_H
Definition EffectChain.h:48
~EffectRackView() override
Definition EffectRackView.cpp:82
void modelChanged() override
Definition EffectRackView.cpp:268
EffectRackView(EffectChain *model, QWidget *parent=nullptr)
Definition EffectRackView.cpp:43
static constexpr int DEFAULT_WIDTH
Definition EffectRackView.h:50
QVector< EffectView * > m_effectViews
Definition EffectRackView.h:79
QSize sizeHint() const override
Definition EffectRackView.cpp:279
void clearViews()
Definition EffectRackView.cpp:91
GroupBox * m_effectsGroupBox
Definition EffectRackView.h:81
virtual void update()
Definition EffectRackView.cpp:156
const EffectChain * fxChain() const
Definition EffectRackView.h:73
EffectChain * fxChain()
Definition EffectRackView.h:68
int m_lastY
Definition EffectRackView.h:84
void moveDown(EffectView *view)
Definition EffectRackView.cpp:131
QScrollArea * m_scrollArea
Definition EffectRackView.h:82
void moveUp(EffectView *view)
Definition EffectRackView.cpp:104
QSize minimumSizeHint() const override
Definition EffectRackView.h:66
void deletePlugin(EffectView *view)
Definition EffectRackView.cpp:143
void addEffect()
Definition EffectRackView.cpp:237
Definition EffectView.h:49
Definition GroupBox.h:40
Model * model()
Definition ModelView.h:43
ModelView(Model *model, QWidget *widget)
Definition ModelView.cpp:33
T * castModel()
Definition ModelView.h:54
static uintptr_t parent
Definition pugl.h:1644
Definition AudioPortAudio.cpp:223