full rework of the output order
This commit is contained in:
37
widgets/outputcolumnmodel.h
Normal file
37
widgets/outputcolumnmodel.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef OUTPUTCOLUMNMODEL_H
|
||||
#define OUTPUTCOLUMNMODEL_H
|
||||
|
||||
#include <QLineEdit>
|
||||
#include <QAbstractListModel>
|
||||
#include <outputcolumn.h>
|
||||
|
||||
class OutputColumnModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
static constexpr const char* MimeType = "application/output.column.model";
|
||||
std::vector<OutputColumn> *columns;
|
||||
|
||||
public:
|
||||
OutputColumnModel(std::vector<OutputColumn> *columns, QObject *parent = nullptr);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation,
|
||||
int role = Qt::DisplayRole) const override;
|
||||
|
||||
Qt::ItemFlags flags (const QModelIndex& index) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value,
|
||||
int role = Qt::EditRole) override;
|
||||
|
||||
Qt::DropActions supportedDropActions() const override;
|
||||
|
||||
bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex()) override;
|
||||
bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex()) override;
|
||||
|
||||
QStringList mimeTypes() const override;
|
||||
bool canDropMimeData(const QMimeData *, Qt::DropAction, int, int, const QModelIndex&);
|
||||
QMimeData* mimeData(const QModelIndexList &indexes) const;
|
||||
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
};
|
||||
|
||||
#endif // OUTPUTCOLUMNMODEL_H
|
||||
Reference in New Issue
Block a user