class dependencies
Patrick Julien
freak at codepimps.org
Wed Oct 15 11:04:01 CEST 2003
On October 15, 2003 09:54 am, Boudewijn Rempt wrote:
> 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_
Not quite no, but hold on, I will add it right now.
>
>
> 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 :-).
More information about the kimageshop
mailing list