summaryrefslogtreecommitdiffstats
path: root/kpovmodeler/pmimagemap.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /kpovmodeler/pmimagemap.h
downloadtdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz
tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpovmodeler/pmimagemap.h')
-rw-r--r--kpovmodeler/pmimagemap.h209
1 files changed, 209 insertions, 0 deletions
diff --git a/kpovmodeler/pmimagemap.h b/kpovmodeler/pmimagemap.h
new file mode 100644
index 00000000..3291994d
--- /dev/null
+++ b/kpovmodeler/pmimagemap.h
@@ -0,0 +1,209 @@
+//-*-C++-*-
+/*
+**************************************************************************
+ description
+ --------------------
+ copyright : (C) 2002 by Luis Passos Carvalho
+ email : lpassos@mail.telepac.pt
+**************************************************************************
+
+**************************************************************************
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+**************************************************************************/
+
+
+#ifndef PMIMAGEMAP_H
+#define PMIMAGEMAP_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "pmnamedobject.h"
+#include "pmpalettevalue.h"
+
+/**
+ * Class for povray imagemaps.
+ */
+
+class PMImageMap : public PMNamedObject
+{
+ typedef PMNamedObject Base;
+public:
+ /**
+ * The bitmap type
+ */
+ enum PMBitmapType { BitmapGif, BitmapTga, BitmapIff, BitmapPpm,
+ BitmapPgm, BitmapPng, BitmapJpeg, BitmapTiff,
+ BitmapSys };
+ /**
+ * The interpolate method
+ */
+ enum PMInterpolateType { InterpolateNone, InterpolateBilinear,
+ InterpolateNormalized };
+ /**
+ * The mapping method
+ */
+ enum PMMapType { MapPlanar, MapSpherical, MapCylindrical,
+ MapToroidal };
+
+ /**
+ * Creates a PMImageMap
+ */
+ PMImageMap( PMPart* part );
+ /**
+ * Copy constructor
+ */
+ PMImageMap( const PMImageMap& im );
+ /**
+ * deletes the PMImageMap
+ */
+ virtual ~PMImageMap( );
+
+ /** */
+ virtual PMObject* copy( ) const { return new PMImageMap( *this ); }
+ /** */
+ virtual QString description( ) const;
+
+ /** */
+ virtual PMMetaObject* metaObject( ) const;
+ /** */
+ virtual void cleanUp( ) const;
+
+ /** */
+ virtual QString pixmap( ) const { return QString( "pmimagemap" ); }
+
+ /** */
+ virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ /** */
+ virtual void readAttributes( const PMXMLHelper& h );
+
+ /**
+ * Returns a new @ref PMImageMapEdit
+ */
+ virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+
+ /**
+ * Gets the bitmap type
+ */
+ PMBitmapType bitmapType( ) const { return m_bitmapType; }
+ /**
+ * Gets the bitmap file name
+ */
+ QString bitmapFile( ) const { return m_bitmapFile; }
+ /**
+ * Returns true if filter all is enabled
+ */
+ bool isFilterAllEnabled( ) const { return m_enableFilterAll; }
+ /**
+ * Gets the value of filter for all colors
+ */
+ double filterAll( ) const { return m_filterAll; }
+ /**
+ * Returns true if transmit all is enabled
+ */
+ bool isTransmitAllEnabled( ) const { return m_enableTransmitAll; }
+ /**
+ * Gets the value of transmit all for all colors
+ */
+ double transmitAll( ) const { return m_transmitAll; }
+ /**
+ * Returns true if once is enabled
+ */
+ bool isOnceEnabled( ) const { return m_once; }
+ /**
+ * Gets the bitmap file type
+ */
+ PMMapType mapType( ) const { return m_mapType; }
+ /**
+ * Gets the interpolate method type
+ */
+ PMInterpolateType interpolateType( ) const { return m_interpolateType; }
+ /**
+ * Gets the list of indexed filters
+ */
+ QValueList<PMPaletteValue> filters( ) const { return m_filters; }
+ /**
+ * Gets the list of indexed transmits
+ */
+ QValueList<PMPaletteValue> transmits( ) const { return m_transmits; }
+
+ /**
+ * Sets the imagemap type
+ */
+ void setBitmapType( PMBitmapType c );
+ /**
+ * Sets the bitmap file name*/
+ void setBitmapFileName( const QString& c );
+ /**
+ * Enables/Disables Filter All
+ */
+ void enableFilterAll( bool c );
+ /**
+ * Sets the filter all value
+ */
+ void setFilterAll( double c );
+ /**
+ * Enables/Disables Transmit All
+ */
+ void enableTransmitAll( bool c );
+ /**
+ * Sets the transmit all value
+ */
+ void setTransmitAll( double c );
+ /**
+ * Sets if the bitmap should be mapped once
+ */
+ void enableOnce( bool c );
+ /**
+ * Sets the mapping method
+ */
+ void setMapType( const PMMapType c );
+ /**
+ * Sets the interpolating method
+ */
+ void setInterpolateType( PMInterpolateType c );
+ /**
+ * Set the list of indexed filters
+ */
+ void setFilters( const QValueList<PMPaletteValue>& filters );
+ /**
+ * Set the list of indexed transmits
+ */
+ void setTransmits( const QValueList<PMPaletteValue>& transmits );
+ /** */
+ virtual void restoreMemento( PMMemento* s );
+private:
+ /**
+ * IDs for @ref PMMementoData
+ */
+ enum PMImageMapMementoID { PMBitmapTypeID, PMBitmapFileID,
+ PMEnableFilterAllID,
+ PMEnableTransmitAllID,
+ PMFilterAllID, PMTransmitAllID,
+ PMOnceID, PMMapTypeID,
+ PMInterpolateID };
+ /**
+ * ImageMap type
+ */
+ PMBitmapType m_bitmapType;
+ QString m_bitmapFile;
+ bool m_enableFilterAll;
+ float m_filterAll;
+ bool m_enableTransmitAll;
+ float m_transmitAll;
+ bool m_once;
+ PMMapType m_mapType;
+ PMInterpolateType m_interpolateType;
+ QValueList<PMPaletteValue> m_filters;
+ QValueList<PMPaletteValue> m_transmits;
+
+ static PMMetaObject* s_pMetaObject;
+};
+
+#endif