- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Friends

# QPen Class Reference

Search for all occurrences

## Detailed Description

Definition at line 64 of file qpen.h.

`#include <qpen.h>`

List of all members.

## Public Types
typedef QPenPrivate * | DataPtr
## Public Member Functions
| QPen ()
| QPen (Qt::PenStyle)
| QPen (const QColor &color)
| QPen (const QBrush &brush, qreal width, Qt::PenStyle s=Qt::SolidLine, Qt::PenCapStyle c=Qt::SquareCap, Qt::PenJoinStyle j=Qt::BevelJoin)
| QPen (const QPen &pen)
| ~QPen ()
QPen & | operator= (const QPen &pen)
Qt::PenStyle | style () const
void | setStyle (Qt::PenStyle)
QVector< qreal > | dashPattern () const
void | setDashPattern (const QVector< qreal > &pattern)
qreal | dashOffset () const
void | setDashOffset (qreal doffset)
qreal | miterLimit () const
void | setMiterLimit (qreal limit)
qreal | widthF () const
void | setWidthF (qreal width)
int | width () const
void | setWidth (int width)
QColor | color () const
void | setColor (const QColor &color)
QBrush | brush () const
void | setBrush (const QBrush &brush)
bool | isSolid () const
Qt::PenCapStyle | capStyle () const
void | setCapStyle (Qt::PenCapStyle pcs)
Qt::PenJoinStyle | joinStyle () const
void | setJoinStyle (Qt::PenJoinStyle pcs)
bool | isCosmetic () const
void | setCosmetic (bool cosmetic)
bool | operator== (const QPen &p) const
bool | operator!= (const QPen &p) const
| operator QVariant () const
bool | isDetached ()
DataPtr & | data_ptr ()
## Friends
Q_GUI_EXPORT QDataStream & | operator>> (QDataStream &, QPen &)
Q_GUI_EXPORT QDataStream & | operator<< (QDataStream &, const QPen &)

## Member Typedef Documentation

typedef QPenPrivate* DataPtr

Search for all occurrences

Definition at line 126 of file qpen.h.

## Constructor & Destructor Documentation

QPen | ( |  | ) |

QPen | ( | Qt::PenStyle |  | ) |

QPen | ( | const QColor & | color | ) |

QPen | ( | const QBrush & | brush,
|  | qreal | width,
|  | Qt::PenStyle | s = `Qt::SolidLine`,
|  | Qt::PenCapStyle | c = `Qt::SquareCap`,
|  | Qt::PenJoinStyle | j = `Qt::BevelJoin`
| ) |  |

QPen | ( | const QPen & | pen | ) |

~QPen | ( |  | ) |

## Member Function Documentation

QPen& operator= | ( | const QPen & | pen | ) |

Qt::PenStyle style | ( |  | ) | const

Search for all occurrences

void setStyle | ( | Qt::PenStyle |  | ) |

Search for all occurrences

QVector<qreal> dashPattern | ( |  | ) | const

Search for all occurrences

void setDashPattern | ( | const QVector< qreal > & | pattern | ) |

Search for all occurrences

qreal dashOffset | ( |  | ) | const

Search for all occurrences

void setDashOffset | ( | qreal | doffset | ) |

Search for all occurrences

qreal miterLimit | ( |  | ) | const

Search for all occurrences

void setMiterLimit | ( | qreal | limit | ) |

Search for all occurrences

qreal widthF | ( |  | ) | const

Search for all occurrences

void setWidthF | ( | qreal | width | ) |

Search for all occurrences

int width | ( |  | ) | const

Search for all occurrences

void setWidth | ( | int | width | ) |

Search for all occurrences

QColor color | ( |  | ) | const

Search for all occurrences

void setColor | ( | const QColor & | color | ) |

Search for all occurrences

QBrush brush | ( |  | ) | const

Search for all occurrences

void setBrush | ( | const QBrush & | brush | ) |

Search for all occurrences

bool isSolid | ( |  | ) | const

Search for all occurrences

Qt::PenCapStyle capStyle | ( |  | ) | const

Search for all occurrences

void setCapStyle | ( | Qt::PenCapStyle | pcs | ) |

Search for all occurrences

Qt::PenJoinStyle joinStyle | ( |  | ) | const

Search for all occurrences

void setJoinStyle | ( | Qt::PenJoinStyle | pcs | ) |

Search for all occurrences

bool isCosmetic | ( |  | ) | const

Search for all occurrences

void setCosmetic | ( | bool | cosmetic | ) |

Search for all occurrences

bool operator== | ( | const QPen & | p | ) | const

bool operator!= | ( | const QPen & | p | ) | const `[inline]`

Definition at line 114 of file qpen.h.

    { return !(operator==(p)); }

operator QVariant | ( |  | ) | const

bool isDetached | ( |  | ) |

Search for all occurrences

DataPtr& data_ptr | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 127 of file qpen.h.

    { return d; }

## Friends And Related Function Documentation

Q_GUI_EXPORT QDataStream& operator>> | ( | QDataStream & | ,
|  | QPen & |
| ) |  | `[friend]`

Q_GUI_EXPORT QDataStream& operator<< | ( | QDataStream & | ,
|  | const QPen & |
| ) |  | `[friend]`

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

- QtGui/qpen.h

QPen QPen QPen QPen QPen QPen QPen QPen QPen QPen
QPen QPen QPen QPen QPen QPen QPen QPen QPen QPen