1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : a widget to host settings as expander box in exclusive mode
9
* Copyright (C) 2008-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
10
* Copyright (C) 2008-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
11
* Copyright (C) 2010 by Manuel Viet <contact at 13zenrv dot fr>
13
* This program is free software; you can redistribute it
14
* and/or modify it under the terms of the GNU General
15
* Public License as published by the Free Software Foundation;
16
* either version 2, or (at your option)
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
* GNU General Public License for more details.
24
* ============================================================ */
26
#include "rexpanderboxexclusive.moc"
31
RExpanderBoxExclusive::RExpanderBoxExclusive(QWidget* parent)
32
: KDcrawIface::RExpanderBox(parent)
37
RExpanderBoxExclusive::~RExpanderBoxExclusive()
41
void RExpanderBoxExclusive::slotItemExpanded(bool b)
43
KDcrawIface::RLabelExpander* exp = dynamic_cast<KDcrawIface::RLabelExpander*>(sender());
50
while (item < count())
52
if (isItemExpanded(item) && item != indexOf(exp))
54
setItemExpanded(item, false);
59
emit signalItemExpanded(indexOf(exp), b);
62
void RExpanderBoxExclusive::setIsToolBox(bool b)
67
bool RExpanderBoxExclusive::isToolBox() const
72
} // namespace Digikam