RPattern
Class in Core Module
Header: #include <src/core/RPattern.h>
Description
Section titled “Description”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: This class is available in script environments.
Copyable: Objects are cleaned up automatically by the garbage collector of the script engine.
Stream Operator: Object has a stream operator to present itself as string, for example when using toString() in a script.
Public Functions
Section titled “Public Functions”RPattern()Default constructor. |
|
RPattern(const QString &name, const QString &description)Constructor. |
|
~RPattern() |
|
| void | addPatternLine(const RPatternLine &patternLine) |
| void | clear() |
| const QString | getDescription() const |
| QString | getFileName() const |
| const QString | getName() const |
| QList< RPatternLine > | getPatternLines() const |
| bool | hasDots() const |
| bool | isLoaded() const |
| bool | isValid() const |
| void | load() const |
| void | rotate(double a)Rotates the pattern by the given factor. |
| void | scale(double f)Scales the pattern by the given factor. |
Static Public Functions
Section titled “Static Public Functions”| static QList< QPair< QString, RPattern * > > | loadAllFrom(const QString &fileName) |
Private Attributes
Section titled “Private Attributes”| QString | description Pattern description. |
| QString | fileName Pattern file name. |
| QString | name Pattern name. |
| QList< RPatternLine > | patternLines List of pattern line definitions. |
Member Documentation
Section titled “Member Documentation”RPattern
Section titled “RPattern”RPattern::RPattern()Default constructor.
RPattern
Section titled “RPattern”RPattern::RPattern(const QString &name, const QString &description)Constructor.
~RPattern
Section titled “~RPattern”RPattern::~RPattern()addPatternLine
Section titled “addPatternLine”void RPattern::addPatternLine(const RPatternLine &patternLine)inline
void RPattern::clear()inline
getDescription
Section titled “getDescription”const QString RPattern::getDescription() constinline const
Returns: the description of this pattern.
getFileName
Section titled “getFileName”QString RPattern::getFileName() constinline const
Returns: the fileName of this pattern.
getName
Section titled “getName”const QString RPattern::getName() constinline const
Returns: the name of this pattern.
getPatternLines
Section titled “getPatternLines”QList< RPatternLine > RPattern::getPatternLines() constinline const
hasDots
Section titled “hasDots”bool RPattern::hasDots() constconst
isLoaded
Section titled “isLoaded”bool RPattern::isLoaded() constinline const
Returns: True if this pattern is already loaded.
isValid
Section titled “isValid”bool RPattern::isValid() constinline const
void RPattern::load() constinline const
rotate
Section titled “rotate”void RPattern::rotate(double a)Rotates the pattern by the given factor.
void RPattern::scale(double f)Scales the pattern by the given factor.
loadAllFrom
Section titled “loadAllFrom”static QList< QPair< QString, RPattern * > > RPattern::loadAllFrom(const QString &fileName)static
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.
description
Section titled “description”QString RPattern::descriptionprivate
Pattern description.
fileName
Section titled “fileName”QString RPattern::fileNameprivate
Pattern file name.
QString RPattern::nameprivate
Pattern name.
patternLines
Section titled “patternLines”QList<RPatternLine> RPattern::patternLinesprivate
List of pattern line definitions.