LMMS
Loading...
Searching...
No Matches
CustomTextKnob.h
Go to the documentation of this file.
1/*
2 * CustomTextKnob.h
3 *
4 * Copyright (c) 2020 Ibuki Sugiyama <main/at/fuwa.dev>
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_CUSTOM_TEXT_KNOB_H
26#define LMMS_GUI_CUSTOM_TEXT_KNOB_H
27
28#include "Knob.h"
29
30namespace lmms::gui
31{
32
33
34class LMMS_EXPORT CustomTextKnob : public Knob
35{
36protected:
37 inline void setHintText( const QString & _txt_before, const QString & _txt_after ) {} // inaccessible
38public:
39 CustomTextKnob( KnobType _knob_num, const QString& label, QWidget * _parent = nullptr, const QString & _name = QString(), const QString & _value_text = QString() );
40
41 CustomTextKnob( const Knob& other ) = delete;
42
43 inline void setValueText(const QString & _value_text)
44 {
45 m_value_text = _value_text;
46 }
47
48private:
49 QString displayValue() const override;
50
51protected:
52 QString m_value_text;
53} ;
54
55
56} // namespace lmms::gui
57
58#endif // LMMS_GUI_CUSTOM_TEXT_KNOB_H
Definition CustomTextKnob.h:35
void setValueText(const QString &_value_text)
Definition CustomTextKnob.h:43
CustomTextKnob(KnobType _knob_num, const QString &label, QWidget *_parent=nullptr, const QString &_name=QString(), const QString &_value_text=QString())
Definition CustomTextKnob.cpp:32
QString m_value_text
Definition CustomTextKnob.h:52
CustomTextKnob(const Knob &other)=delete
void setHintText(const QString &_txt_before, const QString &_txt_after)
Definition CustomTextKnob.h:37
Knob(KnobType _knob_num, QWidget *_parent=nullptr, const QString &_name=QString())
Construct a Knob with the given style and no label.
Definition Knob.cpp:40
Definition AudioPortAudio.cpp:223
KnobType
Definition Knob.h:39