kpresenter

KPrPicturePreview.h
1/* This file is part of the KDE project
2 Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
3
4 The code is based on work of
5 Copyright (C) 2002 Toshitaka Fujioka <fujioka@kde.org>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21*/
22
23#ifndef PICTUREPREVIEW_H
24#define PICTUREPREVIEW_H
25
26#include <tqframe.h>
27
28#include "global.h"
29
30class KPrPicturePreview : public TQFrame
31{
32 TQ_OBJECT
33
34
35public:
36 KPrPicturePreview( TQWidget* parent, const char* name);
37 ~KPrPicturePreview() {}
38
39 void setDepth( int depth);
40 void setMirrorType (PictureMirrorType _t);
41 void setPicturePixmap(const TQPixmap &_pixmap);
42
43 int getDepth() const { return depth; }
44
45public slots:
46 void slotNormalPicture();
47 void slotHorizontalMirrorPicture();
48 void slotVerticalMirrorPicture();
49 void slotHorizontalAndVerticalMirrorPicture();
50
51 void slotPictureDepth0();
52 void slotPictureDepth1();
53 void slotPictureDepth8();
54 void slotPictureDepth16();
55 void slotPictureDepth32();
56
57 void slotSwapRGBPicture( bool _on );
58
59 void slotGrayscalPicture( bool _on );
60
61 void slotBrightValue( int _value );
62
63protected:
64 virtual void drawContents( TQPainter *painter );
65
66 PictureMirrorType mirrorType;
67 int depth;
68 bool swapRGB;
69 int bright;
70 bool grayscal;
71 TQPixmap origPixmap;
72};
73
74#endif /* PICTUREPREVIEW_H */