From b91dbba734f45f1cc1a42f86d9141bb272de0564 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sat, 18 Apr 2020 04:53:14 -0400 Subject: fixed warnings about Q_OBJECT and thousand separators had to move some classes to header files --- src/overwriteinfodialog.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'src/overwriteinfodialog.h') diff --git a/src/overwriteinfodialog.h b/src/overwriteinfodialog.h index bedb779a..6b3ab0ea 100644 --- a/src/overwriteinfodialog.h +++ b/src/overwriteinfodialog.h @@ -28,6 +28,49 @@ namespace Ui { class OverwriteInfoDialog; } +class OverwriteFileSystemModel : public QFileSystemModel +{ + Q_OBJECT; + +public: + OverwriteFileSystemModel(QObject *parent) + : QFileSystemModel(parent), m_RegularColumnCount(0) {} + + virtual int columnCount(const QModelIndex &parent) const { + m_RegularColumnCount = QFileSystemModel::columnCount(parent); + return m_RegularColumnCount; + } + + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const { + if ((orientation == Qt::Horizontal) && + (section >= m_RegularColumnCount)) { + if (role == Qt::DisplayRole) { + return tr("Overwrites"); + } else { + return QVariant(); + } + } else { + return QFileSystemModel::headerData(section, orientation, role); + } + } + + virtual QVariant data(const QModelIndex &index, int role) const { + if (index.column() == m_RegularColumnCount + 0) { + if (role == Qt::DisplayRole) { + return tr("not implemented"); + } else { + return QVariant(); + } + } else { + return QFileSystemModel::data(index, role); + } + } + +private: + mutable int m_RegularColumnCount; +}; + + class OverwriteInfoDialog : public QDialog { Q_OBJECT -- cgit v1.3.1