Qx
v0.5.8
Qt Extensions Library
Loading...
Searching...
No Matches
qx-standarditemmodel.h
1
#ifndef QX_STANDARDITEMMODEL_H
2
#define QX_STANDARDITEMMODEL_H
3
4
// Shared Lib Support
5
#include "qx/widgets/qx_widgets_export.h"
6
7
// Qt Includes
8
#include <QStandardItemModel>
9
10
namespace
Qx
11
{
12
13
class
QX_WIDGETS_EXPORT
StandardItemModel
:
public
QStandardItemModel
14
{
15
//-Instance Members---------------------------------------------------------------------------------------------------
16
private
:
17
bool
mUpdatingParentTristate =
false
;
18
bool
mAutoTristate =
false
;
19
20
//-Constructor-------------------------------------------------------------------------------------------------------
21
public
:
22
StandardItemModel
(
int
rows,
int
columns,
QObject
*parent =
nullptr
);
23
StandardItemModel
(
QObject
*parent =
nullptr
);
24
25
//-Instance Functions-----------------------------------------------------------------------------------------------
26
private
:
27
void
autoTristateChildren(
QStandardItem
* changingItem,
const
QVariant
& value,
int
role);
28
void
autoTristateParents(
QStandardItem
* changingItem,
const
QVariant
& changingValue);
29
30
public
:
31
virtual
bool
setData(
const
QModelIndex
& index,
const
QVariant
& value,
int
role =
Qt::EditRole
);
32
bool
isAutoTristate();
33
void
setAutoTristate(
bool
autoTristate);
34
void
forEachItem(std::function<
void
(
QStandardItem
*)>
const
& func,
QModelIndex
parent =
QModelIndex
());
35
36
void
selectAll();
37
void
selectNone();
38
};
39
40
}
41
42
#endif
// QX_STANDARDITEMMODEL_H
Qx::StandardItemModel
The StandardItemModel class is a more robust variant of QStandardItemModel, which is a generic model ...
Definition
qx-standarditemmodel.h:14
Qx
The Qx namespace is the main namespace through which all non-global functionality of the Qx library i...
Definition
qx-processwaiter.cpp:5
QModelIndex
QObject
QStandardItem
QStandardItemModel
Qt::EditRole
EditRole
QVariant
lib
widgets
include
qx
widgets
qx-standarditemmodel.h
Generated by
1.10.0