00001 /* This file is part of the KDE project 00002 * Copyright (C) 2006 Thomas Zander <zander@kde.org> 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Library General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this library; see the file COPYING.LIB. If not, write to 00016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #include "KoShapeGroup.h" 00021 00022 KoShapeGroup::KoShapeGroup() 00023 : KoShapeContainer(new GroupMembers()) 00024 { 00025 } 00026 00027 void KoShapeGroup::paintComponent(QPainter &painter, const KoViewConverter &converter) { 00028 Q_UNUSED(painter); 00029 Q_UNUSED(converter); 00030 } 00031 00032 bool KoShapeGroup::hitTest( const QPointF &position ) const { 00033 Q_UNUSED(position); 00034 return false; 00035 } 00036 00037 // ############# GroupMembers ############# 00038 void KoShapeGroup::GroupMembers::add(KoShape *child) { 00039 if(m_groupMembers.contains(child)) 00040 return; 00041 m_groupMembers.append(child); 00042 } 00043 00044 void KoShapeGroup::GroupMembers::remove(KoShape *child) { 00045 m_groupMembers.removeAll(child); 00046 } 00047 00048 int KoShapeGroup::GroupMembers::count() const { 00049 return m_groupMembers.count(); 00050 } 00051 00052 QList<KoShape*> KoShapeGroup::GroupMembers::iterator() const { 00053 return QList<KoShape*>(m_groupMembers); 00054 } 00055 00056 void KoShapeGroup::GroupMembers::containerChanged(KoShapeContainer *container) { 00057 Q_UNUSED(container); 00058 } 00059 00060 void KoShapeGroup::GroupMembers::setClipping(const KoShape *child, bool clipping) { 00061 Q_UNUSED(child); 00062 Q_UNUSED(clipping); 00063 } 00064 00065 bool KoShapeGroup::GroupMembers::childClipped(const KoShape *child) const { 00066 Q_UNUSED(child); 00067 return false; 00068 } 00069 00070 void KoShapeGroup::childCountChanged() { 00071 QRectF br = boundingRect(); 00072 setPosition( br.topLeft() ); 00073 resize( br.size() ); 00074 }