~ubuntu-branches/ubuntu/vivid/digikam/vivid

« back to all changes in this revision

Viewing changes to core/utilities/importui/views/importcategorizedview.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:
 
1
/* ============================================================
 
2
 *
 
3
 * This file is a part of digiKam project
 
4
 * http://www.digikam.org
 
5
 *
 
6
 * Date        : 2012-07-13
 
7
 * Description : Qt categorized item view for camera items
 
8
 *
 
9
 * Copyright (C) 2012 by Islam Wazery <wazery at ubuntu 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
#include "importcategorizedview.moc"
 
25
 
 
26
// Qt includes
 
27
 
 
28
#include "QTimer"
 
29
 
 
30
// KDE includes
 
31
 
 
32
#include <kdebug.h>
 
33
 
 
34
// Local includes
 
35
 
 
36
#include "loadingcacheinterface.h"
 
37
#include "imageselectionoverlay.h"
 
38
#include "camitemsortsettings.h"
 
39
#include "itemviewtooltip.h"
 
40
#include "importdelegate.h"
 
41
#include "importtooltipfiller.h"
 
42
#include "thumbnailloadthread.h"
 
43
#include "importsettings.h"
 
44
 
 
45
namespace Digikam
 
46
{
 
47
 
 
48
class ImportItemViewToolTip : public ItemViewToolTip
 
49
{
 
50
public:
 
51
 
 
52
    explicit ImportItemViewToolTip(ImportCategorizedView* const view)
 
53
        : ItemViewToolTip(view)
 
54
    {
 
55
    }
 
56
 
 
57
    ImportCategorizedView* view() const
 
58
    {
 
59
        return static_cast<ImportCategorizedView*>(ItemViewToolTip::view());
 
60
    }
 
61
 
 
62
protected:
 
63
 
 
64
    virtual QString tipContents()
 
65
    {
 
66
        CamItemInfo info = ImportImageModel::retrieveCamItemInfo(currentIndex());
 
67
        return ImportToolTipFiller::CamItemInfoTipContents(info);
 
68
    }
 
69
};
 
70
 
 
71
class ImportCategorizedView::Private
 
72
{
 
73
public:
 
74
 
 
75
    Private() :
 
76
        model(0),
 
77
        filterModel(0),
 
78
        delegate(0),
 
79
        showToolTip(false),
 
80
        scrollToItemId(0),
 
81
        delayedEnterTimer(0),
 
82
        currentMouseEvent(0)
 
83
    {
 
84
    }
 
85
 
 
86
    ImportImageModel*      model;
 
87
    ImportSortFilterModel* filterModel;
 
88
 
 
89
    ImportDelegate*        delegate;
 
90
    bool                   showToolTip;
 
91
 
 
92
    qlonglong              scrollToItemId;
 
93
 
 
94
    QTimer*                delayedEnterTimer;
 
95
 
 
96
    QMouseEvent*           currentMouseEvent;
 
97
};
 
98
 
 
99
ImportCategorizedView::ImportCategorizedView(QWidget* const parent)
 
100
    : DCategorizedView(parent), d(new Private)
 
101
{
 
102
    setToolTip(new ImportItemViewToolTip(this));
 
103
 
 
104
    LoadingCacheInterface::connectToSignalFileChanged(this,
 
105
            SLOT(slotFileChanged(QString)));
 
106
 
 
107
    d->delayedEnterTimer = new QTimer(this);
 
108
    d->delayedEnterTimer->setInterval(10);
 
109
    d->delayedEnterTimer->setSingleShot(true);
 
110
 
 
111
    connect(d->delayedEnterTimer, SIGNAL(timeout()),
 
112
            this, SLOT(slotDelayedEnter()));
 
113
}
 
114
 
 
115
ImportCategorizedView::~ImportCategorizedView()
 
116
{
 
117
    d->delegate->removeAllOverlays();
 
118
    delete d;
 
119
}
 
120
 
 
121
//FIXME: Needs testing
 
122
void ImportCategorizedView::installDefaultModels(CameraController* const controller)
 
123
{
 
124
    ImportModel* model             = new ImportModel(this);
 
125
    model->setupCameraController(controller);
 
126
    ImportFilterModel* filterModel = new ImportFilterModel(this);
 
127
 
 
128
    filterModel->setSourceImportModel(model);
 
129
 
 
130
//    ImportSettings* settings = ImportSettings::instance();
 
131
 
 
132
    filterModel->setSortRole(CamItemSortSettings::SortByFileName);
 
133
    filterModel->setSortOrder(CamItemSortSettings::AscendingOrder);
 
134
    filterModel->setCategorizationMode(CamItemSortSettings::CategoryByFormat);
 
135
    filterModel->sort(0); // an initial sorting is necessary
 
136
 
 
137
    setModels(model, filterModel);
 
138
}
 
139
 
 
140
void ImportCategorizedView::setModels(ImportImageModel* model, ImportSortFilterModel* filterModel)
 
141
{
 
142
    if (d->delegate)
 
143
    {
 
144
        d->delegate->setAllOverlaysActive(false);
 
145
    }
 
146
 
 
147
    if (d->filterModel)
 
148
    {
 
149
        disconnect(d->filterModel, SIGNAL(layoutAboutToBeChanged()),
 
150
                   this, SLOT(layoutAboutToBeChanged()));
 
151
 
 
152
        disconnect(d->filterModel, SIGNAL(layoutChanged()),
 
153
                   this, SLOT(layoutWasChanged()));
 
154
    }
 
155
 
 
156
    if (d->model)
 
157
    {
 
158
        disconnect(d->model, SIGNAL(itemInfosAdded(QList<CamItemInfo>)),
 
159
                   this, SLOT(slotCamItemInfosAdded()));
 
160
    }
 
161
 
 
162
    d->model       = model;
 
163
    d->filterModel = filterModel;
 
164
 
 
165
    setModel(d->filterModel);
 
166
 
 
167
    connect(d->filterModel, SIGNAL(layoutAboutToBeChanged()),
 
168
            this, SLOT(layoutAboutToBeChanged()));
 
169
 
 
170
    connect(d->filterModel, SIGNAL(layoutChanged()),
 
171
            this, SLOT(layoutWasChanged()),
 
172
            Qt::QueuedConnection);
 
173
 
 
174
    connect(d->model, SIGNAL(itemInfosAdded(QList<CamItemInfo>)),
 
175
            this, SLOT(slotCamItemInfosAdded()));
 
176
 
 
177
    emit modelChanged();
 
178
 
 
179
    if (d->delegate)
 
180
    {
 
181
        d->delegate->setAllOverlaysActive(true);
 
182
    }
 
183
}
 
184
 
 
185
ImportImageModel* ImportCategorizedView::importImageModel() const
 
186
{
 
187
    return d->model;
 
188
}
 
189
 
 
190
ImportSortFilterModel* ImportCategorizedView::importSortFilterModel() const
 
191
{
 
192
    return d->filterModel;
 
193
}
 
194
 
 
195
ImportFilterModel* ImportCategorizedView::importFilterModel() const
 
196
{
 
197
    return d->filterModel->importFilterModel();
 
198
}
 
199
 
 
200
ImportThumbnailModel* ImportCategorizedView::importThumbnailModel() const
 
201
{
 
202
    return qobject_cast<ImportThumbnailModel*>(d->model);
 
203
}
 
204
 
 
205
QSortFilterProxyModel* ImportCategorizedView::filterModel() const
 
206
{
 
207
    return d->filterModel;
 
208
}
 
209
 
 
210
ImportDelegate* ImportCategorizedView::delegate() const
 
211
{
 
212
    return d->delegate;
 
213
}
 
214
 
 
215
void ImportCategorizedView::setItemDelegate(ImportDelegate* delegate)
 
216
{
 
217
    ThumbnailSize oldSize       = thumbnailSize();
 
218
    ImportDelegate* oldDelegate = d->delegate;
 
219
 
 
220
    if (oldDelegate)
 
221
    {
 
222
        hideIndexNotification();
 
223
        d->delegate->setAllOverlaysActive(false);
 
224
        d->delegate->setViewOnAllOverlays(0);
 
225
 
 
226
        // Note: Be precise, no wildcard disconnect!
 
227
        disconnect(d->delegate, SIGNAL(requestNotification(QModelIndex,QString)),
 
228
                   this, SLOT(showIndexNotification(QModelIndex,QString)));
 
229
        disconnect(d->delegate, SIGNAL(hideNotification()),
 
230
                   this, SLOT(hideIndexNotification()));
 
231
    }
 
232
 
 
233
    d->delegate = delegate;
 
234
    delegate->setThumbnailSize(oldSize);
 
235
 
 
236
    if (oldDelegate)
 
237
    {
 
238
        d->delegate->setSpacing(oldDelegate->spacing());
 
239
    }
 
240
 
 
241
    DCategorizedView::setItemDelegate(d->delegate);
 
242
    setCategoryDrawer(d->delegate->categoryDrawer());
 
243
    updateDelegateSizes();
 
244
 
 
245
    d->delegate->setViewOnAllOverlays(this);
 
246
    d->delegate->setAllOverlaysActive(true);
 
247
 
 
248
    connect(d->delegate, SIGNAL(requestNotification(QModelIndex,QString)),
 
249
            this, SLOT(showIndexNotification(QModelIndex,QString)));
 
250
 
 
251
    connect(d->delegate, SIGNAL(hideNotification()),
 
252
            this, SLOT(hideIndexNotification()));
 
253
}
 
254
 
 
255
CamItemInfo ImportCategorizedView::currentInfo() const
 
256
{
 
257
    return d->filterModel->camItemInfo(currentIndex());
 
258
}
 
259
 
 
260
KUrl ImportCategorizedView::currentUrl() const
 
261
{
 
262
    return currentInfo().url();
 
263
}
 
264
 
 
265
QList<CamItemInfo> ImportCategorizedView::selectedCamItemInfos() const
 
266
{
 
267
    return d->filterModel->camItemInfos(selectedIndexes());
 
268
}
 
269
 
 
270
QList<CamItemInfo> ImportCategorizedView::selectedCamItemInfosCurrentFirst() const
 
271
{
 
272
    QList<QModelIndex> indexes = selectedIndexes();
 
273
    QModelIndex        current = currentIndex();
 
274
    QList<CamItemInfo>   infos;
 
275
 
 
276
    foreach(const QModelIndex& index, indexes)
 
277
    {
 
278
        CamItemInfo info = d->filterModel->camItemInfo(index);
 
279
 
 
280
        if (index == current)
 
281
        {
 
282
            infos.prepend(info);
 
283
        }
 
284
        else
 
285
        {
 
286
            infos.append(info);
 
287
        }
 
288
    }
 
289
 
 
290
    return infos;
 
291
}
 
292
 
 
293
QList<CamItemInfo> ImportCategorizedView::camItemInfos() const
 
294
{
 
295
    return d->filterModel->camItemInfosSorted();
 
296
}
 
297
 
 
298
KUrl::List ImportCategorizedView::urls() const
 
299
{
 
300
    QList<CamItemInfo> infos = camItemInfos();
 
301
    KUrl::List       urls;
 
302
 
 
303
    foreach(const CamItemInfo& info, infos)
 
304
    {
 
305
        urls << info.url();
 
306
    }
 
307
 
 
308
    return urls;
 
309
}
 
310
 
 
311
KUrl::List ImportCategorizedView::selectedUrls() const
 
312
{
 
313
    QList<CamItemInfo> infos = selectedCamItemInfos();
 
314
    KUrl::List       urls;
 
315
 
 
316
    foreach(const CamItemInfo& info, infos)
 
317
    {
 
318
        urls << info.url();
 
319
    }
 
320
 
 
321
    return urls;
 
322
}
 
323
 
 
324
void ImportCategorizedView::toIndex(const KUrl& url)
 
325
{
 
326
    DCategorizedView::toIndex(d->filterModel->indexForPath(url.toLocalFile()));
 
327
}
 
328
 
 
329
CamItemInfo ImportCategorizedView::nextInOrder(const CamItemInfo& startingPoint, int nth)
 
330
{
 
331
    QModelIndex index = d->filterModel->indexForCamItemInfo(startingPoint);
 
332
 
 
333
    if (!index.isValid())
 
334
    {
 
335
        return CamItemInfo();
 
336
    }
 
337
 
 
338
    return d->filterModel->camItemInfo(d->filterModel->index(index.row() + nth, 0, QModelIndex()));
 
339
}
 
340
 
 
341
QModelIndex ImportCategorizedView::nextIndexHint(const QModelIndex& anchor, const QItemSelectionRange& removed) const
 
342
{
 
343
    QModelIndex hint = DCategorizedView::nextIndexHint(anchor, removed);
 
344
    CamItemInfo info   = d->filterModel->camItemInfo(anchor);
 
345
 
 
346
    //kDebug() << "Having initial hint" << hint << "for" << anchor << d->model->numberOfIndexesForCamItemInfo(info);
 
347
 
 
348
    // Fixes a special case of multiple (face) entries for the same image.
 
349
    // If one is removed, any entry of the same image shall be preferred.
 
350
    if (d->model->numberOfIndexesForCamItemInfo(info) > 1)
 
351
    {
 
352
        // The hint is for a different info, but we may have a hint for the same info
 
353
        if (info != d->filterModel->camItemInfo(hint))
 
354
        {
 
355
            int minDiff                            = d->filterModel->rowCount();
 
356
            QList<QModelIndex> indexesForCamItemInfo = d->filterModel->mapListFromSource(d->model->indexesForCamItemInfo(info));
 
357
 
 
358
            foreach(const QModelIndex& index, indexesForCamItemInfo)
 
359
            {
 
360
                if (index == anchor || !index.isValid() || removed.contains(index))
 
361
                {
 
362
                    continue;
 
363
                }
 
364
 
 
365
                int distance = qAbs(index.row() - anchor.row());
 
366
 
 
367
                if (distance < minDiff)
 
368
                {
 
369
                    minDiff = distance;
 
370
                    hint = index;
 
371
                    //kDebug() << "Chose index" << hint << "at distance" << minDiff << "to" << anchor;
 
372
                }
 
373
            }
 
374
        }
 
375
    }
 
376
 
 
377
    return hint;
 
378
}
 
379
 
 
380
ThumbnailSize ImportCategorizedView::thumbnailSize() const
 
381
{
 
382
/*
 
383
    ImportThumbnailModel *thumbModel = importThumbnailModel();
 
384
    if (thumbModel)
 
385
        return thumbModel->thumbnailSize();
 
386
*/
 
