lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
TempoSyncBarModelEditor.h
Go to the documentation of this file.
1
/*
2
* TempoSyncBarModelEditor.h - adds bpm to ms conversion for the bar editor class
3
*
4
* Copyright (c) 2005-2008 Danny McRae <khjklujn/at/yahoo.com>
5
* Copyright (c) 2009-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6
* Copyright (c) 2023 Michael Gregorius
7
*
8
* This file is part of LMMS - https://lmms.io
9
*
10
* This program is free software; you can redistribute it and/or
11
* modify it under the terms of the GNU General Public
12
* License as published by the Free Software Foundation; either
13
* version 2 of the License, or (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
* General Public License for more details.
19
*
20
* You should have received a copy of the GNU General Public
21
* License along with this program (see COPYING); if not, write to the
22
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23
* Boston, MA 02110-1301 USA.
24
*
25
*/
26
27
#ifndef LMMS_GUI_TEMPO_SYNC_BAR_MODEL_EDITOR_H
28
#define LMMS_GUI_TEMPO_SYNC_BAR_MODEL_EDITOR_H
29
30
#include <QPixmap>
31
#include <QPointer>
32
33
#include "
BarModelEditor.h
"
34
#include "
TempoSyncKnobModel.h
"
35
36
namespace
lmms::gui
37
{
38
39
class
MeterDialog
;
40
41
class
LMMS_EXPORT
TempoSyncBarModelEditor
:
public
BarModelEditor
42
{
43
Q_OBJECT
44
public
:
45
TempoSyncBarModelEditor
(QString text,
FloatModel
* floatModel, QWidget * parent =
nullptr
);
46
~TempoSyncBarModelEditor
()
override
;
47
48
const
QString &
syncDescription
();
49
void
setSyncDescription
(
const
QString & new_description);
50
51
const
QPixmap &
syncIcon
();
52
void
setSyncIcon
(
const
QPixmap & new_pix);
53
54
TempoSyncKnobModel
*
model
()
55
{
56
return
castModel<TempoSyncKnobModel>
();
57
}
58
59
void
modelChanged()
override
;
60
61
62
signals:
63
void
syncDescriptionChanged
(
const
QString & new_description);
64
void
syncIconChanged
();
65
66
67
protected
:
68
void
contextMenuEvent
(QContextMenuEvent * me)
override
;
69
70
71
protected
slots:
72
void
updateDescAndIcon
();
73
void
showCustom
();
74
75
76
private
:
77
void
updateTextDescription
();
78
void
updateIcon
();
79
80
81
private
:
82
QPixmap
m_tempoSyncIcon
;
83
QString
m_tempoSyncDescription
;
84
85
QPointer<MeterDialog>
m_custom
;
86
};
87
88
}
// namespace lmms::gui
89
90
#endif
// LMMS_GUI_TEMPO_SYNC_BAR_MODEL_EDITOR_H
BarModelEditor.h
TempoSyncKnobModel.h
lmms::FloatModel
Definition
AutomatableModel.h:468
lmms::TempoSyncKnobModel
Definition
TempoSyncKnobModel.h:45
lmms::gui::BarModelEditor::BarModelEditor
BarModelEditor(QString text, FloatModel *floatModel, QWidget *parent=nullptr)
Definition
BarModelEditor.cpp:9
lmms::gui::MeterDialog
Definition
MeterDialog.h:40
lmms::gui::ModelView::castModel
T * castModel()
Definition
ModelView.h:54
lmms::gui::TempoSyncBarModelEditor::updateIcon
void updateIcon()
Definition
TempoSyncBarModelEditor.cpp:266
lmms::gui::TempoSyncBarModelEditor::updateTextDescription
void updateTextDescription()
Definition
TempoSyncBarModelEditor.cpp:222
lmms::gui::TempoSyncBarModelEditor::TempoSyncBarModelEditor
TempoSyncBarModelEditor(QString text, FloatModel *floatModel, QWidget *parent=nullptr)
Definition
TempoSyncBarModelEditor.cpp:44
lmms::gui::TempoSyncBarModelEditor::model
TempoSyncKnobModel * model()
Definition
TempoSyncBarModelEditor.h:54
lmms::gui::TempoSyncBarModelEditor::updateDescAndIcon
void updateDescAndIcon()
Definition
TempoSyncBarModelEditor.cpp:161
lmms::gui::TempoSyncBarModelEditor::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *me) override
Definition
TempoSyncBarModelEditor.cpp:84
lmms::gui::TempoSyncBarModelEditor::m_tempoSyncDescription
QString m_tempoSyncDescription
Definition
TempoSyncBarModelEditor.h:83
lmms::gui::TempoSyncBarModelEditor::showCustom
void showCustom()
Definition
TempoSyncBarModelEditor.cpp:203
lmms::gui::TempoSyncBarModelEditor::syncDescriptionChanged
void syncDescriptionChanged(const QString &new_description)
lmms::gui::TempoSyncBarModelEditor::syncIcon
const QPixmap & syncIcon()
Definition
TempoSyncBarModelEditor.cpp:190
lmms::gui::TempoSyncBarModelEditor::setSyncDescription
void setSyncDescription(const QString &new_description)
Definition
TempoSyncBarModelEditor.cpp:183
lmms::gui::TempoSyncBarModelEditor::syncIconChanged
void syncIconChanged()
lmms::gui::TempoSyncBarModelEditor::m_custom
QPointer< MeterDialog > m_custom
Definition
TempoSyncBarModelEditor.h:85
lmms::gui::TempoSyncBarModelEditor::m_tempoSyncIcon
QPixmap m_tempoSyncIcon
Definition
TempoSyncBarModelEditor.h:82
lmms::gui::TempoSyncBarModelEditor::syncDescription
const QString & syncDescription()
Definition
TempoSyncBarModelEditor.cpp:177
lmms::gui::TempoSyncBarModelEditor::setSyncIcon
void setSyncIcon(const QPixmap &new_pix)
Definition
TempoSyncBarModelEditor.cpp:196
lmms::gui
Definition
AudioPortAudio.cpp:209
Generated on
for lmms by
1.18.0