umbrello API Documentation

umlviewimageexportermodel.h

00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  *   copyright (C) 2006-2007                                               *
00009  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00010  ***************************************************************************/
00011 
00012 #ifndef UMLVIEWIMAGEEXPORTERMODEL_H
00013 #define UMLVIEWIMAGEEXPORTERMODEL_H
00014 
00015 #include <qstringlist.h>
00016 #include <qrect.h>
00017 
00018 // forward declarations
00019 class UMLView;
00020 
00021 // KDE forward declarations
00022 class KTempFile;
00023 class KURL;
00024 
00035 class UMLViewImageExporterModel {
00036 public:
00037 
00044     static QStringList supportedImageTypes();
00045 
00052     static QStringList supportedMimeTypes();
00053 
00062     static QString imageTypeToMimeType(const QString& imageType);
00063 
00072     static QString mimeTypeToImageType(const QString& mimeType);
00073 
00077     UMLViewImageExporterModel() {
00078     }
00079 
00083     virtual ~UMLViewImageExporterModel() {
00084     }
00085 
00108     QStringList exportAllViews(const QString &imageType, const KURL &directory, bool useFolders) const;
00109 
00125     QString exportView(UMLView* view, const QString &imageType, const KURL &url) const;
00126 
00127 private:
00128 
00145     QString getDiagramFileName(UMLView *view, const QString &imageType, bool useFolders = false) const;
00146 
00155     bool prepareDirectory(const KURL &url) const;
00156 
00166     bool exportViewTo(UMLView* view, const QString &imageType, const QString &fileName) const;
00167 
00178     bool exportViewToEps(UMLView* view, const QString &fileName, bool isEPS) const;
00179 
00188     bool fixEPS(const QString &fileName, QRect rect) const;
00189 
00198     bool exportViewToSvg(UMLView* view, const QString &fileName) const;
00199 
00210     bool exportViewToPixmap(UMLView* view, const QString &imageType, const QString &fileName) const;
00211 
00212 };
00213 
00214 #endif
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:02 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003