add more spacing
[personal-kdebase.git] / workspace / kcontrol / input / xcursor / previewwidget.h
blobf4d2c4e031660c23ed3b61e69e88785f9d1232e9
1 /*
2 * Copyright © 2003-2007 Fredrik Höglund <fredrik@kde.org>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License version 2 as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; see the file COPYING. If not, write to
15 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
19 #ifndef PREVIEWWIDGET_H
20 #define PREVIEWWIDGET_H
22 #include <QWidget>
24 class CursorTheme;
25 class PreviewCursor;
27 class PreviewWidget : public QWidget
29 public:
30 PreviewWidget(QWidget *parent);
31 ~PreviewWidget();
33 void setTheme(const CursorTheme *theme);
34 void setUseLables(bool);
35 QSize sizeHint() const;
37 protected:
38 void paintEvent(QPaintEvent *);
39 void mouseMoveEvent(QMouseEvent *);
40 void resizeEvent(QResizeEvent *);
42 private:
43 void layoutItems();
45 QList<PreviewCursor*> list;
46 const PreviewCursor *current;
47 bool needLayout:1;
50 #endif // PREVIEWWIDGET_H