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

Copyright (c) 2011-2013 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
QIcon getIcon () const
QString getLabel () const
double getLargestGap () const
QString getName () const
int getNumDashes () const
QList< double > getPattern () const
double getPatternLength () const
QVector< qreal > getScreenBasedLinetype (bool metric=true)
bool hasDashAt (double pos) const
bool isLoaded ()
bool isSymmetrical (int i) const
bool isValid () const
void load ()
RLinetypePatternoperator= (const RLinetypePattern &other)
bool operator== (const RLinetypePattern &other) const
 RLinetypePattern (const QString &name, const QString &description, int num...)
 Copyright (c) 2011-2013 by Andrew Mustun.
 RLinetypePattern (const QString &name, const QString &description, const QList< double > &dashes)
 RLinetypePattern ()
 RLinetypePattern (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 QList< QPair< QString,
RLinetypePattern * > > 
loadAllFrom (const QString &fileName)
 Loads all linetype patterns in the given file into memory.

Public Attributes

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

Detailed Description

Copyright (c) 2011-2013 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 ( const QString &  name,
const QString &  description,
int  num... 
)

Copyright (c) 2011-2013 by Andrew Mustun.

   \par Non-Scriptable:

This function is not available in script environments.

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.

RLinetypePattern::RLinetypePattern ( const QString &  name,
const QString &  description,
const QList< double > &  dashes 
)
RLinetypePattern::RLinetypePattern ( )
RLinetypePattern::RLinetypePattern ( 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
QIcon RLinetypePattern::getIcon ( ) 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 ( bool  metric = true)
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
bool RLinetypePattern::isLoaded ( )
inline
bool RLinetypePattern::isSymmetrical ( int  i) const
bool RLinetypePattern::isValid ( ) const
void RLinetypePattern::load ( )
inline
QList< QPair< QString, RLinetypePattern * > > RLinetypePattern::loadAllFrom ( 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
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
QString RLinetypePattern::name
QList<double> RLinetypePattern::pattern
bool* RLinetypePattern::symmetrical

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