LeechCraft  0.6.70-10870-g558588d6ec
Modular cross-platform feature rich live environment.
LeechCraft::Util::DndActionsMixin< Model > Class Template Reference

Abstracts away differences between Qt4 and Qt5 in model DnD support. More...

#include "dndactionsmixin.h"

+ Inheritance diagram for LeechCraft::Util::DndActionsMixin< Model >:
+ Collaboration diagram for LeechCraft::Util::DndActionsMixin< Model >:

Public Member Functions

template<typename... Args>
 DndActionsMixin (Args &&... args)
 Constructs the model passing the arguments to the base constructor. More...
 
Qt::DropActions supportedDragActions () const override
 
void setSupportedDragActions (Qt::DropActions acts)
 
Qt::DropActions supportedDropActions () const override
 
void setSupportedDropActions (Qt::DropActions acts)
 

Detailed Description

template<typename Model>
class LeechCraft::Util::DndActionsMixin< Model >

Abstracts away differences between Qt4 and Qt5 in model DnD support.

Derive from this class (and parametrize the template by desired base class like QStandardItemModel or QAbstractItemModel) to obtain Qt4-style getter and setter functions for supported drag and drop actions (supportedDragActions(), setSupportedDragActions(), supportedDropActions(), setSupportedDropActions()).

Template Parameters
ModelThe source model type that you wish to derive from.
See also
supportedDragActions()
setSupportedDragActions()
supportedDropActions()
setSupportedDropActions()

Definition at line 59 of file dndactionsmixin.h.

Constructor & Destructor Documentation

◆ DndActionsMixin()

template<typename Model >
template<typename... Args>
LeechCraft::Util::DndActionsMixin< Model >::DndActionsMixin ( Args &&...  args)
inline

Constructs the model passing the arguments to the base constructor.

Parameters
[in]argsThe list of parameters to pass to the constructor of the base Model.
Template Parameters
ArgsThe variadic template parameter pack of arguments for the base Model constructor.

Definition at line 73 of file dndactionsmixin.h.

Member Function Documentation

◆ setSupportedDragActions()

template<typename Model >
void LeechCraft::Util::DndActionsMixin< Model >::setSupportedDragActions ( Qt::DropActions  acts)
inline

Definition at line 85 of file dndactionsmixin.h.

◆ setSupportedDropActions()

template<typename Model >
void LeechCraft::Util::DndActionsMixin< Model >::setSupportedDropActions ( Qt::DropActions  acts)
inline

Definition at line 95 of file dndactionsmixin.h.

◆ supportedDragActions()

template<typename Model >
Qt::DropActions LeechCraft::Util::DndActionsMixin< Model >::supportedDragActions ( ) const
inlineoverride

Definition at line 80 of file dndactionsmixin.h.

◆ supportedDropActions()

template<typename Model >
Qt::DropActions LeechCraft::Util::DndActionsMixin< Model >::supportedDropActions ( ) const
inlineoverride

Definition at line 90 of file dndactionsmixin.h.


The documentation for this class was generated from the following file: