class dependencies

Boudewijn Rempt boud at valdyas.org
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 codepimps.org>
 *
 *  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
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  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, 
USA.
 */
#if !defined KIS_UNDO_H_
#define KIS_UNDO_H

class KisToolInterface {

public:
	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 | http://www.valdyas.org/index2.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: signature
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20031015/76340263/attachment.bin


More information about the kimageshop mailing list