Qt
Components
pqScalarSetModel.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2
// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3
// SPDX-License-Identifier: BSD-3-Clause
4
5
#ifndef pqScalarSetModel_h
6
#define pqScalarSetModel_h
7
8
#include "
pqComponentsModule.h
"
9
10
#include <QAbstractListModel>
11
15
class
PQCOMPONENTS_EXPORT
pqScalarSetModel
:
public
QAbstractListModel
16
{
17
typedef
QAbstractListModel base;
18
19
Q_OBJECT
20
21
public
:
22
pqScalarSetModel
();
23
~
pqScalarSetModel
()
override
;
24
28
void
clear();
32
QModelIndex insert(
double
value
);
36
void
erase(
double
value);
40
void
erase(
int
row);
44
QList<double> values();
45
48
void
setFormat(
char
f,
int
precision = 3);
49
50
QVariant
data
(
const
QModelIndex&
index
,
int
role = Qt::DisplayRole)
const override
;
51
Qt::ItemFlags flags(
const
QModelIndex& index)
const override
;
52
int
rowCount(
const
QModelIndex& parent = QModelIndex())
const override
;
53
bool
setData(
const
QModelIndex& index,
const
QVariant& value,
int
role = Qt::EditRole)
override
;
54
60
void
setPreserveOrder(
bool
);
61
bool
preserveOrder()
const
;
62
63
private
:
64
class
pqImplementation;
65
pqImplementation*
const
Implementation;
66
};
67
68
#endif // !pqScalarSetModel_h
data
data
pqComponentsModule.h
PQCOMPONENTS_EXPORT
#define PQCOMPONENTS_EXPORT
Definition:
pqComponentsModule.h:15
pqScalarSetModel
Qt model that stores a sorted collection of unique floating-point numbers.
Definition:
pqScalarSetModel.h:15
value
value
index
index
Generated by
1.8.13 on Tue Oct 1 2024