387
    if (d->delegate)
 
388
    {
 
389
        return d->delegate->thumbnailSize();
 
390
    }
 
391
 
 
392
    return ThumbnailSize();
 
393
}
 
394
 
 
395
void ImportCategorizedView::setThumbnailSize(int size)
 
396
{
 
397
    setThumbnailSize(ThumbnailSize(size));
 
398
}
 
399
 
 
400
void ImportCategorizedView::setThumbnailSize(const ThumbnailSize& s)
 
401
{
 
402
    // we abuse this pair of method calls to restore scroll position
 
403
    layoutAboutToBeChanged();
 
404
    d->delegate->setThumbnailSize(s);
 
405
    layoutWasChanged();
 
406
}
 
407
 
 
408
void ImportCategorizedView::setCurrentWhenAvailable(qlonglong camItemId)
 
409
{
 
410
    d->scrollToItemId = camItemId;
 
411
}
 
412
 
 
413
void ImportCategorizedView::setCurrentUrl(const KUrl& url)
 
414
{
 
415
    if (url.isEmpty())
 
416
    {
 
417
        clearSelection();
 
418
        setCurrentIndex(QModelIndex());
 
419
        return;
 
420
    }
 
421
 
 
422
    QString path      = url.toLocalFile();
 
423
    QModelIndex index = d->filterModel->indexForPath(path);
 
424
 
 
425
    if (!index.isValid())
 
426
    {
 
427
        return;
 
428
    }
 
429
 
 
430
    clearSelection();
 
431
    setCurrentIndex(index);
 
432
}
 
