digiKam
iccprofilewidget.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-06-23
7  * Description : a tab widget to display ICC profile infos
8  *
9  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * 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_ICC_PROFILE_WIDGET_H
25 #define DIGIKAM_ICC_PROFILE_WIDGET_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 #include <QString>
31 
32 // Local includes
33 
34 #include "metadatawidget.h"
35 #include "digikam_export.h"
36 
37 namespace Digikam
38 {
39 
40 class IccProfile;
41 
42 class DIGIKAM_EXPORT ICCProfileWidget : public MetadataWidget
43 {
44  Q_OBJECT
45 
46 public:
47 
48  explicit ICCProfileWidget(QWidget* const parent, int w = 256, int h = 256);
49  ~ICCProfileWidget() override;
50 
51  bool loadFromURL(const QUrl& url) override;
52  bool loadFromProfileData(const QString& fileName,
53  const QByteArray& data);
54  bool loadProfile(const QString& fileName,
55  const IccProfile& data);
56 
57  QString getTagDescription(const QString& key) override;
58  QString getTagTitle(const QString& key) override;
59 
60  QString getMetadataTitle() const override;
61 
62  void setLoadingFailed();
63  void setDataLoading();
64  void setUncalibratedColor();
65 
66  bool setProfile(const IccProfile& profile);
67  IccProfile getProfile() const;
68 
69 protected Q_SLOTS:
70 
71  void slotSaveMetadataToFile() override;
72 
73 private:
74 
75  bool decodeMetadata() override;
76  void buildView() override;
77 
78 private:
79 
80  class Private;
81  Private* const d;
82 };
83 
84 } // namespace Digikam
85 
86 #endif // DIGIKAM_ICC_PROFILE_WIDGET_H
Definition: iccprofilewidget.h:43
Definition: iccprofile.h:43
Definition: metadatawidget.h:44
Definition: datefolderview.cpp:43