digiKam
tableview_column_file.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: File 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_FILE_H
25 #define DIGIKAM_TABLE_VIEW_COLUMN_FILE_H
26 
27 // Qt includes
28 
29 #include <QStringList>
30 
31 // Local includes
32 
34 
35 class QComboBox;
36 
37 namespace Digikam
38 {
39 
40 namespace TableViewColumns
41 {
42 
44 {
45  Q_OBJECT
46 
47 public:
48 
49  enum SubColumn
50  {
55  };
56 
57 public:
58 
59  explicit ColumnFileProperties(TableViewShared* const tableViewShared,
60  const TableViewColumnConfiguration& pConfiguration,
61  const SubColumn pSubColumn,
62  QObject* const parent = nullptr);
63  ~ColumnFileProperties() override {};
64 
65  TableViewColumnConfigurationWidget* getConfigurationWidget(QWidget* const parentWidget) const override;
66  void setConfiguration(const TableViewColumnConfiguration& newConfiguration) override;
67  QString getTitle() const override;
68  ColumnFlags getColumnFlags() const override;
69  QVariant data(TableViewModel::Item* const item, const int role) const override;
70  ColumnCompareResult compare(TableViewModel::Item* const itemA, TableViewModel::Item* const itemB) const override;
71 
72 public:
73 
75  static QStringList getSubColumns();
76 
77 private:
78 
79  SubColumn subColumn;
80 };
81 
82 // ---------------------------------------------------------------------------------------
83 
85 {
86  Q_OBJECT
87 
88 public:
89 
90  explicit ColumnFileConfigurationWidget(TableViewShared* const sharedObject,
91  const TableViewColumnConfiguration& columnConfiguration,
92  QWidget* const parentWidget);
94 
96 
97 private:
98 
100  QComboBox* selectorSizeType;
101 };
102 
103 } // namespace TableViewColumns
104 
105 } // namespace Digikam
106 
107 #endif // DIGIKAM_TABLE_VIEW_COLUMN_FILE_H
Definition: tableview_columnfactory.h:175
Definition: tableview_columnfactory.h:50
Definition: tableview_columnfactory.h:81
Definition: tableview_columnfactory.h:196
ColumnCompareResult
Definition: tableview_columnfactory.h:216
Definition: tableview_column_file.h:85
~ColumnFileConfigurationWidget() override
Definition: tableview_column_file.cpp:262
ColumnFileConfigurationWidget(TableViewShared *const sharedObject, const TableViewColumnConfiguration &columnConfiguration, QWidget *const parentWidget)
Definition: tableview_column_file.cpp:229
TableViewColumnConfiguration getNewConfiguration() override
Definition: tableview_column_file.cpp:266
Definition: tableview_column_file.h:44
QString getTitle() const override
Definition: tableview_column_file.cpp:82
void setConfiguration(const TableViewColumnConfiguration &newConfiguration) override
Definition: tableview_column_file.cpp:274
TableViewColumnConfigurationWidget * getConfigurationWidget(QWidget *const parentWidget) const override
Definition: tableview_column_file.cpp:281
ColumnFileProperties(TableViewShared *const tableViewShared, const TableViewColumnConfiguration &pConfiguration, const SubColumn pSubColumn, QObject *const parent=nullptr)
Definition: tableview_column_file.cpp:49
ColumnFlags getColumnFlags() const override
Definition: tableview_column_file.cpp:110
static QStringList getSubColumns()
Definition: tableview_column_file.cpp:71
QVariant data(TableViewModel::Item *const item, const int role) const override
Definition: tableview_column_file.cpp:123
ColumnCompareResult compare(TableViewModel::Item *const itemA, TableViewModel::Item *const itemB) const override
Definition: tableview_column_file.cpp:195
~ColumnFileProperties() override
Definition: tableview_column_file.h:63
static TableViewColumnDescription getDescription()
Definition: tableview_column_file.cpp:58
SubColumn
Definition: tableview_column_file.h:50
@ SubColumnLastModified
Definition: tableview_column_file.h:54
@ SubColumnSize
Definition: tableview_column_file.h:53
@ SubColumnFilePath
Definition: tableview_column_file.h:52
@ SubColumnName
Definition: tableview_column_file.h:51
Definition: tableview_model.h:71
Definition: tableview_shared.h:44
Definition: datefolderview.cpp:43