class dependencies

Boudewijn Rempt boud at
Wed Oct 15 16:54:52 CEST 2003

On Wednesday 15 October 2003 14:58, Patrick Julien wrote:
> However, you do have a point about KisPaintDevice using a KisDoc, KisDoc
> should inherit privately from an interface to handle this.

Something like:

 *  Copyright (c) 2003 Patrick Julien <freak at>
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  GNU General Public License for more details.
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 
#if !defined KIS_UNDO_H_
#define KIS_UNDO_H

class KisToolInterface {

	void setUndo(bool undo);
	void addCommand(KCommand *cmd);

#endif // KIS_UNDO_H_

Of course, there are more undo/redo related methods in kis_doc.h; they could 
perhaps all be abstracted away to this interface:

	void beginMacro(const QString& macroName);
	void endMacro();
	bool inMacro() const;
	void addCommand(KCommand *cmd);
	Q_INT32 undoLimit() const;
	void setUndoLimit(Q_INT32 limit);
	Q_INT32 redoLimit() const;
	void setRedoLimit(Q_INT32 limit);
	void setUndo(bool undo);
	bool undo() const;

Not sure what the macro methods do, though.

I'm still working at the endianness bug. A very educating experience -- just 
swapping the values of the PIXEL_RED etc. defs doesn't do it :-).
Boudewijn Rempt |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: signature
Url :

More information about the kimageshop mailing list