kpresenter

KPrPicturePreview.h

00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
00004 
00005    The code is based on work of
00006    Copyright (C) 2002 Toshitaka Fujioka <fujioka@kde.org>
00007 
00008    This library is free software; you can redistribute it and/or
00009    modify it under the terms of the GNU Library General Public
00010    License as published by the Free Software Foundation; either
00011    version 2 of the License, or (at your option) any later version.
00012 
00013    This library is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016    Library General Public License for more details.
00017 
00018    You should have received a copy of the GNU Library General Public License
00019    along with this library; see the file COPYING.LIB.  If not, write to
00020    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021  * Boston, MA 02110-1301, USA.
00022 */
00023 
00024 #ifndef PICTUREPREVIEW_H
00025 #define PICTUREPREVIEW_H
00026 
00027 #include <qframe.h>
00028 
00029 #include "global.h"
00030 
00031 class KPrPicturePreview : public QFrame
00032 {
00033     Q_OBJECT
00034 
00035 public:
00036     KPrPicturePreview( QWidget* parent, const char* name);
00037     ~KPrPicturePreview() {}
00038 
00039     void setDepth( int depth);
00040     void setMirrorType (PictureMirrorType _t);
00041     void setPicturePixmap(const QPixmap &_pixmap);
00042 
00043     int getDepth() const { return depth; }
00044 
00045 public slots:
00046     void slotNormalPicture();
00047     void slotHorizontalMirrorPicture();
00048     void slotVerticalMirrorPicture();
00049     void slotHorizontalAndVerticalMirrorPicture();
00050 
00051     void slotPictureDepth0();
00052     void slotPictureDepth1();
00053     void slotPictureDepth8();
00054     void slotPictureDepth16();
00055     void slotPictureDepth32();
00056 
00057     void slotSwapRGBPicture( bool _on );
00058 
00059     void slotGrayscalPicture( bool _on );
00060 
00061     void slotBrightValue( int _value );
00062 
00063 protected:
00064     virtual void drawContents( QPainter *painter );
00065 
00066     PictureMirrorType mirrorType;
00067     int depth;
00068     bool swapRGB;
00069     int bright;
00070     bool grayscal;
00071     QPixmap origPixmap;
00072 };
00073 
00074 #endif /* PICTUREPREVIEW_H */
KDE Home | KDE Accessibility Home | Description of Access Keys