Handle language change events in widgets.
[maemo-rb.git] / rbutil / rbutilqt / preview.h
blob75927f76d9f0d858c403ba4acee4fa2251e98bd0
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
21 #ifndef PREVIEW_H
22 #define PREVIEW_H
24 #include <QtGui>
25 #include "ui_previewfrm.h"
28 class PreviewDlg : public QDialog
30 Q_OBJECT
32 public:
33 PreviewDlg(QWidget *parent = 0);
34 void setPixmap(QPixmap p);
35 void setText(QString text);
37 private slots:
38 void changeEvent(QEvent *event);
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