LMMS
Loading...
Searching...
No Matches
SlicerTView.h
Go to the documentation of this file.
1/*
2 * SlicerTView.h - declaration of class SlicerTView
3 *
4 * Copyright (c) 2023 Daniel Kauss Serna <daniel.kauss.serna@gmail.com>
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_SLICERT_VIEW_H
26#define LMMS_GUI_SLICERT_VIEW_H
27
28
29#include "InstrumentView.h"
30
31class QPushButton;
32
33namespace lmms {
34
35class SlicerT;
36
37namespace gui {
38
39class ComboBox;
40class Knob;
41class LcdSpinBox;
42class PixmapButton;
43class SlicerTWaveform;
44
46{
47 Q_OBJECT
48
49public slots:
50 void exportMidi();
51 void openFiles();
52 void clearSlices();
53
54public:
55 SlicerTView(SlicerT* instrument, QWidget* parent);
56
57 static constexpr int s_textBoxHeight = 20;
58 static constexpr int s_textBoxWidth = 50;
59
60 static constexpr int s_topBarHeight = 50;
61 static constexpr int s_bottomBoxHeight = 97;
62 static constexpr int s_bottomBoxOffset = 65;
63 static constexpr int s_sampleBoxHeight = 14;
64 static constexpr int s_folderButtonWidth = 15;
65 static constexpr int s_leftBoxWidth = 400;
66
67
68 static constexpr int s_x1 = 35;
69 static constexpr int s_x2 = 85;
70 static constexpr int s_x3 = 160;
71 static constexpr int s_x4 = 190;
72 static constexpr int s_x5 = 275;
73 static constexpr int s_x6 = 325;
74protected:
75 void dragEnterEvent(QDragEnterEvent* dee) override;
76 void dropEvent(QDropEvent* de) override;
77
78 void paintEvent(QPaintEvent* pe) override;
79 void resizeEvent(QResizeEvent* event) override;
80
81private:
82 bool isResizable() const override { return true; }
83
85
93
94 QPushButton* m_resetButton;
95 QPushButton* m_midiExportButton;
96
98
100
101 QPixmap m_fullLogo;
103
104
105 int m_y1;
106 int m_y2;
107};
108} // namespace gui
109} // namespace lmms
110#endif // LMMS_GUI_SLICERT_VIEW_H
Definition SlicerT.h:38
Definition ComboBox.h:38
InstrumentView(Instrument *_instrument, QWidget *_parent)
Definition InstrumentView.cpp:34
Definition Knob.h:47
Definition LcdSpinBox.h:35
Definition PixmapButton.h:37
LcdSpinBox * m_bpmBox
Definition SlicerTView.h:88
static constexpr int s_x1
Definition SlicerTView.h:68
SlicerTView(SlicerT *instrument, QWidget *parent)
Definition SlicerTView.cpp:49
void dropEvent(QDropEvent *de) override
Definition SlicerTView.cpp:185
PixmapButton * m_clearButton
Definition SlicerTView.h:91
static constexpr int s_sampleBoxHeight
Definition SlicerTView.h:63
QPushButton * m_resetButton
Definition SlicerTView.h:94
static constexpr int s_topBarHeight
Definition SlicerTView.h:60
void dragEnterEvent(QDragEnterEvent *dee) override
Definition SlicerTView.cpp:167
SlicerTWaveform * m_wf
Definition SlicerTView.h:97
bool isResizable() const override
Definition SlicerTView.h:82
static constexpr int s_textBoxWidth
Definition SlicerTView.h:58
QPixmap m_background
Definition SlicerTView.h:102
static constexpr int s_x2
Definition SlicerTView.h:69
static constexpr int s_x3
Definition SlicerTView.h:70
static constexpr int s_bottomBoxHeight
Definition SlicerTView.h:61
QPushButton * m_midiExportButton
Definition SlicerTView.h:95
static constexpr int s_leftBoxWidth
Definition SlicerTView.h:65
void resizeEvent(QResizeEvent *event) override
Definition SlicerTView.cpp:282
int m_y2
Definition SlicerTView.h:106
static constexpr int s_x4
Definition SlicerTView.h:71
Knob * m_fadeOutKnob
Definition SlicerTView.h:87
QPixmap m_fullLogo
Definition SlicerTView.h:101
ComboBox * m_snapSetting
Definition SlicerTView.h:89
void exportMidi()
Definition SlicerTView.cpp:137
static constexpr int s_textBoxHeight
Definition SlicerTView.h:57
Knob * createStyledKnob()
Definition SlicerTView.cpp:114
void paintEvent(QPaintEvent *pe) override
Definition SlicerTView.cpp:206
PixmapButton * m_folderButton
Definition SlicerTView.h:92
void openFiles()
Definition SlicerTView.cpp:159
void clearSlices()
Definition SlicerTView.cpp:124
SlicerT * m_slicerTParent
Definition SlicerTView.h:84
PixmapButton * m_syncToggle
Definition SlicerTView.h:90
static constexpr int s_x5
Definition SlicerTView.h:72
static constexpr int s_x6
Definition SlicerTView.h:73
Knob * m_noteThresholdKnob
Definition SlicerTView.h:86
static constexpr int s_bottomBoxOffset
Definition SlicerTView.h:62
int m_y1
Definition SlicerTView.h:105
static constexpr int s_folderButtonWidth
Definition SlicerTView.h:64
Definition SlicerTWaveform.h:40
static uintptr_t parent
Definition pugl.h:1644
Definition AudioPortAudio.cpp:223
Definition AudioAlsa.cpp:35