433
 
 
434
void ImportCategorizedView::setCurrentInfo(const CamItemInfo& info)
 
435
{
 
436
    QModelIndex index = d->filterModel->indexForCamItemInfo(info);
 
437
    clearSelection();
 
438
    setCurrentIndex(index);
 
439
}
 
440
 
 
441
void ImportCategorizedView::setSelectedUrls(const KUrl::List& urlList)
 
442
{
 
443
    QItemSelection mySelection;
 
444
 
 
445
    for (KUrl::List::const_iterator it = urlList.constBegin(); it!=urlList.constEnd(); ++it)
 
446
    {
 
447
        const QString path = it->path();
 
448
        const QModelIndex index = d->filterModel->indexForPath(path);
 
449
 
 
450
        if (!index.isValid())
 
451
        {
 
452
            kWarning() << "no QModelIndex found for" << *it;
 
453
        }
 
454
        else
 
455
        {
 
456
            // TODO: is there a better way?
 
457
            mySelection.select(index, index);
 
458
        }
 
459
    }
 
460
 
 
461
    clearSelection();
 
462
    selectionModel()->select(mySelection, QItemSelectionModel::Select);
 
463
}
 
464
 
 
465
void ImportCategorizedView::setSelectedCamItemInfos(const QList<CamItemInfo>& infos)
 
466
{
 
467
    QItemSelection mySelection;
 
468
 
 
469
    foreach(const CamItemInfo& info, infos)
 
470
    {
 
471
        QModelIndex index = d->filterModel->indexForCamItemInfo(info);
 
472
        mySelection.select(index, index);
 
473
    }
 
474
 
 
475
    selectionModel()->select(mySelection, QItemSelectionModel::ClearAndSelect);
 
476
}
 
477
 
 
478
void ImportCategorizedView::hintAt(const CamItemInfo& info)
 
479
{
 
480
    if (info.isNull())
 
481
    {
 
482
        return;
 
483
    }
 
484
 
 
485
    QModelIndex index = d->filterModel->indexForCamItemInfo(info);
 
486
 
 
487
    if (!index.isValid())
 
488
    {
 
489
        return;
 
490
    }
 
491
 
 
492
    selectionModel()->setCurrentIndex(index, QItemSelectionModel::NoUpdate);
 
493
    scrollTo(index);
 
494
}
 
495
 
 
496
void ImportCategorizedView::addOverlay(ImageDelegateOverlay* overlay, ImportDelegate* delegate)
 
497
{
 
498
    if (!delegate)
 
499
    {
 
500
        delegate = d->delegate;
 
501
    }
 
502
 
 
503
    delegate->installOverlay(overlay);
 
504
 
 
505
    if (delegate == d->delegate)
 
506
    {
 
507
        overlay->setView(this);
 
508
        overlay->setActive(true);
 
509
    }
 
510
}
 
