compile
[kdegraphics.git] / okular / core / rotationjob_p.h
blob9790b64b523d2e29728cc357da10eb82d6098bcc
1 /***************************************************************************
2 * Copyright (C) 2006 by Tobias Koenig <tokoe@kde.org> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #ifndef _OKULAR_ROTATIONJOB_P_H_
11 #define _OKULAR_ROTATIONJOB_P_H_
13 #include <QtGui/QImage>
14 #include <QtGui/QMatrix>
16 #include <threadweaver/Job.h>
18 #include "core/global.h"
20 namespace Okular {
22 class PagePrivate;
24 class RotationJob : public ThreadWeaver::Job
26 Q_OBJECT
28 public:
29 RotationJob( const QImage &image, Rotation oldRotation, Rotation newRotation, int id );
31 void setPage( PagePrivate * pd );
33 QImage image() const;
34 Rotation rotation() const;
35 int id() const;
36 PagePrivate * page() const;
38 static QMatrix rotationMatrix( Rotation from, Rotation to );
40 protected:
41 virtual void run();
43 private:
44 const QImage mImage;
45 Rotation mOldRotation;
46 Rotation mNewRotation;
47 int mId;
48 QImage mRotatedImage;
49 PagePrivate * m_pd;
54 #endif