From 269fb03351d37d18ac2b82879d2bcf1e4f12fa0a Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 10 Oct 2023 11:30:29 +0800 Subject: [PATCH] Add starter FileProviderMaterialisedItemsModel Signed-off-by: Claudio Cambra --- src/gui/CMakeLists.txt | 2 + .../fileprovidermaterialiseditemsmodel.cpp | 38 +++++++++++++++++++ .../fileprovidermaterialiseditemsmodel.h | 35 +++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp create mode 100644 src/gui/macOS/fileprovidermaterialiseditemsmodel.h diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 957b582722..fb48ee902e 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -296,6 +296,8 @@ IF( APPLE ) macOS/fileprovideritemmetadata.h macOS/fileprovideritemmetadata.cpp macOS/fileprovideritemmetadata_mac.mm + macOS/fileprovidermaterialiseditemsmodel.h + macOS/fileprovidermaterialiseditemsmodel.cpp macOS/fileprovidersettingscontroller.h macOS/fileprovidersettingscontroller_mac.mm macOS/fileprovidersocketcontroller.h diff --git a/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp b/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp new file mode 100644 index 0000000000..f375b637ca --- /dev/null +++ b/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp @@ -0,0 +1,38 @@ +/* + * Copyright 2023 (c) Claudio Cambra + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include "fileprovidermaterialiseditemsmodel.h" + +namespace OCC { + +namespace Mac { + +FileProviderMaterialisedItemsModel::FileProviderMaterialisedItemsModel(QObject * const parent) + : QAbstractListModel(parent) +{ +} + +int FileProviderMaterialisedItemsModel::rowCount(const QModelIndex &parent) const +{ + return 0; +} + +QVariant FileProviderMaterialisedItemsModel::data(const QModelIndex &index, int role) const +{ + return {}; +} + +} // namespace Mac + +} // namespace OCC diff --git a/src/gui/macOS/fileprovidermaterialiseditemsmodel.h b/src/gui/macOS/fileprovidermaterialiseditemsmodel.h new file mode 100644 index 0000000000..339dc114e1 --- /dev/null +++ b/src/gui/macOS/fileprovidermaterialiseditemsmodel.h @@ -0,0 +1,35 @@ +/* + * Copyright 2023 (c) Claudio Cambra + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#pragma once + +#include + +namespace OCC { + +namespace Mac { + +class FileProviderMaterialisedItemsModel : public QAbstractListModel +{ + Q_OBJECT + +public: + explicit FileProviderMaterialisedItemsModel(QObject *parent = nullptr); + int rowCount(const QModelIndex &parent = {}) const override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; +}; + +} // namespace Mac + +} // namespace OCC