~ubuntu-branches/ubuntu/natty/digikam/natty

« back to all changes in this revision

Viewing changes to libs/widgets/iccprofiles/iccprofilescombobox.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-08-26 19:25:16 UTC
  • mfrom: (1.2.30 upstream)
  • Revision ID: james.westby@ubuntu.com-20100826192516-mkbdww0h5v2x4yoy
Tags: 2:1.4.0-0ubuntu1
* New upstream bugfix release (LP: #626751)
* Install the file NEWS as upstream changelog because "ChangeLog" is
  too verbose.
* Don't copy the desktop .pot file to imageplugins, not needed anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * Date        : 2009-08-11
7
7
 * Description : a combo box containing ICC profiles
8
8
 *
9
 
 * Copyright (C) 2009 by Marcel Wiesweg <marcel.wiesweg@gmx.de>
 
9
 * Copyright (C) 2009-2010 by Marcel Wiesweg <marcel.wiesweg@gmx.de>
10
10
 *
11
11
 * This program is free software; you can redistribute it
12
12
 * and/or modify it under the terms of the GNU General
42
42
namespace Digikam
43
43
{
44
44
 
45
 
IccProfilesComboBox::IccProfilesComboBox(QWidget *parent)
 
45
IccProfilesComboBox::IccProfilesComboBox(QWidget* parent)
46
46
                   : KDcrawIface::SqueezedComboBox( parent )
47
47
{
48
48
}
73
73
}
74
74
 
75
75
// if needed outside this class, make it a public static method in a namespace
76
 
static void formatProfiles(const QList<IccProfile>& givenProfiles, QList<IccProfile> *returnedProfiles, QStringList *userText)
 
76
static void formatProfiles(const QList<IccProfile>& givenProfiles, QList<IccProfile>* returnedProfiles, QStringList* userText)
77
77
{
78
78
    QList<IccProfile> profiles;
79
79
    QSet<QString>     filePaths;
163
163
 
164
164
// ------------------------------------------------------------------------------------------
165
165
 
166
 
IccProfilesMenuAction::IccProfilesMenuAction(const KIcon& icon, const QString& text, QObject *parent)
 
166
IccProfilesMenuAction::IccProfilesMenuAction(const KIcon& icon, const QString& text, QObject* parent)
167
167
                     : KActionMenu(icon, text, parent),
168
168
                       m_parent(parent)
169
169
{
172
172
            this, SLOT(slotTriggered(QObject*)));
173
173
}
174
174
 
175
 
IccProfilesMenuAction::IccProfilesMenuAction(const QString &text, QObject *parent)
 
175
IccProfilesMenuAction::IccProfilesMenuAction(const QString &text, QObject* parent)
176
176
                     : KActionMenu(text, parent),
177
177
                       m_parent(parent)
178
178
{
210
210
    if (description.isNull())
211
211
        description = profileUserString(profile);
212
212
 
213
 
    KAction *action = new KAction(d.left(50), m_parent);
 
213
    KAction* action = new KAction(d.left(50), m_parent);
214
214
    action->setData(QVariant::fromValue(profile));
215
215
    addAction(action);
216
216
 
226
226
        setEnabled(false);
227
227
}
228
228
 
229
 
void IccProfilesMenuAction::slotTriggered(QObject *obj)
 
229
void IccProfilesMenuAction::slotTriggered(QObject* obj)
230
230
{
231
 
    KAction *action = static_cast<KAction*>(obj);
 
231
    KAction* action = static_cast<KAction*>(obj);
232
232
    IccProfile profile = action->data().value<IccProfile>();
233
233
    if (!profile.isNull())
234
234
        emit triggered(profile);
236
236
 
237
237
// ------------------------------------------------------------------------------------------
238
238
 
239
 
IccRenderingIntentComboBox::IccRenderingIntentComboBox(QWidget *parent)
 
239
IccRenderingIntentComboBox::IccRenderingIntentComboBox(QWidget* parent)
240
240
                          : KComboBox(parent)
241
241
{
242
242
    addItem("Perceptual", IccTransform::Perceptual);