lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
TempoSyncKnob.h
Go to the documentation of this file.
1
/*
2
* TempoSyncKnob.h - adds bpm to ms conversion for knob 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
*
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_TEMPO_SYNC_KNOB_H
27
#define LMMS_GUI_TEMPO_SYNC_KNOB_H
28
29
#include <QPixmap>
30
#include <QPointer>
31
32
#include "
Knob.h
"
33
#include "
TempoSyncKnobModel.h
"
34
35
namespace
lmms::gui
36
{
37
38
class
MeterDialog
;
39
40
class
LMMS_EXPORT
TempoSyncKnob
:
public
Knob
41
{
42
Q_OBJECT
43
public
:
44
TempoSyncKnob
(
KnobType
knobNum
, QWidget* parent =
nullptr
,
const
QString& name = QString() );
45
55
TempoSyncKnob
(
KnobType
knobNum
,
const
QString& labelText, QWidget* parent =
nullptr
,
LabelRendering
labelRendering =
LabelRendering::WidgetFont
,
const
QString& name = QString());
56
66
TempoSyncKnob
(
KnobType
knobNum
,
const
QString& labelText,
int
labelPixelSize, QWidget* parent,
const
QString& name = QString());
67
68
~TempoSyncKnob
()
override
;
69
70
const
QString &
syncDescription
();
71
void
setSyncDescription
(
const
QString & _new_description );
72
73
const
QPixmap &
syncIcon
();
74
void
setSyncIcon
(
const
QPixmap & _new_pix );
75
76
TempoSyncKnobModel
*
model
()
77
{
78
return
castModel<TempoSyncKnobModel>
();
79
}
80
81
void
modelChanged()
override
;
82
83
84
signals:
85
void
syncDescriptionChanged
(
const
QString & _new_description );
86
void
syncIconChanged
();
87
88
89
protected
:
90
void
contextMenuEvent
( QContextMenuEvent * _me )
override
;
91
92
93
protected
slots:
94
void
updateDescAndIcon
();
95
void
showCustom
();
96
97
98
private
:
99
QPixmap
m_tempoSyncIcon
;
100
QString
m_tempoSyncDescription
;
101
102
QPointer<MeterDialog>
m_custom
;
103
104
} ;
105
106
107
108
}
// namespace lmms::gui
109
110
#endif
// LMMS_GUI_TEMPO_SYNC_KNOB_H
Knob.h
TempoSyncKnobModel.h
lmms::TempoSyncKnobModel
Definition
TempoSyncKnobModel.h:45
lmms::gui::Knob::Knob
Knob(KnobType _knob_num, QWidget *_parent=nullptr, const QString &_name=QString())
Construct a Knob with the given style and no label.
Definition
Knob.cpp:41
lmms::gui::Knob::LabelRendering
LabelRendering
Determines how the label of the knob is rendered.
Definition
Knob.h:83
lmms::gui::Knob::LabelRendering::WidgetFont
@ WidgetFont
Renders the label using the font that is set for the widget.
Definition
Knob.h:89
lmms::gui::Knob::knobNum
KnobType knobNum
Definition
Knob.h:68
lmms::gui::MeterDialog
Definition
MeterDialog.h:40
lmms::gui::ModelView::castModel
T * castModel()
Definition
ModelView.h:54
lmms::gui::TempoSyncKnob::setSyncIcon
void setSyncIcon(const QPixmap &_new_pix)
Definition
TempoSyncKnob.cpp:304
lmms::gui::TempoSyncKnob::TempoSyncKnob
TempoSyncKnob(KnobType knobNum, QWidget *parent=nullptr, const QString &name=QString())
Definition
TempoSyncKnob.cpp:46
lmms::gui::TempoSyncKnob::model
TempoSyncKnobModel * model()
Definition
TempoSyncKnob.h:76
lmms::gui::TempoSyncKnob::m_tempoSyncIcon
QPixmap m_tempoSyncIcon
Definition
TempoSyncKnob.h:99
lmms::gui::TempoSyncKnob::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *_me) override
Definition
TempoSyncKnob.cpp:104
lmms::gui::TempoSyncKnob::updateDescAndIcon
void updateDescAndIcon()
Definition
TempoSyncKnob.cpp:182
lmms::gui::TempoSyncKnob::showCustom
void showCustom()
Definition
TempoSyncKnob.cpp:313
lmms::gui::TempoSyncKnob::setSyncDescription
void setSyncDescription(const QString &_new_description)
Definition
TempoSyncKnob.cpp:287
lmms::gui::TempoSyncKnob::syncIconChanged
void syncIconChanged()
lmms::gui::TempoSyncKnob::syncIcon
const QPixmap & syncIcon()
Definition
TempoSyncKnob.cpp:296
lmms::gui::TempoSyncKnob::m_custom
QPointer< MeterDialog > m_custom
Definition
TempoSyncKnob.h:102
lmms::gui::TempoSyncKnob::syncDescriptionChanged
void syncDescriptionChanged(const QString &_new_description)
lmms::gui::TempoSyncKnob::syncDescription
const QString & syncDescription()
Definition
TempoSyncKnob.cpp:279
lmms::gui::TempoSyncKnob::m_tempoSyncDescription
QString m_tempoSyncDescription
Definition
TempoSyncKnob.h:100
lmms::gui
Definition
AudioPortAudio.cpp:209
lmms::gui::KnobType
KnobType
Definition
Knob.h:39
Generated on
for lmms by
1.18.0