digiKam
tableview_column_geo.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: Geographic column
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_GEO_H
25 #define DIGIKAM_TABLE_VIEW_COLUMN_GEO_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 public:
57 
58  explicit ColumnGeoProperties(TableViewShared* const tableViewShared,
59  const TableViewColumnConfiguration& pConfiguration,
60  const SubColumn pSubColumn,
61  QObject* const parent = nullptr);
62  ~ColumnGeoProperties() override;
63 
64  QString getTitle() const override;
65  ColumnFlags getColumnFlags() const override;
66  QVariant data(TableViewModel::Item* const item, const int role) const override;
67  ColumnCompareResult compare(TableViewModel::Item* const itemA, TableViewModel::Item* const itemB) const override;
68  TableViewColumnConfigurationWidget* getConfigurationWidget(QWidget* const parentWidget) const override;
69  void setConfiguration(const TableViewColumnConfiguration& newConfiguration) override;
70 
71  static QStringList getSubColumns();
73 };
74 
75 // -----------------------------------------------------------------------------------------------
76 
78 {
79  Q_OBJECT
80 
81 public:
82  explicit ColumnGeoConfigurationWidget(TableViewShared* const sharedObject,
83  const TableViewColumnConfiguration& columnConfiguration,
84  QWidget* const parentWidget);
86 
88 
89 private:
90 
92  QComboBox* selectorAltitudeUnit;
93 };
94 
95 } // namespace TableViewColumns
96 
97 } // namespace Digikam
98 
99 #endif // DIGIKAM_TABLE_VIEW_COLUMN_GEO_H
100 
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_geo.h:78
TableViewColumnConfiguration getNewConfiguration() override
Definition: tableview_column_geo.cpp:289
~ColumnGeoConfigurationWidget() override
Definition: tableview_column_geo.cpp:285
ColumnGeoConfigurationWidget(TableViewShared *const sharedObject, const TableViewColumnConfiguration &columnConfiguration, QWidget *const parentWidget)
Definition: tableview_column_geo.cpp:252
Definition: tableview_column_geo.h:44
ColumnFlags getColumnFlags() const override
Definition: tableview_column_geo.cpp:126
QString getTitle() const override
Definition: tableview_column_geo.cpp:103
static TableViewColumnDescription getDescription()
Definition: tableview_column_geo.cpp:92
static QStringList getSubColumns()
Definition: tableview_column_geo.cpp:82
enum Digikam::TableViewColumns::ColumnGeoProperties::SubColumn subColumn
QVariant data(TableViewModel::Item *const item, const int role) const override
Definition: tableview_column_geo.cpp:138
SubColumn
Definition: tableview_column_geo.h:50
@ SubColumnCoordinates
Definition: tableview_column_geo.h:52
@ SubColumnAltitude
Definition: tableview_column_geo.h:53
@ SubColumnHasCoordinates
Definition: tableview_column_geo.h:51
void setConfiguration(const TableViewColumnConfiguration &newConfiguration) override
Definition: tableview_column_geo.cpp:297
ColumnGeoProperties(TableViewShared *const tableViewShared, const TableViewColumnConfiguration &pConfiguration, const SubColumn pSubColumn, QObject *const parent=nullptr)
Definition: tableview_column_geo.cpp:69
TableViewColumnConfigurationWidget * getConfigurationWidget(QWidget *const parentWidget) const override
Definition: tableview_column_geo.cpp:243
ColumnCompareResult compare(TableViewModel::Item *const itemA, TableViewModel::Item *const itemB) const override
Definition: tableview_column_geo.cpp:216
~ColumnGeoProperties() override
Definition: tableview_column_geo.cpp:78
Definition: tableview_model.h:71
Definition: tableview_shared.h:44
Definition: datefolderview.cpp:43