src/headerhistorymodel.h

Fri, 16 Mar 2018 16:28:39 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Fri, 16 Mar 2018 16:28:39 +0200
changeset 1291
9c570a30c98a
child 1292
66d2050d3bd9
permissions
-rw-r--r--

Added basic header editing

#pragma once
#include <QAbstractTableModel>

class LDHeader;

class HeaderHistoryModel : public QAbstractTableModel
{
public:
	enum Column
	{
		DateColumn,
		AuthorColumn,
		DescriptionColumn,
	};

	HeaderHistoryModel(LDHeader* header, QObject* parent);

	int rowCount(const QModelIndex &parent = QModelIndex()) const override;
	int columnCount(const QModelIndex &parent = QModelIndex()) const override;
	QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
	void setHeader(LDHeader* header);
	QVariant headerData(int section, Qt::Orientation orientation, int role) const;

private:
	LDHeader* header;
};

mercurial