LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
rolenamesmixin.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 <QHash>
13
14
namespace
LC::Util
15
{
29
template
<
typename
Model>
30
class
RoleNamesMixin :
public
Model
31
{
32
QHash<int, QByteArray> RoleNames_;
33
protected
:
34
using
Model::Model
;
35
42
void
setRoleNames
(
const
QHash<int, QByteArray>&
roleNames
)
43
{
44
RoleNames_ =
roleNames
;
45
}
46
56
QHash<int, QByteArray>
roleNames
()
const override
57
{
58
return
RoleNames_;
59
}
60
};
61
}
LC::Util
Definition:
icoreproxy.h:33
LC::Util::RoleNamesMixin::setRoleNames
void setRoleNames(const QHash< int, QByteArray > &roleNames)
Sets the role names to roleNames.
Definition:
rolenamesmixin.h:54
LC::Util::RoleNamesMixin::roleNames
QHash< int, QByteArray > roleNames() const override
Returns the role names.
Definition:
rolenamesmixin.h:68
LC::Model
@ Model
The human-readable name of the device model (QString).
Definition:
deviceroles.h:103
src
util
models
rolenamesmixin.h
Generated by
1.8.17