LMMS
Loading...
Searching...
No Matches
InstrumentView.h
Go to the documentation of this file.
1/*
2 * InstrumentView.h - definition of InstrumentView-class
3 *
4 * Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
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_INSTRUMENT_VIEW_H
26#define LMMS_GUI_INSTRUMENT_VIEW_H
27
28#include "Instrument.h"
29#include "PluginView.h"
30
31
32namespace lmms::gui
33{
34
36
37
39class LMMS_EXPORT InstrumentView : public PluginView
40{
41public:
42 InstrumentView( Instrument * _instrument, QWidget * _parent );
43 ~InstrumentView() override;
44
46 {
47 return( castModel<Instrument>() );
48 }
49
50 const Instrument * model() const
51 {
52 return( castModel<Instrument>() );
53 }
54
55 void setModel( Model * _model, bool = false ) override;
56
57 InstrumentTrackWindow * instrumentTrackWindow();
58
59} ;
60
61
62
63
65class LMMS_EXPORT InstrumentViewFixedSize : public InstrumentView
66{
67 QSize sizeHint() const override { return QSize(250, 250); }
68 QSize minimumSizeHint() const override { return sizeHint(); }
69
70public:
72 ~InstrumentViewFixedSize() override = default;
73} ;
74
75
76} // namespace lmms::gui
77
78#endif // LMMS_GUI_INSTRUMENT_VIEW_H
Definition Instrument.h:52
Definition Model.h:37
Definition InstrumentTrackWindow.h:63
Instrument view with fixed LMMS-default size.
Definition InstrumentView.h:66
InstrumentView(Instrument *_instrument, QWidget *_parent)
Definition InstrumentView.cpp:34
QSize sizeHint() const override
Definition InstrumentView.h:67
~InstrumentViewFixedSize() override=default
QSize minimumSizeHint() const override
Definition InstrumentView.h:68
const Instrument * model() const
Definition InstrumentView.h:50
Instrument * model()
Definition InstrumentView.h:45
InstrumentView(Instrument *_instrument, QWidget *_parent)
Definition InstrumentView.cpp:34
T * castModel()
Definition ModelView.h:54
PluginView(Plugin *_plugin, QWidget *_parent)
Definition PluginView.h:38
Definition AudioPortAudio.cpp:223