Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* PresentationManangement - Script Overview Dialog Model
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by Mike Wille, SLSE, 2017-03-15
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Evaluations/evl_dtc.h>
|
||||
#include <Evaluations/logger.h>
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
#include <Plugins/AudioVideoManagement/avm_data_plugin_interface.h>
|
||||
|
||||
#include <LtsWidgets/lts_abstract_table_model.h>
|
||||
#include <LtsWidgets/lts_column_filter_proxy_model.h>
|
||||
|
||||
namespace Evaluations
|
||||
{
|
||||
|
||||
class ElementDialogModel final : public LtsWidgets::LtsAbstractTableModel<EvaluationElement>
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Columns
|
||||
{
|
||||
Id = 0,
|
||||
Situation,
|
||||
Video,
|
||||
Audio,
|
||||
Timestamp,
|
||||
Duration,
|
||||
Rating,
|
||||
RadioCircuit,
|
||||
VideoChannel,
|
||||
Note,
|
||||
Phase
|
||||
};
|
||||
|
||||
explicit ElementDialogModel(QObject *parent = nullptr);
|
||||
~ElementDialogModel() = default;
|
||||
|
||||
bool initModel(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
const std::shared_ptr<ExerciseManagement::Interface::Dtc> &exmDtc,
|
||||
const std::shared_ptr<AudioVideoManagement::ForeignDataInterface> &avmDataIfc,
|
||||
int criteriumId);
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<AudioVideoManagement::ForeignDataInterface> m_avmDataIfc;
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
|
||||
friend class ElementDialogProxyModel;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
class ElementDialogProxyModel final : public LtsWidgets::LtsColumnFilterProxyModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
using LtsWidgets::LtsColumnFilterProxyModel::LtsColumnFilterProxyModel;
|
||||
void setSourceModel(QAbstractItemModel *sourceModel) override;
|
||||
void setCriteriumId(int criteriumId);
|
||||
protected:
|
||||
bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override;
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
|
||||
private:
|
||||
ElementDialogModel *m_sourceModel{nullptr};
|
||||
int m_criteriumId{-1};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user