511
 
 
512
void ImportCategorizedView::removeOverlay(ImageDelegateOverlay* overlay)
 
513
{
 
514
    ImportDelegate* delegate = dynamic_cast<ImportDelegate*>(overlay->delegate());
 
515
 
 
516
    if (delegate)
 
517
    {
 
518
        delegate->removeOverlay(overlay);
 
519
    }
 
520
 
 
521
    overlay->setView(0);
 
522
}
 
523
 
 
524
void ImportCategorizedView::updateGeometries()
 
525
{
 
526
    DCategorizedView::updateGeometries();
 
527
    d->delayedEnterTimer->start();
 
528
}
 
529
 
 
530
void ImportCategorizedView::slotDelayedEnter()
 
531
{
 
532
    // re-emit entered() for index under mouse (after layout).
 
533
    QModelIndex mouseIndex = indexAt(mapFromGlobal(QCursor::pos()));
 
534
 
 
535
    if (mouseIndex.isValid())
 
536
    {
 
537
        emit DigikamKCategorizedView::entered(mouseIndex);
 
538
    }
 
539
}
 
540
 
 
541
void ImportCategorizedView::addSelectionOverlay(ImportDelegate* delegate)
 
542
{
 
543
    addOverlay(new ImageSelectionOverlay(this), delegate);
 
544
}
 
