2
* This file is part of unity-2d
4
* Copyright 2011 Canonical Ltd.
7
* - Aurélien Gâteau <aurelien.gateau@canonical.com>
8
* - Florian Boucault <florian.boucault@canonical.com>
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; version 3.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program. If not, see <http://www.gnu.org/licenses/>.
22
#ifndef AUTOHIDEBEHAVIOR_H
23
#define AUTOHIDEBEHAVIOR_H
26
#include <abstractvisibilitybehavior.h>
31
class EdgeHitDetector;
36
* This class implements the classic autohide-on-timeout behavior
38
class AutoHideBehavior : public AbstractVisibilityBehavior
42
Q_PROPERTY(QWidget* panel READ panel WRITE setPanel NOTIFY panelChanged)
45
AutoHideBehavior(QWidget* panel=0);
49
void setPanel(QWidget *panel);
52
void panelChanged(QWidget *panel);
55
bool eventFilter(QObject*, QEvent*);
60
void onShowingDesktopChanged();
63
QTimer* m_autohideTimer;
64
EdgeHitDetector* m_edgeHitDetector;
66
void createEdgeHitDetector();
69
#endif /* AUTOHIDEBEHAVIOR_H */