kcursor_private.h
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 #ifndef KCURSOR_PRIVATE_H
00022 #define KCURSOR_PRIVATE_H
00023 
00024 #include <qcursor.h>
00025 #include <qobject.h>
00026 #include <qptrdict.h>
00027 
00028 class QPoint;
00029 class QTimer;
00030 class QWidget;
00031 
00039 class KCursorPrivateAutoHideEventFilter : public QObject
00040 {
00041     Q_OBJECT
00042 
00043 public:
00044     KCursorPrivateAutoHideEventFilter( QWidget* widget );
00045     ~KCursorPrivateAutoHideEventFilter();
00046 
00047     virtual bool eventFilter( QObject *o, QEvent *e );
00048     
00049     void resetWidget();
00050 
00051 private slots:
00052     void hideCursor();
00053     void unhideCursor();
00054 
00055 private:
00056     QWidget* actualWidget() const;
00057 
00058     QTimer m_autoHideTimer;
00059     QWidget* m_widget;
00060     bool m_wasMouseTracking;
00061     bool m_isCursorHidden;
00062     bool m_isOwnCursor;
00063     QCursor m_oldCursor;
00064 };
00065 
00071 class KCursorPrivate : public QObject
00072 {
00073     friend class KCursor; 
00074     Q_OBJECT
00075 
00076 public:
00077     static KCursorPrivate *self();
00078 
00079     void setAutoHideCursor( QWidget *w, bool enable, bool customEventFilter );
00080     virtual bool eventFilter( QObject *o, QEvent *e );
00081 
00082     int hideCursorDelay;
00083 
00084 private slots:
00085     void slotWidgetDestroyed( QObject* );
00086 
00087 private:
00088     KCursorPrivate();
00089     ~KCursorPrivate();
00090 
00091     bool enabled;
00092     static KCursorPrivate *s_self;
00093 
00094     QPtrDict<KCursorPrivateAutoHideEventFilter> m_eventFilters;
00095 };
00096 
00097 
00098 
00099 #endif // KCURSOR_PRIVATE_H
 
This file is part of the documentation for kdeui Library Version 3.2.0.