LMMS
Loading...
Searching...
No Matches
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
33namespace lmms::gui
34{
35
36
37class LmmsStyle : public QProxyStyle
38{
39public:
40 LmmsStyle();
41 ~LmmsStyle() override = default;
42
43 QPalette standardPalette() const override;
44
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
61private:
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
QImage colorizeXpm(const char *const *xpm, const QBrush &fill) const
Definition LmmsStyle.cpp:364
QPalette standardPalette() const override
Definition LmmsStyle.cpp:174
LmmsStyle()
Definition LmmsStyle.cpp:136
static QPalette * s_palette
Definition LmmsStyle.h:59
void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const override
Definition LmmsStyle.cpp:184
QFileSystemWatcher m_styleReloader
Definition LmmsStyle.h:64
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget=0) const override
Definition LmmsStyle.cpp:227
void hoverColors(bool sunken, bool hover, bool active, QColor &color, QColor &blend) const
Definition LmmsStyle.cpp:377
int pixelMetric(PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const override
Definition LmmsStyle.cpp:338
~LmmsStyle() override=default
float control
Definition lilv_test.c:1462
Definition AudioPortAudio.cpp:223
Definition mygetopt.h:88