DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
include
dbe
SchemaCustomTableModel.hpp
Go to the documentation of this file.
1
// DUNE DAQ modification notice:
2
// This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
3
// Fork baseline commit: dbe-02-12-17 (2022-05-12).
4
// Renamed since fork: yes (from dbe/SchemaCustomTableModel.h to include/dbe/SchemaCustomTableModel.hpp).
5
6
#ifndef CUSTOMTABLEMODEL_H
7
#define CUSTOMTABLEMODEL_H
8
10
#include <QAbstractTableModel>
11
#include <QBrush>
12
#include <QColor>
13
#include <QStringList>
14
#include <QMimeData>
15
16
#include <vector>
17
18
namespace
dbse
19
{
20
21
class
CustomTableModel
:
public
QAbstractTableModel
22
{
23
Q_OBJECT
24
public
:
25
explicit
CustomTableModel
( QStringList Headers, QObject * parent =
nullptr
);
26
~CustomTableModel
();
27
int
rowCount
(
const
QModelIndex & parent )
const
;
28
int
columnCount
(
const
QModelIndex & parent )
const
;
29
Qt::ItemFlags
flags
(
const
QModelIndex & index )
const
;
30
QVariant
headerData
(
int
section, Qt::Orientation orientation,
int
role )
const
;
31
QVariant
data
(
const
QModelIndex & index,
int
role )
const
;
32
QStringList
getRowFromIndex
( QModelIndex & index );
33
void
setupModel
();
35
QStringList
mimeTypes
()
const
;
36
QMimeData *
mimeData
(
const
QModelIndexList & indexes )
const
;
37
private
:
38
QStringList
HeaderList
;
39
QList<QList<QString>>
m_data
;
40
QList<QList<QString>>
m_tooltips
;
41
std::vector<QBrush>
m_brushes
;
42
std::vector<QColor>
m_backgrounds
;
43
};
44
45
}
// namespace dbse
46
#endif
// CUSTOMTABLEMODEL_H
dbse::CustomTableModel::rowCount
int rowCount(const QModelIndex &parent) const
Definition
SchemaCustomTableModel.cpp:25
dbse::CustomTableModel::mimeData
QMimeData * mimeData(const QModelIndexList &indexes) const
Definition
SchemaCustomTableModel.cpp:125
dbse::CustomTableModel::data
QVariant data(const QModelIndex &index, int role) const
Definition
SchemaCustomTableModel.cpp:59
dbse::CustomTableModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role) const
Definition
SchemaCustomTableModel.cpp:43
dbse::CustomTableModel::CustomTableModel
CustomTableModel(QStringList Headers, QObject *parent=nullptr)
Definition
SchemaCustomTableModel.cpp:14
dbse::CustomTableModel::m_tooltips
QList< QList< QString > > m_tooltips
Definition
SchemaCustomTableModel.hpp:40
dbse::CustomTableModel::HeaderList
QStringList HeaderList
Definition
SchemaCustomTableModel.hpp:38
dbse::CustomTableModel::columnCount
int columnCount(const QModelIndex &parent) const
Definition
SchemaCustomTableModel.cpp:31
dbse::CustomTableModel::mimeTypes
QStringList mimeTypes() const
Drag/Drop Handlers.
Definition
SchemaCustomTableModel.cpp:118
dbse::CustomTableModel::setupModel
void setupModel()
Definition
SchemaCustomTableModel.cpp:89
dbse::CustomTableModel::m_data
QList< QList< QString > > m_data
Definition
SchemaCustomTableModel.hpp:39
dbse::CustomTableModel::~CustomTableModel
~CustomTableModel()
Definition
SchemaCustomTableModel.cpp:21
dbse::CustomTableModel::m_backgrounds
std::vector< QColor > m_backgrounds
Definition
SchemaCustomTableModel.hpp:42
dbse::CustomTableModel::flags
Qt::ItemFlags flags(const QModelIndex &index) const
Definition
SchemaCustomTableModel.cpp:37
dbse::CustomTableModel::m_brushes
std::vector< QBrush > m_brushes
Definition
SchemaCustomTableModel.hpp:41
dbse::CustomTableModel::getRowFromIndex
QStringList getRowFromIndex(QModelIndex &index)
Definition
SchemaCustomTableModel.cpp:79
dbse
Including QT Headers.
Definition
SchemaAttributeEditor.hpp:14
Generated on
for DUNE-DAQ by
1.17.0