LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
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
15class QTimer;
16
17namespace LC
18{
19namespace 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}
void UTIL_GUI_API Start(std::optional< int > timeout={})
Manually starts the timer.
void UTIL_GUI_API Stop()
Stops the previously started timer.
bool eventFilter(QObject *, QEvent *) override
UTIL_GUI_API UnhoverDeleteMixin(QObject *parent, const char *slot=SLOT(deleteLater()))
Creates the mixin for the given parent widget.
#define UTIL_GUI_API
Definition guiconfig.h:16
Definition constants.h:15