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

« back to all changes in this revision

Viewing changes to core/utilities/importui/items/importcategorydrawer.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-09-27 21:41:30 UTC
  • mfrom: (1.2.43)
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: package-import@ubuntu.com-20120927214130-i8v3ufr21nesp29i
Tags: 4:3.0.0~beta1a-1
* New upstream release

* Fix "wrongly conflicts phonon-backend-vlc" dropped (Closes: #688142)
* debian/watch include download.kde.org

* digikam 3.0.0 uses features from unreleased kdegraphics >=4.10 & ships 
a private version of the kdegraphics libs - this is not the Debian way :-(
* Unsatisfactory Conflicts: libkipi8, libkexiv2-10, libkdcraw20, libksane0
* Suspend digikam-dbg >130Mb

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-17
 
7
 * Description : Qt item view for images - category drawer
 
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
#ifndef IMPORTCATEGORYDRAWER_H
 
25
#define IMPORTCATEGORYDRAWER_H
 
26
 
 
27
// Qt includes
 
28
 
 
29
#include <QStyleOptionViewItem>
 
30
 
 
31
// KDE includes
 
32
 
 
33
#include <kdeversion.h>
 
34
#include <kcategorydrawer.h>
 
35
 
 
36
namespace Digikam
 
37
{
 
38
 
 
39
class ImportCategorizedView;
 
40
 
 
41
class ImportCategoryDrawer :
 
42
#if KDE_IS_VERSION(4,5,0)
 
43
    public KCategoryDrawerV3
 
44
#else
 
45
    public KCategoryDrawerV2
 
46
#endif
 
47
{
 
48
public:
 
49
 
 
50
    ImportCategoryDrawer(ImportCategorizedView* const parent);
 
51
    ~ImportCategoryDrawer();
 
52
 
 
53
    void setLowerSpacing(int spacing);
 
54
    void setDefaultViewOptions(const QStyleOptionViewItem& option);
 
55
    void invalidatePaintingCache();
 
56
 
 
57
    virtual int  categoryHeight(const QModelIndex& index, const QStyleOption& option) const;
 
58
    virtual void drawCategory(const QModelIndex& index, int sortRole, const QStyleOption& option, QPainter* painter) const;
 
59
    virtual int  maximumHeight() const;
 
60
 
 
61
private:
 
62
 
 
63
    void updateRectsAndPixmaps(int width);
 
64
    void viewHeaderText(const QModelIndex& index, QString* header, QString* subLine) const;
 
65
    void textForFormat(const QModelIndex& index, QString* header, QString* subLine) const;
 
66
 
 
67
private:
 
68
 
 
69
    class Private;
 
70
    Private* const d;
 
71
};
 
72
 
 
73
} // namespace Digikam
 
74
 
 
75
#endif // IMPORTCATEGORYDRAWER_H