filters

xcfexport.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002, The Karbon Developers
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 __XCFEXPORT_H__
00021 #define __XCFEXPORT_H__
00022 
00023 
00024 #include <KoFilter.h>
00025 
00026 #include "vvisitor.h"
00027 
00028 
00029 class QDataStream;
00030 class VDocument;
00031 class VLayer;
00032 
00033 
00034 class XcfExport : public KoFilter, private VVisitor
00035 {
00036     Q_OBJECT
00037 
00038 public:
00039     XcfExport( KoFilter* parent, const char* name, const QStringList& );
00040     virtual ~XcfExport() {}
00041 
00042     virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
00043 
00044     virtual void visitVDocument( VDocument& document );
00045     virtual void visitVLayer( VLayer& layer );
00046 
00047 private:
00051      void writeHierarchy();
00052 
00056      void writeLevel();
00057 
00061     static int levels( int layerSize, int tileSize );
00062 
00063 
00067     static const unsigned m_tileWidth;
00068     static const unsigned m_tileHeight;
00069 
00073     QDataStream* m_stream;
00074 
00078     unsigned m_width;
00079 
00083     unsigned m_height;
00084 
00088      double m_zoomX;
00089 
00093      double m_zoomY;
00094 };
00095 
00096 #endif
00097 
KDE Home | KDE Accessibility Home | Description of Access Keys