[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: class dependencies
From: Boudewijn Rempt <boud () valdyas ! org>
Date: 2003-10-15 13:54:52
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
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@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
[Attachment #5 (application/pgp-signature)]
_______________________________________________
kimageshop mailing list
kimageshop@mail.kde.org
http://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic