kivio

kivioglobal.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Peter Simonsson <psn@linux.se>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KIVIOGLOBAL_H
00021 #define KIVIOGLOBAL_H
00022 
00023 #include <KoUnit.h>
00024 #include <KoPageLayout.h>
00025 #include <KoSize.h>
00026 
00027 class QDomElement;
00028 class QPixmap;
00029 class QString;
00030 class KoGenStyle;
00031 class KivioStencil;
00032 
00033 namespace Kivio
00034 {
00035   enum {
00036     STYLE_PAGE = 20
00037   };
00038 
00042   void savePageLayout(QDomElement& e, const KoPageLayout& layout);
00043   KoGenStyle savePageLayout(const KoPageLayout& layout);
00047   KoPageLayout loadPageLayout(const QDomElement& e);
00051   KoUnit::Unit convToKoUnit(int tkUnit);
00055   QString orientationString(KoOrientation o);
00059   KoOrientation orientationFromString(const QString& s);
00060   void setFormatOrientation(KoPageLayout& layout);
00061 
00065   KoSize loadSize(const QDomElement& e, const QString& name, const KoSize& def);
00069   void saveSize(QDomElement& e, const QString& name, const KoSize& size);
00070 
00074   QString pageSizeString(int pageSize);
00075 
00079   QPixmap arrowHeadPixmap();
00080 
00084   QPixmap connectorTargetPixmap();
00085 
00089   QPixmap lockPixmap();
00090 
00094   QString systemDefaultUnit();
00095 
00099   QPixmap generatePixmapFromStencil(int width, int height, KivioStencil* stencil);
00100 }
00101 
00102 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys