<br><br><div><span class="gmail_quote">2007/4/6, Marcel Wiesweg <<a href="mailto:marcel.wiesweg@gmx.de">marcel.wiesweg@gmx.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> Marcel:<br>><br>> How i can fix easily the single image editor core instance problem ? Like<br>> we have only one instance in memory, the image data are unique and we have<br>> a conflict between preview image data and whole image data when Preview
<br>> Mode and Image Editor are used at the same time.<br>><br>> I would to not re-implemente all core editor for preview mode. Code must be<br>> shared to reduce dupplicate implementation. There is certainly a simple way
<br>> to find (:=)))<br>><br>> Any suggestions ? Thanks in advance...<br><br>Currently DImgInterface is a singleton. The singleton is accessed from places<br>which could easily keep their own object, e.g. as a member of canvas:
<br>editorwindow.cpp<br>imagewindow.cpp<br>canvas.cpp<br>showfoto.cpp<br><br>But it is also accessed from all image plugins, these classes:<br>ImageIFace (!!!)<br>ImageDlgBase<br>ImageGuideDlg<br>CtrlPanelDlg<br><br>Here it is necessary to have some "default" DImgInterface.
<br><br>So to solve this, one could try to:<br>- make the DImgInterface constructor public<br>- add a DImgInterface object as a member variable of Canvas<br>- add a "DImgInterface::defaultInstance()" method (or keep the instance()
<br>method, no need to rename) for latter classes<br>- add a DImgInterfacesetDefaultInstance() method to set the default instance -<br>called from EditorWindow. Both EditorWindows (ImageWindow, ShowFoto are<br>singletons themselves)
</blockquote><div><br>Fine for me. i need this to implement the LightTable because i will use more than one instance of Canvas/DImgInterface at the same time, embeded in a same KMainWindow. I will souns like an image editor view separated by QSplitter. This vision of a future Light Table is fine for you ?
<br><br>If yes, are you free time this WE to patch source code of Canvas/DimageInterface in this way ?<br><br>Gilles</div></div><br>