generate moc
[kdenetwork.git] / krdc / kfullscreenpanel.h
blob7faa3136bb280220996a72b66e9880103bb23b3a
1 /***************************************************************************
2 kfullscreenpanel.cpp - auto-hideable toolbar
3 -------------------
4 begin : Tue May 13 23:07:42 CET 2002
5 copyright : (C) 2002 by Tim Jansen
6 email : tim@tjansen.de
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #ifndef KFULLSCREENPANEL_H
19 #define KFULLSCREENPANEL_H
21 #include <QWidget>
22 #include <QTimer>
24 class QVBoxLayout;
25 class QEvent;
27 class Counter : public QObject {
28 Q_OBJECT
29 private:
30 QTimer m_timer;
31 float m_stopValue, m_currentValue, m_stepSize;
32 int m_timeoutMs;
34 public:
35 Counter(float start);
37 void count(float stop, float stepSize, float frequency);
38 private slots:
39 void timeout();
41 signals:
42 void countingDownFinished();
43 void countingUpFinished();
44 void counted(float value);
48 class KFullscreenPanel : public QWidget {
49 Q_OBJECT
50 private:
51 QWidget *m_child;
52 QVBoxLayout *m_layout;
53 QSize m_fsResolution;
54 Counter m_counter;
56 void doLayout();
58 public:
59 KFullscreenPanel(QWidget* parent, const char *name,
60 const QSize &resolution);
61 ~KFullscreenPanel();
63 void setChild(QWidget *child);
64 void startShow();
65 void startHide();
67 protected:
68 void enterEvent(QEvent *e);
69 void leaveEvent(QEvent *e);
71 private slots:
72 void movePanel(float posY);
74 signals:
75 void mouseEnter();
76 void mouseLeave();
79 #endif