1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : A widget to display a camera folder.
9
* Copyright (C) 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10
* Copyright (C) 2006-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
12
* This program is free software; you can redistribute it
13
* and/or modify it under the terms of the GNU General
14
* Public License as published by the Free Software Foundation;
15
* either version 2, or (at your option)
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
23
* ============================================================ */
25
#include "camerafolderitem.h"
30
class CameraFolderItem::Private
48
CameraFolderItem::CameraFolderItem(QTreeWidget* const parent, const QString& name, const QPixmap& pixmap)
49
: QTreeWidgetItem(parent), d(new Private)
56
CameraFolderItem::CameraFolderItem(QTreeWidgetItem* const parent, const QString& folderName,
57
const QString& folderPath, const QPixmap& pixmap)
58
: QTreeWidgetItem(parent), d(new Private)
60
d->folderName = folderName;
61
d->folderPath = folderPath;
62
d->virtualFolder = false;
68
CameraFolderItem::~CameraFolderItem()
73
bool CameraFolderItem::isVirtualFolder() const
75
return d->virtualFolder;
78
QString CameraFolderItem::folderName() const
83
QString CameraFolderItem::folderPath() const
88
void CameraFolderItem::changeCount(int val)
91
setText(0, QString("%1 (%2)").arg(d->name).arg(QString::number(d->count)));
94
void CameraFolderItem::setCount(int val)
97
setText(0, QString("%1 (%2)").arg(d->name).arg(QString::number(d->count)));
100
int CameraFolderItem::count() const
105
} // namespace Digikam