DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
FileModel.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/FileModel.h to include/dbe/FileModel.hpp).
5
6#ifndef FILEMODEL_H
7#define FILEMODEL_H
8
10#include <QAbstractTableModel>
11#include <QStringList>
12
13namespace dbe
14{
15
16class FileModel: public QAbstractTableModel
17{
18 Q_OBJECT
19public:
20 ~FileModel();
21
22 explicit FileModel ( QObject * parent = nullptr );
23
24 explicit FileModel ( QList<QStringList> const & FileList, QObject * parent = nullptr );
25
26 int rowCount ( const QModelIndex & parent ) const;
27
28 int columnCount ( const QModelIndex & parent ) const;
29
30 QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const;
31
32 QVariant headerData ( int section, Qt::Orientation orientation,
33 int role = Qt::DisplayRole ) const;
34
35 Qt::ItemFlags flags ( const QModelIndex & index ) const;
36
37 QString GetFullFileName ( QString & FileName );
38
39 QList<QStringList> GetFilesInfo() const;
40
41private:
42 void initpaths();
43 void initmodel();
44 void initconnections();
45
46 QList<QStringList> IncludedFiles;
47 QStringList FolderPathList;
48 QStringList Headers;
49
50signals:
51 void FileCacheReady ( QList<QStringList> & Files );
52};
53
54} // namespace dbe
55#endif // FILEMODEL_H
int columnCount(const QModelIndex &parent) const
Definition FileModel.cpp:50
QList< QStringList > IncludedFiles
Definition FileModel.hpp:46
QStringList FolderPathList
Definition FileModel.hpp:47
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition FileModel.cpp:83
void initconnections()
QStringList Headers
Definition FileModel.hpp:48
Qt::ItemFlags flags(const QModelIndex &index) const
FileModel(QObject *parent=nullptr)
Including QT Headers.
Definition FileModel.cpp:18
int rowCount(const QModelIndex &parent) const
Definition FileModel.cpp:40
QList< QStringList > GetFilesInfo() const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition FileModel.cpp:56
void FileCacheReady(QList< QStringList > &Files)
QString GetFullFileName(QString &FileName)
Include QT Headers.