QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RLinetypePattern Class Reference

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

#include <RLinetypePattern.h>

List of all members.

Public Member Functions

double getDashLengthAt (int i) const
double getDelta (double pos) const
QString getDescription () const
QString getLabel () const
double getLargestGap () const
QString getName () const
int getNumDashes () const
QList< double > getPattern () const
double getPatternLength () const
QVector< qreal > getScreenBasedLinetype ()
bool hasDashAt (double pos) const
bool isLoaded ()
bool isMetric () const
bool isSymmetrical (int i) const
bool isValid () const
void load ()
RLinetypePatternoperator= (const RLinetypePattern &other)
bool operator== (const RLinetypePattern &other) const
 RLinetypePattern (bool metric, const QString &name, const QString &description, int num...)
 RLinetypePattern (bool metric, const QString &name, const QString &description, const QList< double > &dashes)
 RLinetypePattern ()
 RLinetypePattern (bool metric, const QString &name, const QString &description)
 RLinetypePattern (const RLinetypePattern &other)
void scale (double factor)
void set (const QList< double > &dashes)
void setDescription (const QString &d)
void setName (const QString &n)
 ~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.

Public Attributes

QString description
bool metric
QString name
QList< double > pattern
bool * symmetrical

Static Public Attributes

static QMap< QString, QString > nameMap
 Copyright (c) 2011-2014 by Andrew Mustun.

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (RLinetypePattern)

Detailed Description

Copyright (c) 2011-2014 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.

Scriptable:
This class is wrapped for script environments.
Copyable:
Script wrappers of this class should pass objects by reference.

Constructor & Destructor Documentation

RLinetypePattern::RLinetypePattern ( bool  metric,
const QString &  name,
const QString &  description,
int  num... 
)
   \par Non-Scriptable:

This function is not available in script environments.

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 ( )

Member Function Documentation

double RLinetypePattern::getDashLengthAt ( 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
int RLinetypePattern::getNumDashes ( ) const
QList< double > RLinetypePattern::getPattern ( ) const
double RLinetypePattern::getPatternLength ( ) const
QVector< qreal > RLinetypePattern::getScreenBasedLinetype ( )
Returns:
Line pattern that can be used for a QPen to render screen optimized patterns. Empty vector for continuous.
bool RLinetypePattern::hasDashAt ( double  pos) const
void RLinetypePattern::initNameMap ( )
static
bool RLinetypePattern::isLoaded ( )
inline
bool RLinetypePattern::isMetric ( ) const
inline
bool RLinetypePattern::isSymmetrical ( int  i) const
bool RLinetypePattern::isValid ( ) const
void RLinetypePattern::load ( )
inline
QList< QPair< QString, RLinetypePattern * > > RLinetypePattern::loadAllFrom ( bool  metric,
const QString &  fileName 
)
static

Loads all linetype patterns in the given file into memory.

RLinetypePattern & RLinetypePattern::operator= ( const RLinetypePattern other)
bool RLinetypePattern::operator== ( const RLinetypePattern other) const
RLinetypePattern::Q_DECLARE_TR_FUNCTIONS ( RLinetypePattern  )
private
void RLinetypePattern::scale ( double  factor)
void RLinetypePattern::set ( const QList< double > &  dashes)
void RLinetypePattern::setDescription ( const QString &  d)
void RLinetypePattern::setName ( const QString &  n)

Member Data Documentation

QString RLinetypePattern::description
bool RLinetypePattern::metric
QString RLinetypePattern::name
QMap< QString, QString > RLinetypePattern::nameMap
static

Copyright (c) 2011-2014 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.

QList<double> RLinetypePattern::pattern
bool* RLinetypePattern::symmetrical

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