LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
dndactionsmixin.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 <utility>
12
#include <QAbstractItemModel>
13
14
namespace
LC::Util
15
{
34
template
<
typename
Model>
35
class
DndActionsMixin
:
public
Model
36
{
37
Qt::DropActions Drags_;
38
Qt::DropActions Drops_;
39
public
:
48
template
<
typename
... Args>
49
explicit
DndActionsMixin
(Args&&... args)
50
:
Model
{ std::forward<Args> (args)... }
51
, Drags_ {
Model
::
supportedDragActions
() }
52
, Drops_ {
Model
::
supportedDropActions
() }
53
{
54
}
55
56
Qt::DropActions
supportedDragActions
()
const override
57
{
58
return
Drags_;
59
}
60
61
void
setSupportedDragActions
(Qt::DropActions acts)
62
{
63
Drags_ = acts;
64
}
65
66
Qt::DropActions
supportedDropActions
()
const override
67
{
68
return
Drops_;
69
}
70
71
void
setSupportedDropActions
(Qt::DropActions acts)
72
{
73
Drops_ = acts;
74
}
75
};
76
}
LC::Util::DndActionsMixin::supportedDropActions
Qt::DropActions supportedDropActions() const override
Definition
dndactionsmixin.h:66
LC::Util::DndActionsMixin::DndActionsMixin
DndActionsMixin(Args &&... args)
Constructs the model passing the arguments to the base constructor.
Definition
dndactionsmixin.h:49
LC::Util::DndActionsMixin::setSupportedDragActions
void setSupportedDragActions(Qt::DropActions acts)
Definition
dndactionsmixin.h:61
LC::Util::DndActionsMixin::supportedDragActions
Qt::DropActions supportedDragActions() const override
Definition
dndactionsmixin.h:56
LC::Util::DndActionsMixin::setSupportedDropActions
void setSupportedDropActions(Qt::DropActions acts)
Definition
dndactionsmixin.h:71
LC::Util
Definition
icoreproxy.h:34
LC::Model
@ Model
The human-readable name of the device model (QString).
Definition
deviceroles.h:107
src
util
models
dndactionsmixin.h
Generated by
1.17.0