BuilderInfoPatternsModel.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <QAbstractItemModel>
  10. #include <AzCore/std/containers/vector.h>
  11. namespace AssetBuilderSDK
  12. {
  13. struct AssetBuilderDesc;
  14. struct AssetBuilderPattern;
  15. }
  16. namespace AssetProcessor
  17. {
  18. class BuilderInfoPatternsModel : public QAbstractItemModel
  19. {
  20. Q_OBJECT
  21. public:
  22. enum class Column
  23. {
  24. Type,
  25. Extension,
  26. Max
  27. };
  28. BuilderInfoPatternsModel(QObject* parent = nullptr);
  29. // QAbstractItemModel
  30. QModelIndex index(int row, int column, const QModelIndex& parent) const override;
  31. int rowCount(const QModelIndex& parent = QModelIndex()) const override;
  32. int columnCount(const QModelIndex& parent = QModelIndex()) const override;
  33. QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
  34. QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
  35. QModelIndex parent(const QModelIndex& index) const override;
  36. void Reset(const AssetBuilderSDK::AssetBuilderDesc& builder);
  37. private:
  38. AZStd::vector<AssetBuilderSDK::AssetBuilderPattern> m_data;
  39. };
  40. }