From kde-kimageshop Wed Oct 15 13:54:52 2003 From: Boudewijn Rempt Date: Wed, 15 Oct 2003 13:54:52 +0000 To: kde-kimageshop Subject: Re: class dependencies X-MARC-Message: https://marc.info/?l=kde-kimageshop&m=106622618013088 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1759931743==" --===============1759931743== Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_vGVj/F82rVKBcPM"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit --Boundary-02=_vGVj/F82rVKBcPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: signed data Content-Disposition: inline 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 * * 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,= =20 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 coul= d=20 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 -- jus= t=20 swapping the values of the PIXEL_RED etc. defs doesn't do it :-). =2D-=20 Boudewijn Rempt | http://www.valdyas.org/index2.html --Boundary-02=_vGVj/F82rVKBcPM Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQA/jVGvdaCcgCmN5d8RAr0DAKDKRBEJUEbfufVqB3eQHJsw3BeduwCdGDx3 lC945EYVr58hr5G47UHcFhY= =PzJo -----END PGP SIGNATURE----- --Boundary-02=_vGVj/F82rVKBcPM-- --===============1759931743== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kimageshop mailing list kimageshop@mail.kde.org http://mail.kde.org/mailman/listinfo/kimageshop --===============1759931743==--