summaryrefslogtreecommitdiff
path: root/src/overwriteinfodialog.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-04-18 04:54:10 -0400
committerGitHub <noreply@github.com>2020-04-18 04:54:10 -0400
commita2f550ee339bb8feabd64791df3c80b9ab18c2be (patch)
treeec752efd717330e7c8a4e28a32eebc1feef927ba /src/overwriteinfodialog.h
parentc47ab23f9593d384a1b5106f79d41228fc8c8f59 (diff)
parentb91dbba734f45f1cc1a42f86d9141bb272de0564 (diff)
Merge pull request #1057 from isanae/warning-fixes
Fixed warnings about Q_OBJECT and thousand separators
Diffstat (limited to 'src/overwriteinfodialog.h')
-rw-r--r--src/overwriteinfodialog.h43
1 files changed, 43 insertions, 0 deletions
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