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

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

#include "dndactionsmixin.h"

+ Inheritance diagram for LC::Util::DndActionsMixin< Model >:
+ Collaboration diagram for LC::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 LC::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 42 of file dndactionsmixin.h.

Constructor & Destructor Documentation

◆ DndActionsMixin()

template<typename Model >
template<typename... Args>
LC::Util::DndActionsMixin< Model >::DndActionsMixin ( Args &&...  args)
inlineexplicit

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 62 of file dndactionsmixin.h.

Member Function Documentation

◆ setSupportedDragActions()

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

Definition at line 74 of file dndactionsmixin.h.

◆ setSupportedDropActions()

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

Definition at line 84 of file dndactionsmixin.h.

◆ supportedDragActions()

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

Definition at line 69 of file dndactionsmixin.h.

◆ supportedDropActions()

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

Definition at line 79 of file dndactionsmixin.h.


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