digiKam
Loading...
Searching...
No Matches
iccprofilescombobox.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 : 2009-08-11
7 * Description : a combo box containing ICC profiles
8 *
9 * SPDX-FileCopyrightText: 2009-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QComboBox>
20#include <QIcon>
21#include <QMenu>
22
23// Local includes
24
25#include "squeezedcombobox.h"
26#include "digikam_export.h"
27#include "iccprofile.h"
28
29namespace Digikam
30{
31
32class DIGIKAM_EXPORT IccProfilesComboBox : public SqueezedComboBox
33{
34 Q_OBJECT
35
36public:
41 explicit IccProfilesComboBox(QWidget* const parent = nullptr);
42 ~IccProfilesComboBox() override = default;
43
48 void addProfilesSqueezed(const QList<IccProfile>& profiles);
49
54 void addProfileSqueezed(const IccProfile& profile, const QString& description = QString());
55
59 void replaceProfilesSqueezed(const QList<IccProfile>& profiles);
60
65 void setNoProfileIfEmpty(const QString& message);
66
70 IccProfile currentProfile() const;
71
75 void setCurrentProfile(const IccProfile& profile);
76};
77
78// ----------------------------------------------------------------------------
79
80class DIGIKAM_EXPORT IccRenderingIntentComboBox : public QComboBox
81{
82 Q_OBJECT
83
84public:
85
86 explicit IccRenderingIntentComboBox(QWidget* const parent = nullptr);
87
88 void setIntent(int intent);
89 int intent() const;
90};
91
92// ----------------------------------------------------------------------------
93
94class DIGIKAM_EXPORT IccProfilesMenuAction : public QMenu
95{
96 Q_OBJECT
97
98public:
99
100 IccProfilesMenuAction(const QIcon& icon, const QString& text, QObject* const parent);
101 IccProfilesMenuAction(const QString& text, QObject* const parent);
102
107 void addProfiles(const QList<IccProfile>& profile);
108
113 void addProfile(const IccProfile& profile, const QString& description = QString());
114
118 void replaceProfiles(const QList<IccProfile>& profile);
119
123 void disableIfEmpty();
124
128 QObject* parentObject() const;
129
130Q_SIGNALS:
131
132 void triggered(const IccProfile& profile);
133
134protected Q_SLOTS:
135
136 void slotTriggered(QObject*);
137
138protected:
139
140 QObject* m_parent = nullptr;
141
142private:
143
144 // Disable
145 IccProfilesMenuAction(QWidget*);
146};
147
148} // namespace Digikam
Definition iccprofile.h:33
Definition iccprofilescombobox.h:33
~IccProfilesComboBox() override=default
Definition iccprofilescombobox.h:95
void triggered(const IccProfile &profile)
Definition iccprofilescombobox.h:81
Definition squeezedcombobox.h:41
Definition datefolderview.cpp:34