545
 
 
546
void ImportCategorizedView::scrollToStoredItem()
 
547
{
 
548
    if (d->scrollToItemId)
 
549
    {
 
550
        if (d->model->hasImage(d->scrollToItemId))
 
551
        {
 
552
            QModelIndex index = d->filterModel->indexForCamItemId(d->scrollToItemId);
 
553
            setCurrentIndex(index);
 
554
            scrollToRelaxed(index, QAbstractItemView::PositionAtCenter);
 
555
            d->scrollToItemId = 0;
 
556
        }
 
557
    }
 
558
}
 
559
 
 
560
void ImportCategorizedView::slotCamItemInfosAdded()
 
561
{
 
562
    if (d->scrollToItemId)
 
563
    {
 
564
        scrollToStoredItem();
 
565
    }
 
566
}
 
567
 
 
568
void ImportCategorizedView::slotFileChanged(const QString& filePath)
 
569
{
 
570
    QModelIndex index = d->filterModel->indexForPath(filePath);
 
571
 
 
572
    if (index.isValid())
 
573
    {
 
574
        update(index);
 
575
    }
 
576
}
 
577
 
 
578
void ImportCategorizedView::indexActivated(const QModelIndex& index)
 
579
{
 
580
    CamItemInfo info = d->filterModel->camItemInfo(index);
 
581
 
 
582
    if (!info.isNull())
 
583
    {
 
584
        activated(info);
 
585
        emit camItemInfoActivated(info);
 
586
    }
 
587
}
 
588
 
 
589
void ImportCategorizedView::currentChanged(const QModelIndex& index, const QModelIndex& previous)
 
590
{
 
591
    DCategorizedView::currentChanged(index, previous);
 
592
 
 
593
    emit currentChanged(d->filterModel->camItemInfo(index));
 
594
}
 
595
 
 
596
void ImportCategorizedView::selectionChanged(const QItemSelection& selectedItems, const QItemSelection& deselectedItems)
 
597
{
 
598
    DCategorizedView::selectionChanged(selectedItems, deselectedItems);
 
599
 
 
600
    if (!selectedItems.isEmpty())
 
601
    {
 
602
        emit selected(d->filterModel->camItemInfos(selectedItems.indexes()));
 
603
    }
 
604
 
 
605
    if (!deselectedItems.isEmpty())
 
606
    {
 
607
        emit deselected(d->filterModel->camItemInfos(deselectedItems.indexes()));
 
608
    }
 
609
}
 
610
 
 
611
void ImportCategorizedView::activated(const CamItemInfo&)
 
612
{
 
613
    // implemented in subclass
 
614
}
 
615
 
 
616
void ImportCategorizedView::showContextMenuOnIndex(QContextMenuEvent* event, const QModelIndex& index)
 
617
{
 
618
    CamItemInfo info = d->filterModel->camItemInfo(index);
 
619
    showContextMenuOnInfo(event, info);
 
620
}
 
621
 
 
622
void ImportCategorizedView::showContextMenuOnInfo(QContextMenuEvent*, const CamItemInfo&)
 
623
{
 
624
    // implemented in subclass
 
625
}
 
626
 
 
627
void ImportCategorizedView::paintEvent(QPaintEvent* e)
 
628
{
 
629
    DCategorizedView::paintEvent(e);
 
630
}
 
631
 
 
632
QItemSelectionModel* ImportCategorizedView::getSelectionModel() const
 
633
{
 
634
    return selectionModel();
 
635
}
 
636
 
 
637
AbstractItemDragDropHandler* ImportCategorizedView::dragDropHandler() const
 
638
{
 
639
    return d->model->dragDropHandler();
 
640
}
 
641
 
 
642
} // namespace Digikam