removed PrefixPath debug line
[opentx.git] / companion / src / splashlabel.h
blobd82b23e4f9adedf6e061324c7072b5511ec31097
1 /*
2 * Author - Bertrand Songis <bsongis@gmail.com>
3 *
4 * Based on th9x -> http://code.google.com/p/th9x/
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #ifndef SPLASHLABEL_H
17 #define SPLASHLABEL_H
19 #include <QLabel>
20 #include <QWidget>
21 #include <QtGui>
23 class splashLabel : public QLabel
26 Q_OBJECT
28 public:
30 explicit splashLabel(QDialog * parent = 0) :
31 QLabel(parent)
35 virtual void setId(int labelindex)
37 index = labelindex;
40 virtual int getId()
42 return index;
45 protected:
47 virtual void mousePressEvent(QMouseEvent * event)
49 if (event->type() == QEvent::MouseButtonDblClick) {
50 emit buttonPressed(Qt::Key_Enter);
52 else {
53 emit buttonPressed(Qt::Key_Select);
55 // QWidget::mousePressEvent(event);
58 virtual void mouseReleaseEvent(QMouseEvent * event)
60 setFocus();
61 // emit buttonPressed(0);
62 // QWidget::mouseReleaseEvent(event);
66 /*void paintEvent(QPaintEvent *)
68 QStyleOption opt;
69 opt.init(this);
70 QPainter p(this);
71 style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
74 signals:
75 void buttonPressed(int button);
77 private:
78 int index;
80 #endif /* SPLASHLABEL_H */