diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch) | |
tree | 5ac38a06f3dde268dc7927dc155896926aaf7012 /interfaces/khexedit/zoominterface.h | |
download | tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.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/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'interfaces/khexedit/zoominterface.h')
-rw-r--r-- | interfaces/khexedit/zoominterface.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/interfaces/khexedit/zoominterface.h b/interfaces/khexedit/zoominterface.h new file mode 100644 index 000000000..494fbfd86 --- /dev/null +++ b/interfaces/khexedit/zoominterface.h @@ -0,0 +1,79 @@ +/*************************************************************************** + zoominterface.h - description + ------------------- + begin : Fri Sep 12 2003 + copyright : (C) 2003 by Friedrich W. H. Kossebau + email : Friedrich.W.H@Kossebau.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License version 2 as published by the Free Software Foundation. * + * * + ***************************************************************************/ + + +#ifndef ZOOMINTERFACE_H +#define ZOOMINTERFACE_H + + +namespace KHE +{ + +/** + * @short A simple interface for zooming + * + * This interface enables abstract linear zooming. + * It operates in sizes of font point size. + * + * @author Friedrich W. H. Kossebau <Friedrich.W.H@Kossebau.de> + * @see createBytesEditWidget(), zoomInterface() + * @since 3.2 + */ +class ZoomInterface +{ + public: + /** enlarges the display + * @param PointInc increment to the display size (in font point size) + */ + virtual void zoomIn( int PointInc ) = 0; + /** increases the display size by an arbitrary value, usually 1 font point + * @see zoomOut() + */ + virtual void zoomIn() = 0; + /** makes the display smaller + * @param PointDec decrement to the display size (in font point size) + */ + virtual void zoomOut( int PointDec ) = 0; + /** decreases the display size by an arbitrary value, usually 1 font point + * @see zoomIn() + */ + virtual void zoomOut() = 0; + /** sets the display size + * @param PointSize new display size (in font point size) + */ + virtual void zoomTo( int PointSize ) = 0; + /** resets the display to the default size */ + virtual void unZoom() = 0; +}; + + +/** tries to get the zoom interface of t + * @return a pointer to the interface, otherwise 0 + * @author Friedrich W. H. Kossebau <Friedrich.W.H@Kossebau.de> + * @since 3.2 +*/ +template<class T> +ZoomInterface *zoomInterface( T *t ) +{ + if( !t ) + return 0; + + return static_cast<ZoomInterface*>( t->qt_cast("KHE::ZoomInterface") ); +} + +} + +#endif |