LMMS
Loading...
Searching...
No Matches
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
33namespace lmms
34{
35
36class LMMS_EXPORT Model : public QObject
37{
38 Q_OBJECT
39public:
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
56private:
59
60
61signals:
62 // emitted if actual data of the model (e.g. values) have changed
64
65 // emitted in case new data was not set as it's been equal to old data
67
68 // emitted if properties of the model (e.g. ranges) have changed
70
71} ;
72
73
74} // namespace lmms
75
76#endif // LMMS_MODEL_H
void dataUnchanged()
void dataChanged()
virtual void setDisplayName(const QString &displayName)
Definition Model.cpp:52
void propertiesChanged()
bool m_defaultConstructed
Definition Model.h:58
virtual QString displayName() const
Definition Model.cpp:47
~Model() override=default
Model * parentModel() const
Definition Model.cpp:42
Model(Model *parent, QString displayName=QString(), bool defaultConstructed=false)
Definition Model.cpp:30
bool isDefaultConstructed() const
Definition Model.cpp:37
virtual QString fullDisplayName() const
Definition Model.cpp:57
QString m_displayName
Definition Model.h:57
static uintptr_t parent
Definition pugl.h:1644
Definition AudioAlsa.cpp:35