2007-08-21 18:24:55 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 by Dominik Wenger
|
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2007-08-21 18:24:55 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef PREVIEW_H
|
|
|
|
#define PREVIEW_H
|
|
|
|
|
2013-01-27 11:01:56 +00:00
|
|
|
#include <QDialog>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QTimer>
|
|
|
|
|
2007-08-21 18:24:55 +00:00
|
|
|
#include "ui_previewfrm.h"
|
|
|
|
|
|
|
|
|
|
|
|
class PreviewDlg : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
PreviewDlg(QWidget *parent = 0);
|
2007-09-15 22:57:07 +00:00
|
|
|
void setPixmap(QPixmap p);
|
2007-08-21 18:24:55 +00:00
|
|
|
void setText(QString text);
|
2007-09-15 22:57:07 +00:00
|
|
|
|
2007-08-21 18:24:55 +00:00
|
|
|
private slots:
|
2011-10-02 14:30:05 +00:00
|
|
|
void changeEvent(QEvent *event);
|
2007-08-21 18:24:55 +00:00
|
|
|
void mouseMoveEvent(QMouseEvent * event);
|
|
|
|
void leaveEvent(QEvent * event);
|
2007-09-15 22:57:07 +00:00
|
|
|
|
2007-08-21 18:24:55 +00:00
|
|
|
private:
|
|
|
|
Ui::PreviewFrm ui;
|
2007-09-15 22:57:07 +00:00
|
|
|
|
|
|
|
|
2007-08-21 18:24:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class PreviewLabel : public QLabel
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2007-09-15 22:57:07 +00:00
|
|
|
|
2007-08-21 18:24:55 +00:00
|
|
|
public:
|
|
|
|
PreviewLabel(QWidget * parent = 0, Qt::WindowFlags f = 0);
|
2007-09-15 22:57:07 +00:00
|
|
|
|
2007-08-21 18:24:55 +00:00
|
|
|
void setPixmap(QPixmap p);
|
|
|
|
void setText(QString text);
|
|
|
|
private slots:
|
|
|
|
void mouseMoveEvent(QMouseEvent * event);
|
|
|
|
void enterEvent(QEvent * event);
|
|
|
|
void leaveEvent(QEvent * event);
|
|
|
|
void timeout();
|
2007-09-15 22:57:07 +00:00
|
|
|
|
2007-08-21 18:24:55 +00:00
|
|
|
private:
|
|
|
|
QTimer hovertimer;
|
|
|
|
int mousex;
|
|
|
|
int mousey;
|
|
|
|
PreviewDlg* preview;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|