Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / kcontrol / style / menupreview.h
blob47a47225e7e89461422ca03392757d953c90bf63
1 /*
2 * Menu Transparency Preview Widget
3 * Copyright (C) 2002 Karol Szwed <gallium@kde.org>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public
7 * License version 2 as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef __MENUPREVIEW_H
21 #define __MENUPREVIEW_H
23 #include <QWidget>
25 class MenuPreview : public QWidget
27 Q_OBJECT
29 public:
30 enum PreviewMode {
31 NoEffect = 0,
32 Tint,
33 Blend
36 MenuPreview( QWidget* parent, int opacity, PreviewMode pvm );
37 ~MenuPreview();
39 public Q_SLOTS:
40 void setOpacity( int opacity );
41 void setPreviewMode( PreviewMode pvm );
43 protected:
44 void paintEvent( QPaintEvent* pe );
46 private:
47 void createPixmaps();
48 void blendPixmaps();
50 QPixmap* pixBackground;
51 QPixmap* pixOverlay;
52 QPixmap* pixBlended;
53 float menuOpacity;
54 PreviewMode mode;
57 // vim: set noet ts=4:
58 #endif // __MENUPREVIEW_H