lib

KoPen.h
1/* This file is part of the KDE project
2 Copyright (C) 2005 Peter Simonsson
3 Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20#ifndef KOPEN_H
21#define KOPEN_H
22
23#include <tqpen.h>
24
25class KoZoomHandler;
26
30class KoPen : public TQPen
31{
32 public:
33 KoPen();
34 KoPen(const TQColor& _color, double _pointWidth, TQt::PenStyle _style);
35 KoPen(const TQColor& _color);
36 ~KoPen();
37
45 bool operator==( const KoPen &p ) const;
46
54 bool operator!=( const KoPen &p ) const;
55
57 void setPointWidth(double width);
59 double pointWidth() const { return m_pointWidth; }
60
62 TQPen zoomedPen(KoZoomHandler* zoomHandler);
63
64 private:
65 double m_pointWidth;
66};
67
68#endif
double pointWidth() const
KoPen width in points.
Definition KoPen.h:59
bool operator==(const KoPen &p) const
Compare pens if they are equal.
Definition KoPen.cpp:48
void setPointWidth(double width)
Set the pen width in points.
Definition KoPen.cpp:58
TQPen zoomedPen(KoZoomHandler *zoomHandler)
Returns a zoomed TQPen.
Definition KoPen.cpp:63
bool operator!=(const KoPen &p) const
Compare pens if they differ.
Definition KoPen.cpp:53
This class handles the zooming and DPI stuff (conversions between pt values and pixels).