krita/ui

KisDoc2 Class Reference

The class that represents a Krita document containing content and settings. More...

#include <kis_doc2.h>

Inheritance diagram for KisDoc2:

List of all members.

Public Slots

virtual void initEmpty ()

Signals

void sigLoadingFinished ()

Public Member Functions

 KisDoc2 (QWidget *parentWidget=0, QObject *parent=0, bool singleViewMode=true)
virtual ~KisDoc2 ()
KoShape * addShape (const KisNodeSP node)
virtual bool completeLoading (KoStore *store)
virtual bool completeSaving (KoStore *)
virtual QList
< KoDocument::CustomDocumentWidgetItem > 
createCustomDocumentWidgets (QWidget *parent)
virtual KoViewcreateViewInstance (QWidget *parent)
virtual QPixmap generatePreview (const QSize &size)
KisImageWSP image () const
virtual bool loadOdf (KoOdfReadStore &odfStore)
virtual bool loadXML (const KoXmlDocument &doc, KoStore *store)
virtual QByteArray mimeType () const
KisImageWSP newImage (const QString &name, qint32 width, qint32 height, const KoColorSpace *colorspace)
bool newImage (const QString &name, qint32 width, qint32 height, const KoColorSpace *cs, const KoColor &bgColor, const QString &imgDescription, const double imgResolution)
KisNodeModelnodeModel () const
virtual void paintContent (QPainter &painter, const QRect &rect)
void prepareForImport ()
virtual bool saveOdf (SavingContext &documentContext)
virtual QDomDocument saveXML ()
void setCurrentImage (KisImageWSP image)
virtual void setUndo (bool undo)
KoShapeControllerBaseshapeController () const
KoShape * shapeForNode (KisNodeSP layer) const
virtual bool undo () const
KisUndoAdapter * undoAdapter () const
virtual bool wantExportConfirmation () const

Protected Slots

virtual void openExistingFile (const KUrl &url)
virtual void openTemplate (const KUrl &url)

Detailed Description

The class that represents a Krita document containing content and settings.

KisDoc2 also keeps track of the correspondence between the layer structure of the KisImage and the shape tree that is used by the tools.

XXX: File format TODOs

load/save the channel flags setting for layers

Definition at line 58 of file kis_doc2.h.


Constructor & Destructor Documentation

KisDoc2::KisDoc2 ( QWidget parentWidget = 0,
QObject parent = 0,
bool  singleViewMode = true 
)

Definition at line 141 of file kis_doc2.cc.

KisDoc2::~KisDoc2 (  )  [virtual]

Definition at line 152 of file kis_doc2.cc.


Member Function Documentation

KoShape * KisDoc2::addShape ( const KisNodeSP  node  ) 

Add a node to the shape controller.

Definition at line 485 of file kis_doc2.cc.

bool KisDoc2::completeLoading ( KoStore *  store  )  [virtual]

Definition at line 304 of file kis_doc2.cc.

bool KisDoc2::completeSaving ( KoStore *  store  )  [virtual]

Definition at line 288 of file kis_doc2.cc.

QList< KoDocument::CustomDocumentWidgetItem > KisDoc2::createCustomDocumentWidgets ( QWidget parent  )  [virtual]

Definition at line 334 of file kis_doc2.cc.

KoView * KisDoc2::createViewInstance ( QWidget parent  )  [virtual]

Definition at line 425 of file kis_doc2.cc.

QPixmap KisDoc2::generatePreview ( const QSize size  )  [virtual]

Generate a scaled-down pixmap of the image projection that fits in size.

Definition at line 452 of file kis_doc2.cc.

KisImageWSP KisDoc2::image (  )  const

Definition at line 533 of file kis_doc2.cc.

void KisDoc2::initEmpty (  )  [virtual, slot]

Initialize an empty document using default values.

Since:
1.5

Definition at line 554 of file kis_doc2.cc.

bool KisDoc2::loadOdf ( KoOdfReadStore &  odfStore  )  [virtual]

Definition at line 228 of file kis_doc2.cc.

bool KisDoc2::loadXML ( const KoXmlDocument &  doc,
KoStore *  store 
) [virtual]

Definition at line 241 of file kis_doc2.cc.

QByteArray KisDoc2::mimeType (  )  const [virtual]

Definition at line 159 of file kis_doc2.cc.

KisImageWSP KisDoc2::newImage ( const QString name,
qint32  width,
qint32  height,
const KoColorSpace *  colorspace 
)

Create a new image that has this document as a parent and replace the current image with this image.

FIXME: check whether this is a good value

Definition at line 359 of file kis_doc2.cc.

bool KisDoc2::newImage ( const QString name,
qint32  width,
qint32  height,
const KoColorSpace *  cs,
const KoColor &  bgColor,
const QString imgDescription,
const double  imgResolution 
)

Create a new image that has this document as a parent and replace the current image with this image.

Definition at line 373 of file kis_doc2.cc.

KisNodeModel * KisDoc2::nodeModel (  )  const

The layer model provides a light-weight Qt model-view compatible model on the internal Krita image layer hierarchy.

Definition at line 492 of file kis_doc2.cc.

void KisDoc2::openExistingFile ( const KUrl &  url  )  [protected, virtual, slot]

Definition at line 164 of file kis_doc2.cc.

void KisDoc2::openTemplate ( const KUrl &  url  )  [protected, virtual, slot]

Definition at line 173 of file kis_doc2.cc.

void KisDoc2::paintContent ( QPainter painter,
const QRect rect 
) [virtual]

Draw the image embedded in another KOffice document.

Definition at line 443 of file kis_doc2.cc.

void KisDoc2::prepareForImport (  ) 

Makes an otherwise empty document ready for import/export.

Definition at line 526 of file kis_doc2.cc.

bool KisDoc2::saveOdf ( SavingContext &  documentContext  )  [virtual]

Definition at line 235 of file kis_doc2.cc.

QDomDocument KisDoc2::saveXML (  )  [virtual]

Definition at line 212 of file kis_doc2.cc.

void KisDoc2::setCurrentImage ( KisImageWSP  image  ) 

Set the current image to the specified image and turn undo on.

Definition at line 539 of file kis_doc2.cc.

void KisDoc2::setUndo ( bool  undo  )  [virtual]

Definition at line 465 of file kis_doc2.cc.

KoShapeControllerBase * KisDoc2::shapeController (  )  const

The shape controller matches internal krita image layers with the flake shape hierarchy.

Definition at line 475 of file kis_doc2.cc.

KoShape * KisDoc2::shapeForNode ( KisNodeSP  layer  )  const

Definition at line 480 of file kis_doc2.cc.

void KisDoc2::sigLoadingFinished (  )  [signal]
bool KisDoc2::undo (  )  const [virtual]

Definition at line 470 of file kis_doc2.cc.

KisUndoAdapter * KisDoc2::undoAdapter (  )  const

Definition at line 561 of file kis_doc2.cc.

virtual bool KisDoc2::wantExportConfirmation (  )  const [inline, virtual]

Definition at line 69 of file kis_doc2.h.


The documentation for this class was generated from the following files: