LMMS
Loading...
Searching...
No Matches
include
SideBarWidget.h
Go to the documentation of this file.
1
/*
2
* SideBarWidget.h - base-class for all side-bar-widgets
3
*
4
* Copyright (c) 2004-2009 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_SIDE_BAR_WIDGET_H
26
#define LMMS_GUI_SIDE_BAR_WIDGET_H
27
28
#include <QPixmap>
29
#include <QVBoxLayout>
30
#include <QWidget>
31
32
class
QPushButton;
33
34
namespace
lmms::gui
35
{
36
37
38
class
SideBarWidget
:
public
QWidget
39
{
40
Q_OBJECT
41
public
:
42
SideBarWidget
(
const
QString & _title,
const
QPixmap & _icon,
43
QWidget * _parent );
44
~SideBarWidget
()
override
=
default
;
45
46
inline
const
QPixmap &
icon
()
const
47
{
48
return
m_icon
;
49
}
50
inline
const
QString &
title
()
const
51
{
52
return
m_title
;
53
}
54
55
signals:
56
void
closeButtonClicked
();
57
58
protected
:
59
void
paintEvent
( QPaintEvent * _pe )
override
;
60
void
resizeEvent
( QResizeEvent * _re )
override
;
61
void
contextMenuEvent
( QContextMenuEvent * )
override
62
{
63
}
64
65
QWidget *
contentParent
()
66
{
67
return
m_contents
;
68
}
69
70
void
addContentWidget
( QWidget * _w )
71
{
72
m_layout
->addWidget( _w );
73
}
74
75
void
addContentLayout
( QLayout * _l )
76
{
77
m_layout
->addLayout( _l );
78
}
79
80
private
:
81
QWidget *
m_contents
;
82
QVBoxLayout *
m_layout
;
83
QString
m_title
;
84
QPixmap
m_icon
;
85
QPushButton *
m_closeBtn
;
86
const
QSize
m_buttonSize
;
87
88
} ;
89
90
91
}
// namespace lmms::gui
92
93
#endif
// LMMS_GUI_SIDE_BAR_WIDGET_H
lmms::gui::SideBarWidget::m_contents
QWidget * m_contents
Definition
SideBarWidget.h:81
lmms::gui::SideBarWidget::paintEvent
void paintEvent(QPaintEvent *_pe) override
Definition
SideBarWidget.cpp:59
lmms::gui::SideBarWidget::m_title
QString m_title
Definition
SideBarWidget.h:83
lmms::gui::SideBarWidget::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *) override
Definition
SideBarWidget.h:61
lmms::gui::SideBarWidget::contentParent
QWidget * contentParent()
Definition
SideBarWidget.h:65
lmms::gui::SideBarWidget::addContentWidget
void addContentWidget(QWidget *_w)
Definition
SideBarWidget.h:70
lmms::gui::SideBarWidget::m_icon
QPixmap m_icon
Definition
SideBarWidget.h:84
lmms::gui::SideBarWidget::m_layout
QVBoxLayout * m_layout
Definition
SideBarWidget.h:82
lmms::gui::SideBarWidget::SideBarWidget
SideBarWidget(const QString &_title, const QPixmap &_icon, QWidget *_parent)
Definition
SideBarWidget.cpp:38
lmms::gui::SideBarWidget::icon
const QPixmap & icon() const
Definition
SideBarWidget.h:46
lmms::gui::SideBarWidget::resizeEvent
void resizeEvent(QResizeEvent *_re) override
Definition
SideBarWidget.cpp:82
lmms::gui::SideBarWidget::title
const QString & title() const
Definition
SideBarWidget.h:50
lmms::gui::SideBarWidget::m_buttonSize
const QSize m_buttonSize
Definition
SideBarWidget.h:86
lmms::gui::SideBarWidget::closeButtonClicked
void closeButtonClicked()
lmms::gui::SideBarWidget::addContentLayout
void addContentLayout(QLayout *_l)
Definition
SideBarWidget.h:75
lmms::gui::SideBarWidget::~SideBarWidget
~SideBarWidget() override=default
lmms::gui::SideBarWidget::m_closeBtn
QPushButton * m_closeBtn
Definition
SideBarWidget.h:85
lmms::gui
Definition
AudioPortAudio.cpp:223
Generated on
for LMMS by
1.16.1