QCAD
Open Source 2D CAD
RGraphicsSceneDrawable Class Reference

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

#include <RGraphicsSceneDrawable.h>

Public Types

enum  Mode { NoMode = 0x0000, NoPlot = 0x0001, PixelUnit = 0x0002 }
 
enum  Type { Invalid, PainterPath, Image, Text }
 

Public Member Functions

RDocumentgetDocument () const
 
RImageDatagetImage () const
 
bool getMode (RGraphicsSceneDrawable::Mode mode) const
 
bool getNoPlot () const
 
RVector getOffset () const
 
RPainterPathgetPainterPath () const
 
bool getPixelUnit () 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 setMode (RGraphicsSceneDrawable::Mode mode, bool on=true)
 
void setNoPlot (bool on)
 
void setOffset (const RVector &o)
 
void setPixelUnit (bool on)
 
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
 
Modes modes
 
RVector offset
 
RPainterPathpainterPath
 
RTextBasedDatatext
 
Type type
 

Detailed Description

Copyright (c) 2011-2018 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
NoMode 
NoPlot 

not plotted (from not plottable layers)

PixelUnit 

unit interpreted as pixels

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
RDocument * RGraphicsSceneDrawable::getDocument ( ) const
RImageData& RGraphicsSceneDrawable::getImage ( ) const
inline
bool RGraphicsSceneDrawable::getMode ( RGraphicsSceneDrawable::Mode  mode) const
inline
bool RGraphicsSceneDrawable::getNoPlot ( ) const
inline
RVector RGraphicsSceneDrawable::getOffset ( ) const
inline
RPainterPath& RGraphicsSceneDrawable::getPainterPath ( ) const
inline
bool RGraphicsSceneDrawable::getPixelUnit ( ) 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::setMode ( RGraphicsSceneDrawable::Mode  mode,
bool  on = true 
)
inline
void RGraphicsSceneDrawable::setNoPlot ( bool  on)
inline
void RGraphicsSceneDrawable::setOffset ( const RVector o)
inline
void RGraphicsSceneDrawable::setPixelUnit ( bool  on)
inline
void RGraphicsSceneDrawable::setSelected ( bool  on)
void RGraphicsSceneDrawable::uninit ( )

Member Data Documentation

RImageData* RGraphicsSceneDrawable::image
protected
Modes RGraphicsSceneDrawable::modes
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: