digiKam
Loading...
Searching...
No Matches
itempropertiestab.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 : 2006-04-19
7 * Description : A tab to display general item information
8 *
9 * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QString>
20#include <QColor>
21#include <QUrl>
22#include <QFileInfo>
23
24// Local includes
25
26#include "template.h"
27#include "dexpanderbox.h"
28#include "digikam_export.h"
29
30namespace Digikam
31{
32
33class DIGIKAM_EXPORT ItemPropertiesTab : public DExpanderBox
34{
35 Q_OBJECT
36
37public:
38
50
51public:
52
53 explicit ItemPropertiesTab(QWidget* const parent);
54 ~ItemPropertiesTab() override;
55
56 void showOrHideCachedProperties();
57
60
61 void setCurrentURL(const QUrl& url = QUrl());
62
63 void setPhotoInfoDisable(const bool b);
64 void setVideoInfoDisable(const bool b);
65
66 void setFileName(const QString& str);
67 void setFileFolder(const QString& str);
68 void setFileModifiedDate(const QString& str);
69 void setFileSize(const QString& str);
70 void setFileOwner(const QString& str);
71 void setFilePermissions(const QString& str);
72
73 void setItemDimensions(const QString& str);
74 void setImageRatio(const QString& str);
75 void setImageMime(const QString& str);
76 void setImageBitDepth(const QString& str);
77 void setImageColorMode(const QString& str);
78 void setHasSidecar(const QString& str);
79 void setHasGPSInfo(const QString& str);
80 void setVersionnedInfo(const QString& str);
81 void setGroupedInfo(const QString& str);
82
83 void setPhotoMake(const QString& str);
84 void setPhotoModel(const QString& str);
85 void setPhotoDateTime(const QString& str);
86 void setPhotoLens(const QString& str);
87 void setPhotoAperture(const QString& str);
88 void setPhotoFocalLength(const QString& str);
89 void setPhotoExposureTime(const QString& str);
90 void setPhotoSensitivity(const QString& str);
91 void setPhotoExposureMode(const QString& str);
92 void setPhotoFlash(const QString& str);
93 void setPhotoWhiteBalance(const QString& str);
94
95 void setVideoAspectRatio(const QString& str);
96 void setVideoAudioBitRate(const QString& str);
97 void setVideoAudioChannelType(const QString& str);
98 void setVideoAudioCodec(const QString& str);
99 void setVideoDuration(const QString& str);
100 void setVideoFrameRate(const QString& str);
101 void setVideoVideoCodec(const QString& str);
102
103 void setTitle(const QString& str);
104 void setCaption(const QString& str);
105 void setPickLabel(int pickId);
106 void setColorLabel(int colorId);
107 void setRating(int rating);
108 void setTags(const QStringList& tagPaths,
109 const QStringList& tagNames = QStringList(),
110 const QStringList& peopleTagPaths = QStringList(),
111 const QStringList& peopleTagNames = QStringList());
112 void setTemplate(const Template& t);
113
115
118
126 static QStringList shortenedTagPaths(const QStringList& tagPaths, QList<QVariant>* identifiers = nullptr);
127
132 static void shortenedMakeInfo(QString& make);
133 static void shortenedModelInfo(QString& model);
134
138 static bool aspectRatioToString(int width, int height, QString& arString);
139
143 static QString permissionsString(const QFileInfo& fi);
144
149 static QString humanReadableBytesCount(qint64 bytes, bool si = false);
150
151private:
152
153 static double doubleToHumanReadableFraction(double val, long* num, long* den, long maxden = 2);
154
156
157private:
158
159 class Private;
160 Private* const d = nullptr;
161};
162
163} // namespace Digikam
Definition dexpanderbox.h:240
Definition itempropertiestab.h:34
Section
Definition itempropertiestab.h:40
@ digiKamProperties
Definition itempropertiestab.h:45
@ VideoProperties
Definition itempropertiestab.h:44
@ ImageProperties
Definition itempropertiestab.h:42
@ LocationProperties
Definition itempropertiestab.h:47
@ TagsProperties
Definition itempropertiestab.h:46
@ PhotoProperties
Definition itempropertiestab.h:43
Definition template.h:36
Definition datefolderview.cpp:34