krita
kis_doc_iface.cc00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "kis_doc_iface.h"
00020 #include <kapplication.h>
00021
00022 #include "kis_doc.h"
00023 #include "kis_image.h"
00024
00025 #include <dcopclient.h>
00026
00027 KisDocIface::KisDocIface( KisDoc *doc_ )
00028 : KoDocumentIface( doc_ )
00029 {
00030 m_doc = doc_;
00031 }
00032
00033 DCOPRef KisDocIface::currentImage()
00034 {
00035 KisImage *img = m_doc->currentImage();
00036 if( !img )
00037 return DCOPRef();
00038 else
00039 return DCOPRef( kapp->dcopClient()->appId(),
00040 img->dcopObject()->objId(),
00041 "KisImageIface");
00042 }
00043
00044 int KisDocIface::undoLimit () const
00045 {
00046 return m_doc->undoLimit();
00047 }
00048
00049 void KisDocIface::setUndoLimit(int limit)
00050 {
00051 m_doc->setUndoLimit(limit);
00052 }
00053
00054 int KisDocIface::redoLimit() const
00055 {
00056 return m_doc->redoLimit();
00057 }
00058
00059 void KisDocIface::setRedoLimit(int limit)
00060 {
00061 m_doc->setRedoLimit(limit);
00062 }
00063
00064 void KisDocIface::renameImage(const QString& oldName, const QString& newName)
00065 {
00066 m_doc->renameImage(oldName,newName);
00067 }
|