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 <QMimeData>
14
#include <QStringList>
15
16
#include <vector>
17
18
namespace
dbse
{
19
20
class
CustomTableModel
:
public
QAbstractTableModel
21
{
22
Q_OBJECT
23
public
:
24
explicit
CustomTableModel
(QStringList Headers, QObject* parent =
nullptr
);
25
~CustomTableModel
();
26
int
rowCount
(
const
QModelIndex& parent)
const
;
27
int
columnCount
(
const
QModelIndex& parent)
const
;
28
Qt::ItemFlags
flags
(
const
QModelIndex& index)
const
;
29
QVariant
headerData
(
int
section, Qt::Orientation orientation,
int
role)
const
;
30
QVariant
data
(
const
QModelIndex& index,
int
role)
const
;
31
QStringList
getRowFromIndex
(QModelIndex& index);
32
void
setupModel
();
34
QStringList
mimeTypes
()
const
;
35
QMimeData*
mimeData
(
const
QModelIndexList& indexes)
const
;
36
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:124
dbse::CustomTableModel::data
QVariant data(const QModelIndex &index, int role) const
Definition
SchemaCustomTableModel.cpp:60
dbse::CustomTableModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role) const
Definition
SchemaCustomTableModel.cpp:46
dbse::CustomTableModel::CustomTableModel
CustomTableModel(QStringList Headers, QObject *parent=nullptr)
Definition
SchemaCustomTableModel.cpp:15
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:32
dbse::CustomTableModel::mimeTypes
QStringList mimeTypes() const
Drag/Drop Handlers.
Definition
SchemaCustomTableModel.cpp:116
dbse::CustomTableModel::setupModel
void setupModel()
Definition
SchemaCustomTableModel.cpp:89
dbse::CustomTableModel::m_data
QList< QList< QString > > m_data
Definition
SchemaCustomTableModel.hpp:39
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:39
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:13
Generated on
for DUNE-DAQ by
1.18.0