Commit 2067a6dd authored by Jan Hambrecht's avatar Jan Hambrecht
Browse files

* made the canvas show something to play with

- added object list to the document and made the canvas use that list
- changed object list parameter to ctor and setObjects of KoShapeManager const
- added event handlers to the canvas


svn path=/trunk/koffice/; revision=547851
parent 11bb5054
......@@ -31,7 +31,7 @@
#include <QDebug>
#include <QPainter>
KoShapeManager::KoShapeManager( KoCanvasBase *canvas, QList<KoShape *> &objects )
KoShapeManager::KoShapeManager( KoCanvasBase *canvas, const QList<KoShape *> &objects )
: m_selection( new KoSelection() )
{
connect( m_selection, SIGNAL(selectionChanged()), this, SIGNAL(selectionChanged()) );
......@@ -57,7 +57,7 @@ KoShapeManager::~KoShapeManager()
}
void KoShapeManager::setObjects( QList<KoShape *> &objects )
void KoShapeManager::setObjects( const QList<KoShape *> &objects )
{
m_objects = objects;
foreach(KoShape *shape, m_objects)
......
......@@ -55,7 +55,7 @@ public:
* @param objects the objects to start out with, see also setObjects()
* @param canvas the canvas this shape manager is working on.
*/
KoShapeManager(KoCanvasBase *canvas, QList<KoShape *> &objects);
KoShapeManager(KoCanvasBase *canvas, const QList<KoShape *> &objects);
virtual ~KoShapeManager();
/**
......@@ -63,7 +63,7 @@ public:
* to be managed by this manager.
* @param objects the new objects to manage.
*/
void setObjects( QList<KoShape *> &objects );
void setObjects( const QList<KoShape *> &objects );
/// returns the list of maintained objects
const QList<KoShape *> & objects() const { return m_objects; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment