LMMS
Loading...
Searching...
No Matches
GroupBox.h
Go to the documentation of this file.
1/*
2 * GroupBox.h - LMMS-groupbox
3 *
4 * Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
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_GROUP_BOX_H
26#define LMMS_GUI_GROUP_BOX_H
27
28#include <QWidget>
29
31#include "PixmapButton.h"
32
33
34class QPixmap;
35
36namespace lmms::gui
37{
38
39class GroupBox : public QWidget, public BoolModelView
40{
41 Q_OBJECT
42public:
43 GroupBox( const QString & _caption, QWidget * _parent = nullptr );
44 ~GroupBox() override;
45
46 void modelChanged() override;
47
49 {
50 return m_led;
51 }
52
59 bool ledButtonShown() const;
60
66 void setLedButtonShown(bool value);
67
68 int titleBarHeight() const
69 {
70 return m_titleBarHeight;
71 }
72
73
74protected:
75 void mousePressEvent( QMouseEvent * _me ) override;
76 void paintEvent( QPaintEvent * _pe ) override;
77
78
79private:
81
83 QString m_caption;
85
86} ;
87
88
89} // namespace lmms::gui
90
91#endif // LMMS_GUI_GROUP_BOX_H
GroupBox(const QString &_caption, QWidget *_parent=nullptr)
Definition GroupBox.cpp:37
int titleBarHeight() const
Definition GroupBox.h:68
PixmapButton * ledButton()
Definition GroupBox.h:48
void setLedButtonShown(bool value)
Sets if the LED check box is shown or not.
Definition GroupBox.cpp:77
~GroupBox() override
Definition GroupBox.cpp:57
QString m_caption
Definition GroupBox.h:83
const int m_titleBarHeight
Definition GroupBox.h:84
void paintEvent(QPaintEvent *_pe) override
Definition GroupBox.cpp:96
bool ledButtonShown() const
Returns whether the LED button is shown or not.
Definition GroupBox.cpp:71
PixmapButton * m_led
Definition GroupBox.h:82
void mousePressEvent(QMouseEvent *_me) override
Definition GroupBox.cpp:83
void modelChanged() override
Definition GroupBox.cpp:65
Definition PixmapButton.h:37
static PuglViewHint int value
Definition pugl.h:1708
Definition AudioPortAudio.cpp:223
TypedModelView< BoolModel > BoolModelView
Definition AutomatableModelView.h:133