kpresenter

KPrUtils.h

00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef _kpresenter_utils_h__
00022 #define _kpresenter_utils_h__
00023 
00024 #include "global.h"
00025 #include "KoPointArray.h"
00026 #include <qcursor.h>
00027 class QPoint;
00028 class QColor;
00029 class QPainter;
00030 class KoZoomHandler;
00031 class KoSize;
00032 class KoPoint;
00033 class QDomElement;
00034 class KPrObject;
00035 
00036 void drawFigure( LineEnd figure, QPainter* painter, const KoPoint &coord, const QColor & color,
00037                  int _w, float angle, KoZoomHandler*_zoomHandler );
00038 void drawFigureWithOffset( LineEnd figure, QPainter* painter, const QPoint &coord, const QColor & color,
00039                            int _w, float angle, KoZoomHandler*_zoomHandler );
00040 void drawFigureWithOffset( LineEnd figure, QPainter* painter, const KoPoint &coord, const QColor &color,
00041                            int w, float angle, KoZoomHandler*_zoomHandler, bool begin);
00042 KoSize getBoundingSize( LineEnd figure, int _w, const KoZoomHandler*_zoomHandler );
00043 KoSize getOffset( LineEnd figure, int _w, float angle );
00044 QString lineEndBeginName( LineEnd type );
00045 LineEnd lineEndBeginFromString( const QString & name );
00046 QString lineEndBeginSvg( LineEnd element );
00047 QString saveOasisTimer( int second );
00048 int loadOasisTimer( const QString & timer );
00049 
00050 class KPrUtils
00051 {
00052 public:
00053     static QCursor penCursor(); // pen tool cursors
00054     static QCursor rotateCursor(); // rotate tool cursor
00055 };
00056 
00057 int readOasisSettingsInt( const QDomElement & element );
00058 double readOasisSettingsDouble( const QDomElement & element );
00059 bool readOasisSettingsBool( const QDomElement & element );
00060 QString readOasisSettingsString( const QDomElement & element );
00061 
00062 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys