QCAD
Open Source 2D CAD
RPattern Class Reference

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

#include <RPattern.h>

Public Member Functions

void addPatternLine (const RPatternLine &patternLine)
 
void clear ()
 
const QString getDescription () const
 
QString getFileName () const
 
const QString getName () const
 
QList< RPatternLinegetPatternLines () const
 
bool hasDots () const
 
bool isLoaded () const
 
bool isValid () const
 
void load () const
 
void rotate (double a)
 Rotates the pattern by the given factor. More...
 
 RPattern ()
 Default constructor. More...
 
 RPattern (const QString &name, const QString &description)
 Constructor. More...
 
void scale (double f)
 Scales the pattern by the given factor. More...
 
 ~RPattern ()
 

Static Public Member Functions

static QList< QPair< QString, RPattern * > > loadAllFrom (const QString &fileName)
 Copyright (c) 2011-2018 by Andrew Mustun. More...
 

Private Attributes

QString description
 Pattern description. More...
 
QString fileName
 Pattern file name. More...
 
QString name
 Pattern name. More...
 
QList< RPatternLinepatternLines
 List of pattern line definitions. More...
 

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. Represents a hatch pattern.

Scriptable:\nThis class is available in script environments.\n
Copyable:\nObjects are cleaned up automatically by the garbage collector of the script engine.\n
Stream Operator:\nObject has a stream operator to present itself as string, for example when using toString() in a script.\n

Constructor & Destructor Documentation

◆ RPattern() [1/2]

RPattern::RPattern ( )

Default constructor.

◆ RPattern() [2/2]

RPattern::RPattern ( const QString &  name,
const QString &  description 
)

Constructor.

◆ ~RPattern()

RPattern::~RPattern ( )

Member Function Documentation

◆ addPatternLine()

void RPattern::addPatternLine ( const RPatternLine patternLine)
inline

◆ clear()

void RPattern::clear ( )
inline

◆ getDescription()

const QString RPattern::getDescription ( ) const
inline
Returns
the description of this pattern.

◆ getFileName()

QString RPattern::getFileName ( ) const
inline
Returns
the fileName of this pattern.

◆ getName()

const QString RPattern::getName ( ) const
inline
Returns
the name of this pattern.

◆ getPatternLines()

QList<RPatternLine> RPattern::getPatternLines ( ) const
inline

◆ hasDots()

bool RPattern::hasDots ( ) const

◆ isLoaded()

bool RPattern::isLoaded ( ) const
inline
Returns
True if this pattern is already loaded.

◆ isValid()

bool RPattern::isValid ( ) const
inline

◆ load()

void RPattern::load ( ) const
inline

◆ loadAllFrom()

QList< QPair< QString, RPattern * > > RPattern::loadAllFrom ( const QString &  fileName)
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. Loads all patterns in the given file into memory.

◆ rotate()

void RPattern::rotate ( double  a)

Rotates the pattern by the given factor.

◆ scale()

void RPattern::scale ( double  f)

Scales the pattern by the given factor.

Member Data Documentation

◆ description

QString RPattern::description
private

Pattern description.

◆ fileName

QString RPattern::fileName
private

Pattern file name.

◆ name

QString RPattern::name
private

Pattern name.

◆ patternLines

QList<RPatternLine> RPattern::patternLines
private

List of pattern line definitions.


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