QCAD
Open Source 2D CAD
RLayout Class Reference

Represents a layout definition in a drawing. More...

#include <RLayout.h>

Inheritance diagram for RLayout:
RObject

Public Types

enum  PlotPaperUnits { Inches = 0, Millimeters = 1, Pixels = 2 }
 
enum  PlotRotation { Zero = 0, CounterClockWise = 1, Inverted = 2, ClockWise = 3 }
 
enum  PlotType {
  Display = 0, Extents = 1, Limits = 2, View = 3,
  Window = 4, Layout = 5
}
 
enum  StandardScaleType {
  Scale_ScaleToFit = 0, Scale_1_128in_1ft = 1, Scale_1_64in_1ft = 2, Scale_1_32in_1ft = 3,
  Scale_1_16in_1ft = 4, Scale_3_32in_1ft = 5, Scale_1_8in_1ft = 6, Scale_3_16in_1ft = 7,
  Scale_1_4in_1ft = 8, Scale_3_8in_1ft = 9, Scale_1_2in_1ft = 10, Scale_3_4in_1ft = 11,
  Scale_1in_1ft = 12, Scale_3in_1ft = 13, Scale_6in_1ft = 14, Scale_1ft_1ft = 15,
  Scale_1_1 = 16, Scale_1_2 = 17, Scale_1_4 = 18, Scale_1_5 = 19,
  Scale_1_8 = 20, Scale_1_10 = 21, Scale_1_16 = 22, Scale_1_20 = 23,
  Scale_1_30 = 24, Scale_1_40 = 25, Scale_1_50 = 26, Scale_1_100 = 27,
  Scale_2_1 = 28, Scale_4_1 = 29, Scale_8_1 = 30, Scale_10_1 = 31,
  Scale_100_1 = 32, Scale_1000_1 = 33, Scale_1and1_2in_1ft = 34
}
 
- Public Types inherited from RObject
typedef int Handle
 
typedef int Id
 
enum  ObjectFlag { NoFlags = 0x000, Undone = 0x001, Protect = 0x002 }
 
enum  XYZ { X, Y, Z }
 

Public Member Functions

virtual RLayoutclone () const
 
QString getCanonicalMediaName () const
 
double getDenominatorCustomScale () const
 
RVector getInsertionBase () const
 
RVector getMaxExtents () const
 
RVector getMaxLimits () const
 
RVector getMinExtents () const
 
RVector getMinLimits () const
 
QString getName () const
 
double getNumeratorCustomScale () const
 
RVector getPlotOrigin () const
 
double getPlotPaperMarginBottomMM () const
 
double getPlotPaperMarginLeftMM () const
 
double getPlotPaperMarginRightMM () const
 
double getPlotPaperMarginTopMM () const
 
RVector getPlotPaperSize () const
 
RLayout::PlotPaperUnits getPlotPaperUnits () const
 
RLayout::PlotRotation getPlotRotation () const
 
RLayout::PlotType getPlotType () const
 
RVector getPlotWindowAreaMax () const
 
RVector getPlotWindowAreaMin () const
 
virtual QPair< QVariant, RPropertyAttributesgetProperty (RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
 
double getStandardScale () const
 
RLayout::StandardScaleType getStandardScaleType () const
 
int getTabOrder () const
 
virtual RS::EntityType getType () const
 
bool getUseStandardScale () const
 
virtual bool isSelectedForPropertyEditing ()
 
 RLayout ()
 
 RLayout (RDocument *document, const QString &name)
 
void setCanonicalMediaName (const QString &v)
 
void setDenominatorCustomScale (double v)
 
void setInsertionBase (const RVector &insertionBase)
 
void setMaxExtents (const RVector &maxExtents)
 
void setMaxLimits (const RVector &maxLimits)
 
void setMinExtents (const RVector &minExtents)
 
void setMinLimits (const RVector &minLimits)
 
void setName (const QString &n)
 
void setNumeratorCustomScale (double v)
 
void setPlotOrigin (const RVector &v)
 
void setPlotPaperMarginBottomMM (double v)
 
void setPlotPaperMarginLeftMM (double v)
 
void setPlotPaperMarginRightMM (double v)
 
void setPlotPaperMarginTopMM (double v)
 
void setPlotPaperSize (const RVector &v)
 
void setPlotPaperUnits (RLayout::PlotPaperUnits v)
 
void setPlotRotation (RLayout::PlotRotation v)
 
void setPlotType (RLayout::PlotType v)
 
void setPlotWindowAreaMax (const RVector &v)
 
void setPlotWindowAreaMin (const RVector &v)
 
virtual bool setProperty (RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
 Sets the given property to the given value. More...
 
void setStandardScale (double v)
 
void setStandardScaleType (RLayout::StandardScaleType v)
 
void setTabOrder (int to)
 
void setUseStandardScale (bool v)
 
virtual ~RLayout ()
 
- Public Member Functions inherited from RObject
void copyCustomPropertiesFrom (RObject *other, const QString &title=RDEFAULT_QSTRING, bool overwrite=false, const QStringList &ignoreList=RDEFAULT_QSTRINGLIST, const QString &mapKeyFrom=RDEFAULT_QSTRING, const QString &mapKeyTo=RDEFAULT_QSTRING)
 Copies all custom properties from the given object. More...
 
void dump () const
 
virtual int getComplexity () const
 
virtual bool getCustomBoolProperty (const QString &title, const QString &key, bool defaultValue) const
 
virtual double getCustomDoubleProperty (const QString &title, const QString &key, double defaultValue) const
 
virtual int getCustomIntProperty (const QString &title, const QString &key, int defaultValue) const
 
QMap< QString, QVariantMap > getCustomProperties () const
 
virtual QVariant getCustomProperty (const QString &title, const QString &key, const QVariant &defaultValue=RDEFAULT_QVARIANT) const
 
QStringList getCustomPropertyKeys (const QString &title) const
 
QStringList getCustomPropertyTitles () const
 
virtual QSet< RPropertyTypeIdgetCustomPropertyTypeIds () const
 
RDocumentgetDocument ()
 
const RDocumentgetDocument () const
 
bool getFlag (int flag) const
 
RObject::Handle getHandle () const
 
RObject::Id getId () const
 
virtual QSet< RPropertyTypeIdgetPropertyTypeIds (RPropertyAttributes::Option option=RPropertyAttributes::NoOptions) const
 
bool hasCustomProperties () const
 
bool hasCustomProperty (const QString &title, const QString &key) const
 
bool hasCustomProperty (const QString &title, const QRegExp &key) const
 
virtual bool hasPropertyType (RPropertyTypeId propertyTypeId)
 
bool isProtected () const
 
bool isUndone () const
 
virtual void removeCustomProperty (const QString &title, const QString &key)
 Removes the custom property with the given name. More...
 
 RObject (RDocument *document=NULL)
 
 RObject (const RObject &other)
 
virtual void setAutoUpdatesBlocked (bool on)
 
virtual void setCustomProperties (const RQMapQStringQString &properties)
 
virtual void setCustomProperty (const QString &title, const QString &key, const QVariant &value)
 Sets a custom property with the given name. More...
 
void setDocument (RDocument *document)
 
void setFlag (int flag, bool on=true)
 
void setProtected (bool on)
 
virtual ~RObject ()
 

Static Public Member Functions

static void init ()
 
- Static Public Member Functions inherited from RObject
static RPropertyAttributes getCustomPropertyAttributes (const QString &title, const QString &key)
 
static void init ()
 
static void setCustomPropertyAttributes (const QString &title, const QString &key, const RPropertyAttributes &att)
 Set attributes (read-only, invisible, ...) for the given custom property. More...
 
template<class T >
static bool setMember (T &variable, const QVariant &value, bool condition=true)
 

Static Public Attributes

static RPropertyTypeId PropertyCanonicalMediaName
 
static RPropertyTypeId PropertyCustom
 Copyright (c) 2011-2018 by Andrew Mustun. More...
 
static RPropertyTypeId PropertyDenominatorCustomScale
 
static RPropertyTypeId PropertyInsertionBaseX
 
static RPropertyTypeId PropertyInsertionBaseY
 
static RPropertyTypeId PropertyInsertionBaseZ
 
static RPropertyTypeId PropertyMaxExtentsX
 
static RPropertyTypeId PropertyMaxExtentsY
 
static RPropertyTypeId PropertyMaxExtentsZ
 
static RPropertyTypeId PropertyMaxLimitsX
 
static RPropertyTypeId PropertyMaxLimitsY
 
static RPropertyTypeId PropertyMaxLimitsZ
 
static RPropertyTypeId PropertyMinExtentsX
 
static RPropertyTypeId PropertyMinExtentsY
 
static RPropertyTypeId PropertyMinExtentsZ
 
static RPropertyTypeId PropertyMinLimitsX
 
static RPropertyTypeId PropertyMinLimitsY
 
static RPropertyTypeId PropertyMinLimitsZ
 
static RPropertyTypeId PropertyName
 
static RPropertyTypeId PropertyNumeratorCustomScale
 
static RPropertyTypeId PropertyPlotOriginX
 
static RPropertyTypeId PropertyPlotOriginY
 
static RPropertyTypeId PropertyPlotPaperMarginBottomMM
 
static RPropertyTypeId PropertyPlotPaperMarginLeftMM
 
static RPropertyTypeId PropertyPlotPaperMarginRightMM
 
static RPropertyTypeId PropertyPlotPaperMarginTopMM
 
static RPropertyTypeId PropertyPlotPaperSizeHeight
 
static RPropertyTypeId PropertyPlotPaperSizeWidth
 
static RPropertyTypeId PropertyPlotPaperUnits
 
static RPropertyTypeId PropertyPlotRotation
 
static RPropertyTypeId PropertyPlotType
 
static RPropertyTypeId PropertyPlotWindowAreaMaxX
 
static RPropertyTypeId PropertyPlotWindowAreaMaxY
 
static RPropertyTypeId PropertyPlotWindowAreaMinX
 
static RPropertyTypeId PropertyPlotWindowAreaMinY
 
static RPropertyTypeId PropertyStandardScale
 
static RPropertyTypeId PropertyStandardScaleType
 
static RPropertyTypeId PropertyTabOrder
 
static RPropertyTypeId PropertyUseStandardScale
 
- Static Public Attributes inherited from RObject
static const Handle INVALID_HANDLE = -1
 
static const Id INVALID_ID = -1
 Copyright (c) 2011-2018 by Andrew Mustun. More...
 
static RPropertyTypeId PropertyCustom
 
static RPropertyTypeId PropertyHandle
 
static RPropertyTypeId PropertyProtected
 
static RPropertyTypeId PropertyType
 

Protected Member Functions

virtual void print (QDebug dbg) const
 
- Protected Member Functions inherited from RObject
void setHandle (RObject::Handle h)
 
void setId (RObject::Id id)
 
bool setMemberFlag (int flag, const QVariant &value, bool condition=true)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void setUndone (bool on)
 

Private Attributes

QString canonicalMediaName
 
double denominatorCustomScale
 
RVector insertionBase
 
RVector maxExtents
 
RVector maxLimits
 
RVector minExtents
 
RVector minLimits
 
QString name
 
double numeratorCustomScale
 
RVector plotOrigin
 
double plotPaperMarginBottomMM
 
double plotPaperMarginLeftMM
 
double plotPaperMarginRightMM
 
double plotPaperMarginTopMM
 
RVector plotPaperSize
 
PlotPaperUnits plotPaperUnits
 
PlotRotation plotRotation
 
PlotType plotType
 
RVector plotWindowAreaMax
 
RVector plotWindowAreaMin
 
double standardScale
 
StandardScaleType standardScaleType
 
int tabOrder
 
bool useStandardScale
 

Additional Inherited Members

- Static Protected Member Functions inherited from RObject
static bool setMember (QString &variable, const QVariant &value, bool condition=true)
 Sets the given property. More...
 
static bool setMember (double &variable, const QVariant &value, bool condition=true)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
static bool setMember (int &variable, const QVariant &value, bool condition=true)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
static bool setMember (bool &variable, const QVariant &value, bool condition=true)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
static bool setMember (QList< double > &variable, const QVariant &value, bool condition)
 
static bool setMemberVector (QList< RVector > &variable, const QVariant &value, RObject::XYZ xyz)
 
static bool setMemberX (QList< RVector > &variable, const QVariant &value, bool condition=true)
 
static bool setMemberY (QList< RVector > &variable, const QVariant &value, bool condition=true)
 
static bool setMemberZ (QList< RVector > &variable, const QVariant &value, bool condition=true)
 

Detailed Description

Represents a layout definition in a drawing.

Scriptable:
This class is available in script environments.
Shared Pointer Support:
Objects can be used in QSharedPointer.

Constructor & Destructor Documentation

RLayout::RLayout ( )
RLayout::RLayout ( RDocument document,
const QString &  name 
)
RLayout::~RLayout ( )
virtual

Member Function Documentation

RLayout * RLayout::clone ( ) const
virtual

Implements RObject.

QString RLayout::getCanonicalMediaName ( ) const
inline
double RLayout::getDenominatorCustomScale ( ) const
inline
RVector RLayout::getInsertionBase ( ) const
inline
RVector RLayout::getMaxExtents ( ) const
inline
RVector RLayout::getMaxLimits ( ) const
inline
RVector RLayout::getMinExtents ( ) const
inline
RVector RLayout::getMinLimits ( ) const
inline
QString RLayout::getName ( ) const
inline
double RLayout::getNumeratorCustomScale ( ) const
inline
RVector RLayout::getPlotOrigin ( ) const
inline
double RLayout::getPlotPaperMarginBottomMM ( ) const
inline
double RLayout::getPlotPaperMarginLeftMM ( ) const
inline
double RLayout::getPlotPaperMarginRightMM ( ) const
inline
double RLayout::getPlotPaperMarginTopMM ( ) const
inline
RVector RLayout::getPlotPaperSize ( ) const
inline
RLayout::PlotPaperUnits RLayout::getPlotPaperUnits ( ) const
inline
RLayout::PlotRotation RLayout::getPlotRotation ( ) const
inline
RLayout::PlotType RLayout::getPlotType ( ) const
inline
RVector RLayout::getPlotWindowAreaMax ( ) const
inline
RVector RLayout::getPlotWindowAreaMin ( ) const
inline
QPair< QVariant, RPropertyAttributes > RLayout::getProperty ( RPropertyTypeId propertyTypeId,
bool  humanReadable = false,
bool  noAttributes = false,
bool  showOnRequest = false 
)
virtual
Returns
The value and attributes of the given property or an invalid property if this property owner has no property with the given ID.

Reimplemented from RObject.

double RLayout::getStandardScale ( ) const
inline
RLayout::StandardScaleType RLayout::getStandardScaleType ( ) const
inline
int RLayout::getTabOrder ( ) const
inline
virtual RS::EntityType RLayout::getType ( ) const
inlinevirtual

Implements RObject.

bool RLayout::getUseStandardScale ( ) const
inline
void RLayout::init ( )
static
bool RLayout::isSelectedForPropertyEditing ( )
virtual
Returns
True if this object is selected for editing. This means that the properties of this object should for example be shown in a property editor.

Implements RObject.

void RLayout::print ( QDebug  dbg) const
protectedvirtual
Non-Scriptable:
This function is not available in script environments.

Reimplemented from RObject.

void RLayout::setCanonicalMediaName ( const QString &  v)
inline
void RLayout::setDenominatorCustomScale ( double  v)
inline
void RLayout::setInsertionBase ( const RVector insertionBase)
inline
void RLayout::setMaxExtents ( const RVector maxExtents)
inline
void RLayout::setMaxLimits ( const RVector maxLimits)
inline
void RLayout::setMinExtents ( const RVector minExtents)
inline
void RLayout::setMinLimits ( const RVector minLimits)
inline
void RLayout::setName ( const QString &  n)
void RLayout::setNumeratorCustomScale ( double  v)
inline
void RLayout::setPlotOrigin ( const RVector v)
inline
void RLayout::setPlotPaperMarginBottomMM ( double  v)
inline
void RLayout::setPlotPaperMarginLeftMM ( double  v)
inline
void RLayout::setPlotPaperMarginRightMM ( double  v)
inline
void RLayout::setPlotPaperMarginTopMM ( double  v)
inline
void RLayout::setPlotPaperSize ( const RVector v)
inline
void RLayout::setPlotPaperUnits ( RLayout::PlotPaperUnits  v)
inline
void RLayout::setPlotRotation ( RLayout::PlotRotation  v)
inline
void RLayout::setPlotType ( RLayout::PlotType  v)
inline
void RLayout::setPlotWindowAreaMax ( const RVector v)
inline
void RLayout::setPlotWindowAreaMin ( const RVector v)
inline
bool RLayout::setProperty ( RPropertyTypeId  propertyTypeId,
const QVariant &  value,
RTransaction transaction = NULL 
)
virtual

Sets the given property to the given value.

If this property owner does not know a property with that ID, it is up to the property owner what happens. The property might be added into a list of dynamic properties or dropped.

Returns
True if the property owner was modified in any way, false otherwise.

Reimplemented from RObject.

void RLayout::setStandardScale ( double  v)
inline
void RLayout::setStandardScaleType ( RLayout::StandardScaleType  v)
inline
void RLayout::setTabOrder ( int  to)
inline
void RLayout::setUseStandardScale ( bool  v)
inline

Member Data Documentation

QString RLayout::canonicalMediaName
private
double RLayout::denominatorCustomScale
private
RVector RLayout::insertionBase
private
RVector RLayout::maxExtents
private
RVector RLayout::maxLimits
private
RVector RLayout::minExtents
private
RVector RLayout::minLimits
private
QString RLayout::name
private
double RLayout::numeratorCustomScale
private
RVector RLayout::plotOrigin
private
double RLayout::plotPaperMarginBottomMM
private
double RLayout::plotPaperMarginLeftMM
private
double RLayout::plotPaperMarginRightMM
private
double RLayout::plotPaperMarginTopMM
private
RVector RLayout::plotPaperSize
private
PlotPaperUnits RLayout::plotPaperUnits
private
PlotRotation RLayout::plotRotation
private
PlotType RLayout::plotType
private
RVector RLayout::plotWindowAreaMax
private
RVector RLayout::plotWindowAreaMin
private
RPropertyTypeId RLayout::PropertyCanonicalMediaName
static
RPropertyTypeId RLayout::PropertyCustom
static

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.

RPropertyTypeId RLayout::PropertyDenominatorCustomScale
static
RPropertyTypeId RLayout::PropertyInsertionBaseX
static
RPropertyTypeId RLayout::PropertyInsertionBaseY
static
RPropertyTypeId RLayout::PropertyInsertionBaseZ
static
RPropertyTypeId RLayout::PropertyMaxExtentsX
static
RPropertyTypeId RLayout::PropertyMaxExtentsY
static
RPropertyTypeId RLayout::PropertyMaxExtentsZ
static
RPropertyTypeId RLayout::PropertyMaxLimitsX
static
RPropertyTypeId RLayout::PropertyMaxLimitsY
static
RPropertyTypeId RLayout::PropertyMaxLimitsZ
static
RPropertyTypeId RLayout::PropertyMinExtentsX
static
RPropertyTypeId RLayout::PropertyMinExtentsY
static
RPropertyTypeId RLayout::PropertyMinExtentsZ
static
RPropertyTypeId RLayout::PropertyMinLimitsX
static
RPropertyTypeId RLayout::PropertyMinLimitsY
static
RPropertyTypeId RLayout::PropertyMinLimitsZ
static
RPropertyTypeId RLayout::PropertyName
static
RPropertyTypeId RLayout::PropertyNumeratorCustomScale
static
RPropertyTypeId RLayout::PropertyPlotOriginX
static
RPropertyTypeId RLayout::PropertyPlotOriginY
static
RPropertyTypeId RLayout::PropertyPlotPaperMarginBottomMM
static
RPropertyTypeId RLayout::PropertyPlotPaperMarginLeftMM
static
RPropertyTypeId RLayout::PropertyPlotPaperMarginRightMM
static
RPropertyTypeId RLayout::PropertyPlotPaperMarginTopMM
static
RPropertyTypeId RLayout::PropertyPlotPaperSizeHeight
static
RPropertyTypeId RLayout::PropertyPlotPaperSizeWidth
static
RPropertyTypeId RLayout::PropertyPlotPaperUnits
static
RPropertyTypeId RLayout::PropertyPlotRotation
static
RPropertyTypeId RLayout::PropertyPlotType
static
RPropertyTypeId RLayout::PropertyPlotWindowAreaMaxX
static
RPropertyTypeId RLayout::PropertyPlotWindowAreaMaxY
static
RPropertyTypeId RLayout::PropertyPlotWindowAreaMinX
static
RPropertyTypeId RLayout::PropertyPlotWindowAreaMinY
static
RPropertyTypeId RLayout::PropertyStandardScale
static
RPropertyTypeId RLayout::PropertyStandardScaleType
static
RPropertyTypeId RLayout::PropertyTabOrder
static
RPropertyTypeId RLayout::PropertyUseStandardScale
static
double RLayout::standardScale
private
StandardScaleType RLayout::standardScaleType
private
int RLayout::tabOrder
private
bool RLayout::useStandardScale
private

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