digiKam
tableview_column_item.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2013-02-25
7  * Description : Table view column helpers: Item properties
8  *
9  * Copyright (C) 2017-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2013 by Michael G. Hansen <mike at mghansen dot de>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_TABLE_VIEW_COLUMN_ITEM_H
25 #define DIGIKAM_TABLE_VIEW_COLUMN_ITEM_H
26 
27 // Qt includes
28 
29 #include <QStringList>
30 
31 // Local includes
32 
34 
35 namespace Digikam
36 {
37 
38 namespace TableViewColumns
39 {
40 
42 {
43  Q_OBJECT
44 
45 public:
46 
47  enum SubColumn
48  {
60  };
61 
62 public:
63 
64  explicit ColumnItemProperties(TableViewShared* const tableViewShared,
65  const TableViewColumnConfiguration& pConfiguration,
66  const SubColumn pSubColumn,
67  QObject* const parent = nullptr);
68  ~ColumnItemProperties() override;
69 
70  QString getTitle() const override;
71  ColumnFlags getColumnFlags() const override;
72  QVariant data(TableViewModel::Item* const item, const int role) const override;
73  ColumnCompareResult compare(TableViewModel::Item* const itemA, TableViewModel::Item* const itemB) const override;
74 
76  static QStringList getSubColumns();
77 
78 private:
79 
80  SubColumn subColumn;
81 };
82 
83 } // namespace TableViewColumns
84 
85 } // namespace Digikam
86 
87 #endif // DIGIKAM_TABLE_VIEW_COLUMN_ITEM_H
Definition: tableview_columnfactory.h:50
Definition: tableview_columnfactory.h:81
Definition: tableview_columnfactory.h:196
ColumnCompareResult
Definition: tableview_columnfactory.h:216
Definition: tableview_column_item.h:42
QString getTitle() const override
Definition: tableview_column_item.cpp:98
static QStringList getSubColumns()
Definition: tableview_column_item.cpp:60
QVariant data(TableViewModel::Item *const item, const int role) const override
Definition: tableview_column_item.cpp:183
static TableViewColumnDescription getDescription()
Definition: tableview_column_item.cpp:78
ColumnCompareResult compare(TableViewModel::Item *const itemA, TableViewModel::Item *const itemB) const override
Definition: tableview_column_item.cpp:321
SubColumn
Definition: tableview_column_item.h:48
@ SubColumnDimensions
Definition: tableview_column_item.h:51
@ SubColumnWidth
Definition: tableview_column_item.h:49
@ SubColumnDigitizationDateTime
Definition: tableview_column_item.h:57
@ SubColumnAspectRatio
Definition: tableview_column_item.h:58
@ SubColumnColorMode
Definition: tableview_column_item.h:54
@ SubColumnBitDepth
Definition: tableview_column_item.h:53
@ SubColumnCreationDateTime
Definition: tableview_column_item.h:56
@ SubColumnSimilarity
Definition: tableview_column_item.h:59
@ SubColumnHeight
Definition: tableview_column_item.h:50
@ SubColumnPixelCount
Definition: tableview_column_item.h:52
@ SubColumnType
Definition: tableview_column_item.h:55
ColumnFlags getColumnFlags() const override
Definition: tableview_column_item.cpp:161
~ColumnItemProperties() override
Definition: tableview_column_item.cpp:56
ColumnItemProperties(TableViewShared *const tableViewShared, const TableViewColumnConfiguration &pConfiguration, const SubColumn pSubColumn, QObject *const parent=nullptr)
Definition: tableview_column_item.cpp:47
Definition: tableview_model.h:71
Definition: tableview_shared.h:44
Definition: datefolderview.cpp:43