LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
unhoverdeletemixin.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
#include <optional>
12
#include <QObject>
13
#include "
guiconfig.h
"
14
15
class
QTimer;
16
17
namespace
LC
18
{
19
namespace
Util
20
{
42
class
UnhoverDeleteMixin
:
public
QObject
43
{
44
QTimer *LeaveTimer_;
45
bool
ContainsMouse_ =
false
;
46
public
:
54
UTIL_GUI_API
explicit
UnhoverDeleteMixin
(QObject *parent,
const
char
*slot = SLOT (deleteLater ()));
55
68
void
UTIL_GUI_API
Start
(std::optional<int> timeout = {});
69
86
void
UTIL_GUI_API
Stop
();
87
protected
:
88
bool
eventFilter
(QObject*, QEvent*)
override
;
89
};
90
}
91
}
LC::Util::UnhoverDeleteMixin::Start
void UTIL_GUI_API Start(std::optional< int > timeout={})
Manually starts the timer.
Definition:
unhoverdeletemixin.cpp:46
LC::Util::UnhoverDeleteMixin
Allows to hide a widget or popup after mouse leave.
Definition:
unhoverdeletemixin.h:42
UTIL_GUI_API
#define UTIL_GUI_API
Definition:
guiconfig.h:16
LC::Util::UnhoverDeleteMixin::Stop
void UTIL_GUI_API Stop()
Stops the previously started timer.
Definition:
unhoverdeletemixin.cpp:52
LC
Definition:
constants.h:14
LC::Util::UnhoverDeleteMixin::UnhoverDeleteMixin
UTIL_GUI_API UnhoverDeleteMixin(QObject *parent, const char *slot=SLOT(deleteLater()))
Creates the mixin for the given parent widget.
Definition:
unhoverdeletemixin.cpp:25
LC::Util::UnhoverDeleteMixin::eventFilter
bool eventFilter(QObject *, QEvent *) override
Definition:
unhoverdeletemixin.cpp:57
guiconfig.h
src
util
gui
unhoverdeletemixin.h
Generated by
1.8.17