#include <SchemaCustomTableModel.hpp>
Definition at line 12 of file SchemaCustomTableModel.hpp.
◆ CustomTableModel()
dbse::CustomTableModel::CustomTableModel |
( |
QStringList | Headers, |
|
|
QObject * | parent = nullptr ) |
|
explicit |
◆ ~CustomTableModel()
dbse::CustomTableModel::~CustomTableModel |
( |
| ) |
|
◆ columnCount()
int dbse::CustomTableModel::columnCount |
( |
const QModelIndex & | parent | ) |
const |
◆ data()
QVariant dbse::CustomTableModel::data |
( |
const QModelIndex & | index, |
|
|
int | role ) const |
Definition at line 53 of file SchemaCustomTableModel.cpp.
54{
55 if ( role != Qt::DisplayRole )
56 {
57 return QVariant();
58 }
59
61}
QList< QList< QString > > Data
◆ flags()
Qt::ItemFlags dbse::CustomTableModel::flags |
( |
const QModelIndex & | index | ) |
const |
Definition at line 31 of file SchemaCustomTableModel.cpp.
32{
33 Q_UNUSED ( index )
34 return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled;
35}
◆ getRowFromIndex()
QStringList dbse::CustomTableModel::getRowFromIndex |
( |
QModelIndex & | index | ) |
|
◆ headerData()
QVariant dbse::CustomTableModel::headerData |
( |
int | section, |
|
|
Qt::Orientation | orientation, |
|
|
int | role ) const |
Definition at line 37 of file SchemaCustomTableModel.cpp.
39{
40 if ( role != Qt::DisplayRole )
41 {
42 return QVariant();
43 }
44
45 if ( orientation == Qt::Horizontal )
46 {
48 }
49
50 return QVariant();
51}
◆ mimeData()
QMimeData * dbse::CustomTableModel::mimeData |
( |
const QModelIndexList & | indexes | ) |
const |
Definition at line 94 of file SchemaCustomTableModel.cpp.
95{
96 QMimeData *
mimeData =
new QMimeData();
97 QByteArray encodedData;
98
99 QDataStream stream ( &encodedData, QIODevice::WriteOnly );
100
101 foreach ( QModelIndex index, indexes )
102 {
104 {
105 QString ClassName =
data ( index, Qt::DisplayRole ).toString();
106 stream << ClassName;
107 }
108 }
109
110 mimeData->setData (
"application/vnd.text.list", encodedData );
112}
QMimeData * mimeData(const QModelIndexList &indexes) const
QVariant data(const QModelIndex &index, int role) const
◆ mimeTypes()
QStringList dbse::CustomTableModel::mimeTypes |
( |
| ) |
const |
Drag/Drop Handlers.
Definition at line 87 of file SchemaCustomTableModel.cpp.
88{
89 QStringList types;
90 types << "application/vnd.text.list";
91 return types;
92}
◆ rowCount()
int dbse::CustomTableModel::rowCount |
( |
const QModelIndex & | parent | ) |
const |
◆ setupModel()
void dbse::CustomTableModel::setupModel |
( |
| ) |
|
Definition at line 73 of file SchemaCustomTableModel.cpp.
74{
75 std::vector<OksClass *> ClassList;
77
78 for ( unsigned int i = 0; i < ClassList.size(); ++i )
79 {
80 QList<QString> Row;
81 OksClass * Class = ClassList.at ( i );
82 Row.append ( QString ( Class->
get_name().c_str() ) );
84 }
85}
static KernelWrapper & GetInstance()
void GetClassList(std::vector< dunedaq::oks::OksClass * > &ClassList) const
const std::string & get_name() const noexcept
◆ Data
QList<QList<QString> > dbse::CustomTableModel::Data |
|
private |
◆ HeaderList
QStringList dbse::CustomTableModel::HeaderList |
|
private |
The documentation for this class was generated from the following files: