File indexing completed on 2025-01-19 03:50:48
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2013-02-25 0007 * Description : Table view column helpers: Item properties 0008 * 0009 * SPDX-FileCopyrightText: 2017-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2013 by Michael G. Hansen <mike at mghansen dot de> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_TABLE_VIEW_COLUMN_ITEM_H 0017 #define DIGIKAM_TABLE_VIEW_COLUMN_ITEM_H 0018 0019 // Qt includes 0020 0021 #include <QStringList> 0022 0023 // Local includes 0024 0025 #include "tableview_columnfactory.h" 0026 0027 namespace Digikam 0028 { 0029 0030 namespace TableViewColumns 0031 { 0032 0033 class ColumnItemProperties : public TableViewColumn 0034 { 0035 Q_OBJECT 0036 0037 public: 0038 0039 enum SubColumn 0040 { 0041 SubColumnWidth = 0, 0042 SubColumnHeight = 1, 0043 SubColumnDimensions = 2, 0044 SubColumnPixelCount = 3, 0045 SubColumnBitDepth = 4, 0046 SubColumnColorMode = 5, 0047 SubColumnType = 6, 0048 SubColumnCreationDateTime = 7, 0049 SubColumnDigitizationDateTime = 8, 0050 SubColumnAspectRatio = 9, 0051 SubColumnSimilarity = 10 0052 }; 0053 0054 public: 0055 0056 explicit ColumnItemProperties(TableViewShared* const tableViewShared, 0057 const TableViewColumnConfiguration& pConfiguration, 0058 const SubColumn pSubColumn, 0059 QObject* const parent = nullptr); 0060 ~ColumnItemProperties() override; 0061 0062 QString getTitle() const override; 0063 ColumnFlags getColumnFlags() const override; 0064 QVariant data(TableViewModel::Item* const item, const int role) const override; 0065 ColumnCompareResult compare(TableViewModel::Item* const itemA, TableViewModel::Item* const itemB) const override; 0066 0067 static TableViewColumnDescription getDescription(); 0068 static QStringList getSubColumns(); 0069 0070 private: 0071 0072 SubColumn subColumn; 0073 }; 0074 0075 } // namespace TableViewColumns 0076 0077 } // namespace Digikam 0078 0079 #endif // DIGIKAM_TABLE_VIEW_COLUMN_ITEM_H