lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
Model.h
Go to the documentation of this file.
1
/*
2
* Model.h - declaration of Model base class
3
*
4
* Copyright (c) 2007-2014 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_MODEL_H
26
#define LMMS_MODEL_H
27
28
#include <QString>
29
#include <QObject>
30
31
#include "lmms_export.h"
32
33
namespace
lmms
34
{
35
36
class
LMMS_EXPORT
Model
:
public
QObject
37
{
38
Q_OBJECT
39
public
:
40
Model
(
Model
* parent, QString
displayName
= QString(),
41
bool
defaultConstructed =
false
);
42
43
~Model
()
override
=
default
;
44
45
bool
isDefaultConstructed
()
const
;
46
47
Model
*
parentModel
()
const
;
48
49
virtual
QString
displayName
()
const
;
50
51
virtual
void
setDisplayName
(
const
QString&
displayName
);
52
53
virtual
QString
fullDisplayName
()
const
;
54
55
56
private
:
57
QString
m_displayName
;
58
bool
m_defaultConstructed
;
59
60
61
signals:
62
// emitted if actual data of the model (e.g. values) have changed
63
void
dataChanged
();
64
65
// emitted in case new data was not set as it's been equal to old data
66
void
dataUnchanged
();
67
68
// emitted if properties of the model (e.g. ranges) have changed
69
void
propertiesChanged
();
70
71
} ;
72
73
74
}
// namespace lmms
75
76
#endif
// LMMS_MODEL_H
lmms::Model::dataUnchanged
void dataUnchanged()
lmms::Model::dataChanged
void dataChanged()
lmms::Model::setDisplayName
virtual void setDisplayName(const QString &displayName)
Definition
Model.cpp:52
lmms::Model::propertiesChanged
void propertiesChanged()
lmms::Model::m_defaultConstructed
bool m_defaultConstructed
Definition
Model.h:58
lmms::Model::displayName
virtual QString displayName() const
Definition
Model.cpp:47
lmms::Model::~Model
~Model() override=default
lmms::Model::parentModel
Model * parentModel() const
Definition
Model.cpp:42
lmms::Model::Model
Model(Model *parent, QString displayName=QString(), bool defaultConstructed=false)
Definition
Model.cpp:30
lmms::Model::isDefaultConstructed
bool isDefaultConstructed() const
Definition
Model.cpp:37
lmms::Model::fullDisplayName
virtual QString fullDisplayName() const
Definition
Model.cpp:57
lmms::Model::m_displayName
QString m_displayName
Definition
Model.h:57
lmms
Definition
RemotePluginBase.cpp:34
Generated on
for lmms by
1.18.0