-
Notifications
You must be signed in to change notification settings - Fork 2
/
presstyle.h
executable file
·69 lines (65 loc) · 2.34 KB
/
presstyle.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* Copyright 2016 Pascal COMBES <[email protected]>
*
* This file is part of ProSlideShower.
*
* ProSlideShower is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProSlideShower is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProSlideShower. If not, see <http://www.gnu.org/licenses/>
*/
#ifndef PRESSTYLE_H
#define PRESSTYLE_H
#include <QProxyStyle>
/*!
* \brief The PresStyle class is a style for painting presentation widgets.
*
* This class defines a style to paint nice presentation widgets,
* which are easy to read, but do no catch the eye too much.
* The default wiget background is black while the foreground is white.
*
* Currently, only the progress bar drawing is tuned.
*/
class PresStyle : public QProxyStyle
{
public:
/*!
* \brief Constructor
*
* Calls the parent constructor.
* \param base The base style.
*/
inline PresStyle(QStyle* base = NULL) :
QProxyStyle(base) {}
#if QT_VERSION >= 0x050000
/*!
* \brief Constructor
*
* Calls the parent constructor.
* \param key The kay for the base style.
*/
inline PresStyle(const QString& key) :
QProxyStyle(key) {}
#endif
void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = NULL) const;
/*!
* \brief Draw a control
*
* This function overrides the base function.
* It only tunes the draving of the progress bar (label, groove and contents).
* See <tt>QStyle::drawControl()</tt> for more information.
* \param element The element to draw.
* \param option Options for drawing the element.
* \param painter Painter to be used when drawing.
* \param widget An aid for drawing the control.
*/
void drawControl(ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget = NULL) const;
};
#endif // PRESSTYLE_H