1 /*******************************************************************************
4 This file is part of mDictionary.
6 mDictionary is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 mDictionary is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with mDictionary. If not, see <http://www.gnu.org/licenses/>.
19 Copyright 2010 Comarch S.A.
21 *******************************************************************************/
22 //! \file WordListProxyStyle.h
23 //! \brief Implements custom style which draws checkboxes as stars
24 //! \author Mateusz Półrola <mateusz.polrola@comarch.pl>
26 #ifndef WORDLISTPROXYSTYLE_H
27 #define WORDLISTPROXYSTYLE_H
29 #include <QProxyStyle>
32 //! Custom proxy style that draws checkboxes as stars.
33 //! It will automatically wrap set style and change only
34 //! checkboxes drawing.
35 class WordListProxyStyle : public QProxyStyle
39 //! Reimplemented drawPrimitive method which only draws different
40 //! PE_IndicatorCheckBox elements
41 //! \sa QProxyStyle::drawPrimitive()
42 void drawPrimitive(PrimitiveElement element,
43 const QStyleOption *option,
45 const QWidget *widget) const;
49 QPixmap starPixmapOff;
52 #endif // WORDLISTPROXYSTYLE_H