LMMS
Loading...
Searching...
No Matches
LmmsPalette.h
Go to the documentation of this file.
1/*
2 * LmmsPalette.h - dummy class for fetching palette qproperties from CSS
3 *
4 *
5 * Copyright (c) 2007-2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
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_PALETTE_H
27#define LMMS_GUI_LMMS_PALETTE_H
28
29#include <QWidget>
30#include "lmms_export.h"
31
32namespace lmms::gui
33{
34
35
36class LMMS_EXPORT LmmsPalette : public QWidget
37{
38 Q_OBJECT
39 Q_PROPERTY( QColor background READ background WRITE setBackground )
40 Q_PROPERTY( QColor windowText READ windowText WRITE setWindowText )
41 Q_PROPERTY( QColor base READ base WRITE setBase )
42 Q_PROPERTY( QColor text READ text WRITE setText )
43 Q_PROPERTY( QColor button READ button WRITE setButton )
44 Q_PROPERTY( QColor shadow READ shadow WRITE setShadow )
45 Q_PROPERTY( QColor buttonText READ buttonText WRITE setButtonText )
46 Q_PROPERTY( QColor brightText READ brightText WRITE setBrightText )
47 Q_PROPERTY( QColor highlight READ highlight WRITE setHighlight )
48 Q_PROPERTY( QColor highlightedText READ highlightedText WRITE setHighlightedText )
49
50public:
51 LmmsPalette( QWidget * parent, QStyle * stylearg );
52 ~LmmsPalette() override = default;
53
54#define ACCESSMET( read, write ) \
55 QColor read () const; \
56 void write ( const QColor & c ); \
57
58
59 ACCESSMET( background, setBackground )
60 ACCESSMET( windowText, setWindowText )
61 ACCESSMET( base, setBase )
62 ACCESSMET( text, setText )
63 ACCESSMET( button, setButton )
64 ACCESSMET( shadow, setShadow )
65 ACCESSMET( buttonText, setButtonText )
66 ACCESSMET( brightText, setBrightText )
67 ACCESSMET( highlight, setHighlight )
68 ACCESSMET( highlightedText, setHighlightedText )
69
70#undef ACCESSMET
71
72 QPalette palette() const;
73
74private:
77 QColor m_base;
78 QColor m_text;
79 QColor m_button;
80 QColor m_shadow;
85};
86
87
88} // namespace lmms::gui
89
90#endif // LMMS_GUI_LMMS_PALETTE_H
#define READ(addr)
Definition Ay_Cpu.cpp:92
#define WRITE(addr, data)
Definition Ay_Cpu.cpp:93
#define override
Definition DistrhoDefines.h:73
#define ACCESSMET(read, write)
Definition LmmsPalette.cpp:55
QColor m_buttonText
Definition LmmsPalette.h:81
QColor m_background
Definition LmmsPalette.h:75
QColor text
Definition LmmsPalette.h:42
QColor base
Definition LmmsPalette.h:41
QColor m_base
Definition LmmsPalette.h:77
QColor button
Definition LmmsPalette.h:43
QColor m_shadow
Definition LmmsPalette.h:80
QColor m_button
Definition LmmsPalette.h:79
LmmsPalette(QWidget *parent, QStyle *stylearg)
Definition LmmsPalette.cpp:34
QColor m_windowText
Definition LmmsPalette.h:76
QColor m_brightText
Definition LmmsPalette.h:82
QColor shadow
Definition LmmsPalette.h:44
QColor highlightedText
Definition LmmsPalette.h:48
QColor m_text
Definition LmmsPalette.h:78
QColor background
Definition LmmsPalette.h:39
QColor m_highlight
Definition LmmsPalette.h:83
QColor highlight
Definition LmmsPalette.h:47
QColor m_highlightedText
Definition LmmsPalette.h:84
QColor windowText
Definition LmmsPalette.h:40
QColor brightText
Definition LmmsPalette.h:46
QColor buttonText
Definition LmmsPalette.h:45
static uintptr_t parent
Definition pugl.h:1644
Definition AudioPortAudio.cpp:223
const char * text
Definition swell-functions.h:167