LMMS
Loading...
Searching...
No Matches
PositionLine.h
Go to the documentation of this file.
1/*
2 * PositionLine.h - declaration of class PositionLine, a simple widget that
3 * draws a line, mainly works with TimeLineWidget
4 *
5 * Copyright (c) 2004-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_POSITION_LINE_H
27#define LMMS_GUI_POSITION_LINE_H
28
29#include <QWidget>
30
31#include "Song.h"
32
33namespace lmms::gui
34{
35
36class PositionLine : public QWidget
37{
38 Q_OBJECT
39 Q_PROPERTY(bool tailGradient MEMBER m_hasTailGradient)
40 Q_PROPERTY(QColor lineColor MEMBER m_lineColor)
41 Q_PROPERTY(QColor recordingColor MEMBER m_recordingColor)
42public:
43 PositionLine(QWidget* parent, Song::PlayMode playMode);
44
45 bool isRecording() const { return m_isRecording; }
46
47 void setRecording(bool recording);
48
49public slots:
50 void zoomChange(float zoom);
51
52private:
53 void paintEvent(QPaintEvent* pe) override;
54
56 bool m_isRecording = false;
57
61};
62
63} // namespace lmms::gui
64
65#endif // LMMS_GUI_POSITION_LINE_H
Definition Song.h:65
PlayMode
Definition Song.h:72
QColor m_lineColor
Definition PositionLine.h:59
void zoomChange(float zoom)
Definition PositionLine.cpp:100
QColor recordingColor
Definition PositionLine.h:41
bool tailGradient
Definition PositionLine.h:39
bool m_isRecording
Definition PositionLine.h:56
bool isRecording() const
Definition PositionLine.h:45
bool m_hasTailGradient
Definition PositionLine.h:58
Song::PlayMode m_playMode
Definition PositionLine.h:55
QColor m_recordingColor
Definition PositionLine.h:60
PositionLine(QWidget *parent, Song::PlayMode playMode)
Definition PositionLine.cpp:33
QColor lineColor
Definition PositionLine.h:40
void setRecording(bool recording)
Definition PositionLine.cpp:46
void paintEvent(QPaintEvent *pe) override
Definition PositionLine.cpp:55
static uintptr_t parent
Definition pugl.h:1644
Definition AudioPortAudio.cpp:223