fix build
[kugel-rb.git] / rbutil / rbutilqt / preview.h
blob14714af089619feacb6d9545842cc9a03e396d3f
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id$
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef PREVIEW_H
23 #define PREVIEW_H
25 #include <QtGui>
26 #include "ui_previewfrm.h"
29 class PreviewDlg : public QDialog
31 Q_OBJECT
33 public:
34 PreviewDlg(QWidget *parent = 0);
35 void setPixmap(QPixmap p);
36 void setText(QString text);
38 private slots:
39 void mouseMoveEvent(QMouseEvent * event);
40 void leaveEvent(QEvent * event);
42 private:
43 Ui::PreviewFrm ui;
49 class PreviewLabel : public QLabel
51 Q_OBJECT
53 public:
54 PreviewLabel(QWidget * parent = 0, Qt::WindowFlags f = 0);
56 void setPixmap(QPixmap p);
57 void setText(QString text);
58 private slots:
59 void mouseMoveEvent(QMouseEvent * event);
60 void enterEvent(QEvent * event);
61 void leaveEvent(QEvent * event);
62 void timeout();
64 private:
65 QTimer hovertimer;
66 int mousex;
67 int mousey;
68 PreviewDlg* preview;
72 #endif