QCAD
Open Source 2D CAD
|
Copyright (c) 2011-2018 by Andrew Mustun. More...
#include <RLinetypePattern.h>
Public Member Functions | |
double | getDashLengthAt (int i) const |
double | getDashOffsetAt (const QList< double > &dashes, int i) const |
double | getDelta (double pos) const |
QString | getDescription () const |
QString | getLabel () const |
double | getLargestGap () const |
QString | getName () const |
bool | getNoOffset () const |
int | getNumDashes () const |
QList< double > | getPattern () const |
double | getPatternLength () const |
double | getPatternOffset (double length) |
double | getPatternOffsetAt (double length, double symmetryPos, double *gap=NULL, bool end=false) |
QString | getPatternString () const |
QVector< qreal > | getScreenBasedLinetype () |
double | getScreenScale () const |
QList< RPainterPath > | getShapeAt (int i) const |
QList< int > | getShapeIndices () const |
int | getShapeNumberAt (int i) const |
RVector | getShapeOffsetAt (int i) const |
double | getShapeRotationAt (int i) const |
double | getShapeScaleAt (int i) const |
QString | getShapeTextAt (int i) const |
QString | getShapeTextStyleAt (int i) const |
QList< double > | getSymmetries () const |
bool | hasDashAt (double pos) const |
bool | hasShapeAt (int i) const |
bool | hasShapeNumberAt (int i) const |
bool | hasShapeOffsetAt (int i) const |
bool | hasShapeRotationAt (int i) const |
bool | hasShapes () const |
bool | hasShapeScaleAt (int i) const |
bool | hasShapeTextAt (int i) const |
bool | hasShapeTextStyleAt (int i) const |
bool | isLoaded () |
bool | isMetric () const |
bool | isValid () const |
void | load () |
bool | operator< (const RLinetypePattern &other) const |
RLinetypePattern & | operator= (const RLinetypePattern &other) |
bool | operator== (const RLinetypePattern &other) const |
RLinetypePattern () | |
RLinetypePattern (bool metric, const QString &name, const QString &description) | |
RLinetypePattern (bool metric, const QString &name, const QString &description, const QList< double > &dashes) | |
RLinetypePattern (bool metric, const QString &name, const QString &description, int num...) | |
RLinetypePattern (const RLinetypePattern &other) | |
void | scale (double factor) |
void | set (const QList< double > &dashes) |
void | setDescription (const QString &d) |
void | setMetric (bool on) |
void | setName (const QString &n) |
void | setNoOffset (bool n) |
bool | setPatternString (const QString &patternString) |
Set pattern based on .lin formatted string. More... | |
void | setScreenScale (double s) |
void | setShapeNumberAt (int i, int num) |
void | setShapeOffsetAt (int i, const RVector &offset) |
void | setShapeRotationAt (int i, double r) |
void | setShapeScaleAt (int i, double s) |
void | setShapeTextAt (int i, const QString &s) |
void | setShapeTextStyleAt (int i, const QString &s) |
void | updateShapes () |
Updates the painter paths for the shapes in this pattern. More... | |
~RLinetypePattern () | |
Static Public Member Functions | |
static void | initNameMap () |
static QList< QPair< QString, RLinetypePattern * > > | loadAllFrom (bool metric, const QString &fileName) |
Loads all linetype patterns in the given file into memory. More... | |
Private Attributes | |
QString | description |
bool | metric |
QString | name |
bool | noOffset |
QList< double > | pattern |
QString | patternString |
double | screenScale |
QMap< int, int > | shapeNumbers |
QMap< int, RVector > | shapeOffsets |
QMap< int, double > | shapeRotations |
QMap< int, QList< RPainterPath > > | shapes |
QMap< int, double > | shapeScales |
QMap< int, QString > | shapeTexts |
QMap< int, QString > | shapeTextStyles |
QList< double > | symmetries |
Static Private Attributes | |
static QMap< QString, QString > | nameMap |
Copyright (c) 2011-2018 by Andrew Mustun. More... | |
Friends | |
class | RLinetype |
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 linetype pattern which can be used to draw dashed graphical elements.
RLinetypePattern::RLinetypePattern | ( | bool | metric, |
const QString & | name, | ||
const QString & | description, | ||
int | num... | ||
) |
RLinetypePattern::RLinetypePattern | ( | bool | metric, |
const QString & | name, | ||
const QString & | description, | ||
const QList< double > & | dashes | ||
) |
RLinetypePattern::RLinetypePattern | ( | ) |
RLinetypePattern::RLinetypePattern | ( | bool | metric, |
const QString & | name, | ||
const QString & | description | ||
) |
RLinetypePattern::RLinetypePattern | ( | const RLinetypePattern & | other | ) |
RLinetypePattern::~RLinetypePattern | ( | ) |
double RLinetypePattern::getDashLengthAt | ( | int | i | ) | const |
double RLinetypePattern::getDashOffsetAt | ( | const QList< double > & | dashes, |
int | i | ||
) | const |
double RLinetypePattern::getDelta | ( | double | pos | ) | const |
QString RLinetypePattern::getDescription | ( | ) | const |
QString RLinetypePattern::getLabel | ( | ) | const |
double RLinetypePattern::getLargestGap | ( | ) | const |
QString RLinetypePattern::getName | ( | ) | const |
bool RLinetypePattern::getNoOffset | ( | ) | const |
int RLinetypePattern::getNumDashes | ( | ) | const |
QList< double > RLinetypePattern::getPattern | ( | ) | const |
double RLinetypePattern::getPatternLength | ( | ) | const |
double RLinetypePattern::getPatternOffset | ( | double | length | ) |
double RLinetypePattern::getPatternOffsetAt | ( | double | length, |
double | symmetryPos, | ||
double * | gap = NULL , |
||
bool | end = false |
||
) |
QString RLinetypePattern::getPatternString | ( | ) | const |
QVector< qreal > RLinetypePattern::getScreenBasedLinetype | ( | ) |
double RLinetypePattern::getScreenScale | ( | ) | const |
QList< RPainterPath > RLinetypePattern::getShapeAt | ( | int | i | ) | const |
QList< int > RLinetypePattern::getShapeIndices | ( | ) | const |
int RLinetypePattern::getShapeNumberAt | ( | int | i | ) | const |
RVector RLinetypePattern::getShapeOffsetAt | ( | int | i | ) | const |
double RLinetypePattern::getShapeRotationAt | ( | int | i | ) | const |
double RLinetypePattern::getShapeScaleAt | ( | int | i | ) | const |
QString RLinetypePattern::getShapeTextAt | ( | int | i | ) | const |
QString RLinetypePattern::getShapeTextStyleAt | ( | int | i | ) | const |
|
inline |
bool RLinetypePattern::hasDashAt | ( | double | pos | ) | const |
bool RLinetypePattern::hasShapeAt | ( | int | i | ) | const |
bool RLinetypePattern::hasShapeNumberAt | ( | int | i | ) | const |
bool RLinetypePattern::hasShapeOffsetAt | ( | int | i | ) | const |
bool RLinetypePattern::hasShapeRotationAt | ( | int | i | ) | const |
bool RLinetypePattern::hasShapes | ( | ) | const |
bool RLinetypePattern::hasShapeScaleAt | ( | int | i | ) | const |
bool RLinetypePattern::hasShapeTextAt | ( | int | i | ) | const |
bool RLinetypePattern::hasShapeTextStyleAt | ( | int | i | ) | const |
|
static |
|
inline |
|
inline |
bool RLinetypePattern::isValid | ( | ) | const |
|
inline |
|
static |
Loads all linetype patterns in the given file into memory.
bool RLinetypePattern::operator< | ( | const RLinetypePattern & | other | ) | const |
RLinetypePattern & RLinetypePattern::operator= | ( | const RLinetypePattern & | other | ) |
bool RLinetypePattern::operator== | ( | const RLinetypePattern & | other | ) | const |
void RLinetypePattern::scale | ( | double | factor | ) |
void RLinetypePattern::set | ( | const QList< double > & | dashes | ) |
void RLinetypePattern::setDescription | ( | const QString & | d | ) |
|
inline |
void RLinetypePattern::setName | ( | const QString & | n | ) |
void RLinetypePattern::setNoOffset | ( | bool | n | ) |
bool RLinetypePattern::setPatternString | ( | const QString & | patternString | ) |
Set pattern based on .lin formatted string.
e.g. "A,3.81,[TRACK1,ltypeshp.shx,S=6.35],3.81"
void RLinetypePattern::setScreenScale | ( | double | s | ) |
void RLinetypePattern::setShapeNumberAt | ( | int | i, |
int | num | ||
) |
void RLinetypePattern::setShapeOffsetAt | ( | int | i, |
const RVector & | offset | ||
) |
void RLinetypePattern::setShapeRotationAt | ( | int | i, |
double | r | ||
) |
void RLinetypePattern::setShapeScaleAt | ( | int | i, |
double | s | ||
) |
void RLinetypePattern::setShapeTextAt | ( | int | i, |
const QString & | s | ||
) |
void RLinetypePattern::setShapeTextStyleAt | ( | int | i, |
const QString & | s | ||
) |
void RLinetypePattern::updateShapes | ( | ) |
Updates the painter paths for the shapes in this pattern.
|
friend |
|
private |
|
private |
|
private |
|
staticprivate |
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.
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |