lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
LmmsStyle.h
Go to the documentation of this file.
1
/*
2
* LmmsStyle.h - the graphical style used by LMMS to create a consistent
3
* interface
4
*
5
* Copyright (c) 2007-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_LMMS_STYLE_H
27
#define LMMS_GUI_LMMS_STYLE_H
28
29
#include <QFileSystemWatcher>
30
#include <QProxyStyle>
31
32
33
namespace
lmms::gui
34
{
35
36
37
class
LmmsStyle
:
public
QProxyStyle
38
{
39
public
:
40
LmmsStyle
();
41
~LmmsStyle
()
override
=
default
;
42
43
QPalette
standardPalette
()
const override
;
44
45
void
drawComplexControl
(
46
ComplexControl control,
47
const
QStyleOptionComplex * option,
48
QPainter *painter,
49
const
QWidget *widget )
const override
;
50
void
drawPrimitive
( PrimitiveElement element,
51
const
QStyleOption *option,
52
QPainter *painter,
53
const
QWidget *widget = 0 )
const override
;
54
55
int
pixelMetric
( PixelMetric metric,
56
const
QStyleOption * option = 0,
57
const
QWidget * widget = 0 )
const override
;
58
59
static
QPalette *
s_palette
;
60
61
private
:
62
QImage
colorizeXpm
(
const
char
*
const
* xpm,
const
QBrush& fill )
const
;
63
void
hoverColors
(
bool
sunken,
bool
hover,
bool
active, QColor& color, QColor& blend )
const
;
64
QFileSystemWatcher
m_styleReloader
;
65
};
66
67
68
}
// namespace lmms::gui
69
70
#endif
// LMMS_GUI_LMMS_STYLE_H
lmms::gui::LmmsStyle::colorizeXpm
QImage colorizeXpm(const char *const *xpm, const QBrush &fill) const
Definition
LmmsStyle.cpp:364
lmms::gui::LmmsStyle::standardPalette
QPalette standardPalette() const override
Definition
LmmsStyle.cpp:174
lmms::gui::LmmsStyle::LmmsStyle
LmmsStyle()
Definition
LmmsStyle.cpp:136
lmms::gui::LmmsStyle::s_palette
static QPalette * s_palette
Definition
LmmsStyle.h:59
lmms::gui::LmmsStyle::drawComplexControl
void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const override
Definition
LmmsStyle.cpp:184
lmms::gui::LmmsStyle::m_styleReloader
QFileSystemWatcher m_styleReloader
Definition
LmmsStyle.h:64
lmms::gui::LmmsStyle::drawPrimitive
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget=0) const override
Definition
LmmsStyle.cpp:227
lmms::gui::LmmsStyle::hoverColors
void hoverColors(bool sunken, bool hover, bool active, QColor &color, QColor &blend) const
Definition
LmmsStyle.cpp:377
lmms::gui::LmmsStyle::pixelMetric
int pixelMetric(PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const override
Definition
LmmsStyle.cpp:338
lmms::gui::LmmsStyle::~LmmsStyle
~LmmsStyle() override=default
lmms::gui
Definition
AudioPortAudio.cpp:209
Generated on
for lmms by
1.18.0