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-28
0007  * Description : Table view column helpers: Digikam 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_DIGIKAM_H
0017 #define DIGIKAM_TABLE_VIEW_COLUMN_DIGIKAM_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 ColumnDigikamProperties : public TableViewColumn
0034 {
0035     Q_OBJECT
0036 
0037 public:
0038 
0039     enum SubColumn
0040     {
0041         SubColumnRating     = 0,
0042         SubColumnPickLabel  = 1,
0043         SubColumnColorLabel = 2,
0044         SubColumnTitle      = 3,
0045         SubColumnCaption    = 4,
0046         SubColumnTags       = 5
0047     };
0048 
0049 public:
0050 
0051     explicit ColumnDigikamProperties(
0052             TableViewShared* const tableViewShared,
0053             const TableViewColumnConfiguration& pConfiguration,
0054             const SubColumn pSubColumn,
0055             QObject* const parent = nullptr);
0056     ~ColumnDigikamProperties() override;
0057 
0058     QString getTitle()                                                                                const override;
0059     ColumnFlags getColumnFlags()                                                                      const override;
0060     QVariant data(TableViewModel::Item* const item, const int role)                                   const override;
0061     ColumnCompareResult compare(TableViewModel::Item* const itemA, TableViewModel::Item* const itemB) const override;
0062     bool columnAffectedByChangeset(const ImageChangeset& imageChangeset)                              const override;
0063 
0064     static TableViewColumnDescription getDescription();
0065     static QStringList getSubColumns();
0066 
0067 private:
0068 
0069     SubColumn subColumn;
0070 };
0071 
0072 } // namespace TableViewColumns
0073 
0074 } // namespace Digikam
0075 
0076 #endif // DIGIKAM_TABLE_VIEW_COLUMN_DIGIKAM_H