~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to core/utilities/queuemanager/views/toolslistview.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * Date        : 2008-11-24
7
7
 * Description : Available batch tools list.
8
8
 *
9
 
 * Copyright (C) 2008-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
9
 * Copyright (C) 2008-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
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
 
ToolListViewGroup::ToolListViewGroup(QTreeWidget* parent, BatchTool::BatchToolGroup group)
 
45
ToolListViewGroup::ToolListViewGroup(QTreeWidget* const parent, BatchTool::BatchToolGroup group)
46
46
    : QTreeWidgetItem(parent)
47
47
{
48
48
    setFlags(Qt::ItemIsEnabled);
112
112
 
113
113
// ---------------------------------------------------------------------------
114
114
 
115
 
ToolListViewItem::ToolListViewItem(ToolListViewGroup* parent, BatchTool* tool)
 
115
ToolListViewItem::ToolListViewItem(ToolListViewGroup* const parent, BatchTool* const tool)
116
116
    : QTreeWidgetItem(parent)
117
117
{
118
118
    setDisabled(false);
139
139
 
140
140
// ---------------------------------------------------------------------------
141
141
 
142
 
ToolsListView::ToolsListView(QWidget* parent)
 
142
ToolsListView::ToolsListView(QWidget* const parent)
143
143
    : QTreeWidget(parent)
144
144
{
145
145
    setContextMenuPolicy(Qt::CustomContextMenu);
182
182
    return list;
183
183
}
184
184
 
185
 
void ToolsListView::addTool(BatchTool* tool)
 
185
void ToolsListView::addTool(BatchTool* const tool)
186
186
{
187
187
    if (!tool)
188
188
    {
189
189
        return;
190
190
    }
191
191
 
192
 
    ToolListViewGroup* parent = findToolGroup(tool->toolGroup());
 
192
    ToolListViewGroup* const parent = findToolGroup(tool->toolGroup());
193
193
 
194
194
    if (parent)
195
195
    {
197
197
    }
198
198
}
199
199
 
200
 
bool ToolsListView::removeTool(BatchTool* tool)
 
200
bool ToolsListView::removeTool(BatchTool* const tool)
201
201
{
202
202
    QTreeWidgetItemIterator it(this);
203
203
 
204
204
    while (*it)
205
205
    {
206
 
        ToolListViewItem* item = dynamic_cast<ToolListViewItem*>(*it);
 
206
        ToolListViewItem* const item = dynamic_cast<ToolListViewItem*>(*it);
207
207
 
208
208
        if (item && item->tool() == tool)
209
209
        {
223
223
 
224
224
    while (*it)
225
225
    {
226
 
        ToolListViewGroup* item = dynamic_cast<ToolListViewGroup*>(*it);
 
226
        ToolListViewGroup* const item = dynamic_cast<ToolListViewGroup*>(*it);
227
227
 
228
228
        if (item && item->toolGroup() == group)
229
229
        {
242
242
 
243
243
    while (*it)
244
244
    {
245
 
        ToolListViewItem* item = dynamic_cast<ToolListViewItem*>(*it);
 
245
        ToolListViewItem* const item = dynamic_cast<ToolListViewItem*>(*it);
246
246
 
247
247
        if (item && item->tool() == tool)
248
248
        {
323
323
 
324
324
QMimeData* ToolsListView::mimeData(const QList<QTreeWidgetItem*> items) const
325
325
{
326
 
    QMimeData* mimeData = new QMimeData();
 
326
    QMimeData* const mimeData = new QMimeData();
327
327
    QByteArray encodedData;
328
328
 
329
329
    QDataStream stream(&encodedData, QIODevice::WriteOnly);
330
 
    QMap<int, QString> map = itemsToMap(items);
 
330
    QMap<int, QString> map    = itemsToMap(items);
331
331
    stream << map;
332
332
 
333
333
    mimeData->setData("digikam/batchtoolslist", encodedData);
338
338
{
339
339
    QMap<int, QString> map;
340
340
 
341
 
    foreach(QTreeWidgetItem* itm, items)
 
341
    foreach(QTreeWidgetItem* const itm, items)
342
342
    {
343
 
        ToolListViewItem* tlwi = dynamic_cast<ToolListViewItem*>(itm);
 
343
        ToolListViewItem* const tlwi = dynamic_cast<ToolListViewItem*>(itm);
344
344
 
345
345
        if (tlwi)
346
346
        {
353
353
void ToolsListView::slotContextMenu()
354
354
{
355
355
    KMenu popmenu(this);
356
 
    KAction* action = new KAction(KIcon("bqm-add"), i18n("Assign tools"), this);
 
356
    KAction* const action = new KAction(KIcon("bqm-add"), i18n("Assign tools"), this);
357
357
    connect(action, SIGNAL(triggered(bool)),
358
358
            this, SLOT(slotAssignTools()));
359
359