hydrogen 1.2.6
Rotary.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2025 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (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
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 */
22
23#ifndef ROTARY_H
24#define ROTARY_H
25
26#include <QtGui>
27#include <QtWidgets>
28#include <QSvgRenderer>
29
30#include "WidgetWithInput.h"
31
32#include <core/Object.h>
34
44class Rotary : public WidgetWithInput, public H2Core::Object<Rotary>
45{
47
48public:
49 enum class Type {
58 };
59
60 Rotary(const Rotary&) = delete;
61 Rotary& operator=( const Rotary& rhs ) = delete;
62
63 Rotary( QWidget* parent, Type type, QString sBaseTooltip, bool bUseIntSteps, float fMin = 0.0, float fMax = 1.0, bool bModifyOnChange = true );
64 ~Rotary();
65
66public slots:
68
69private:
71 QSvgRenderer* m_background;
72 QSvgRenderer* m_knob;
73
74 virtual void paintEvent(QPaintEvent *ev) override;
75};
76#endif
#define H2_OBJECT(name)
Definition Object.h:227
Changes
Bitwise or-able options showing which part of the Preferences were altered using the PreferencesDialo...
Type m_type
Definition Rotary.h:70
QSvgRenderer * m_knob
Definition Rotary.h:72
@ Small
No arc will be drawn.
Definition Rotary.h:57
@ Center
The arc features a point at its upmost position.
Definition Rotary.h:55
@ Normal
The arc is of solid red color.
Definition Rotary.h:51
void onPreferencesChanged(H2Core::Preferences::Changes changes)
Definition Rotary.cpp:301
~Rotary()
Definition Rotary.cpp:91
QSvgRenderer * m_background
Definition Rotary.h:71
Rotary & operator=(const Rotary &rhs)=delete
virtual void paintEvent(QPaintEvent *ev) override
Definition Rotary.cpp:94
Rotary(const Rotary &)=delete
WidgetWithInput(QWidget *parent, bool bUseIntSteps, QString sBaseTooltip, int nScrollSpeed, int nScrollSpeedFast, float fMin, float fMax, bool bModifyOnChange)