QCAD
Open Source 2D CAD
RGraphicsSceneDrawable Class Reference

Copyright (c) 2011-2017 by Andrew Mustun. More...

#include <RGraphicsSceneDrawable.h>

Public Types

enum  Type { Invalid, PainterPath, Image, Text }
 

Public Member Functions

RImageDatagetImage () const
 
RVector getOffset () const
 
RPainterPathgetPainterPath () const
 
RTextBasedDatagetText () const
 
RGraphicsSceneDrawable::Type getType () const
 
RGraphicsSceneDrawableoperator= (const RGraphicsSceneDrawable &other)
 
 RGraphicsSceneDrawable ()
 
 RGraphicsSceneDrawable (const RGraphicsSceneDrawable &other)
 
 RGraphicsSceneDrawable (const RPainterPath &pp, const RVector &os=RVector::nullVector)
 
 RGraphicsSceneDrawable (const RImageData &img, const RVector &os=RVector::nullVector)
 
 RGraphicsSceneDrawable (const RTextBasedData &txt, const RVector &os=RVector::nullVector)
 
void setHighlighted (bool on)
 
void setOffset (const RVector &o)
 
void setSelected (bool on)
 
void uninit ()
 
 ~RGraphicsSceneDrawable ()
 

Static Public Member Functions

static RGraphicsSceneDrawable createFromImage (const RImageData &img, const RVector &offset=RVector::nullVector)
 
static RGraphicsSceneDrawable createFromPainterPath (const RPainterPath &pp, const RVector &offset=RVector::nullVector)
 
static RGraphicsSceneDrawable createFromText (const RTextBasedData &txt, const RVector &offset=RVector::nullVector)
 

Protected Attributes

RImageDataimage
 
RVector offset
 
RPainterPathpainterPath
 
RTextBasedDatatext
 
Type type
 

Detailed Description

Copyright (c) 2011-2017 by Andrew Mustun.

All rights reserved.

This file is part of the QCAD project.

QCAD 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 3 of the License, or (at your option) any later version.

QCAD 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 QCAD.

Scriptable:
This class is available in script environments.
Copyable:
Objects are cleaned up automatically by the garbage collector of the script engine.

Member Enumeration Documentation

Enumerator
Invalid 
PainterPath 
Image 
Text 

Constructor & Destructor Documentation

RGraphicsSceneDrawable::RGraphicsSceneDrawable ( )
inline
RGraphicsSceneDrawable::RGraphicsSceneDrawable ( const RGraphicsSceneDrawable other)
RGraphicsSceneDrawable::RGraphicsSceneDrawable ( const RPainterPath pp,
const RVector os = RVector::nullVector 
)
Non-Scriptable:
This function is not available in script environments.
RGraphicsSceneDrawable::RGraphicsSceneDrawable ( const RImageData img,
const RVector os = RVector::nullVector 
)
Non-Scriptable:
This function is not available in script environments.
RGraphicsSceneDrawable::RGraphicsSceneDrawable ( const RTextBasedData txt,
const RVector os = RVector::nullVector 
)
Non-Scriptable:
This function is not available in script environments.
RGraphicsSceneDrawable::~RGraphicsSceneDrawable ( )

Member Function Documentation

RGraphicsSceneDrawable RGraphicsSceneDrawable::createFromImage ( const RImageData img,
const RVector offset = RVector::nullVector 
)
static
RGraphicsSceneDrawable RGraphicsSceneDrawable::createFromPainterPath ( const RPainterPath pp,
const RVector offset = RVector::nullVector 
)
static
RGraphicsSceneDrawable RGraphicsSceneDrawable::createFromText ( const RTextBasedData txt,
const RVector offset = RVector::nullVector 
)
static
RImageData& RGraphicsSceneDrawable::getImage ( ) const
inline
RVector RGraphicsSceneDrawable::getOffset ( ) const
inline
RPainterPath& RGraphicsSceneDrawable::getPainterPath ( ) const
inline
RTextBasedData& RGraphicsSceneDrawable::getText ( ) const
inline
RGraphicsSceneDrawable::Type RGraphicsSceneDrawable::getType ( ) const
inline
RGraphicsSceneDrawable & RGraphicsSceneDrawable::operator= ( const RGraphicsSceneDrawable other)
void RGraphicsSceneDrawable::setHighlighted ( bool  on)
void RGraphicsSceneDrawable::setOffset ( const RVector o)
inline
void RGraphicsSceneDrawable::setSelected ( bool  on)
void RGraphicsSceneDrawable::uninit ( )

Member Data Documentation

RImageData* RGraphicsSceneDrawable::image
protected
RVector RGraphicsSceneDrawable::offset
protected
RPainterPath* RGraphicsSceneDrawable::painterPath
protected
RTextBasedData* RGraphicsSceneDrawable::text
protected
Type RGraphicsSceneDrawable::type
protected

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