CCBUG: 136574 svn path=/trunk/KDE/kdegraphics/okular/; revision=851145remotes/origin/old/work/tiff-improvements
parent
df7ca74b48
commit
b95403b0b2
5 changed files with 257 additions and 0 deletions
@ -0,0 +1,64 @@ |
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Pino Toscano <pino@kde.org> * |
||||
* * |
||||
* 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. * |
||||
***************************************************************************/ |
||||
|
||||
#include "movie.h" |
||||
|
||||
// qt/kde includes
|
||||
#include <qstring.h> |
||||
|
||||
using namespace Okular; |
||||
|
||||
class Movie::Private |
||||
{ |
||||
public: |
||||
Private( const QString &url ) |
||||
: m_url( url ), |
||||
m_rotation( Rotation0 ) |
||||
{ |
||||
} |
||||
|
||||
QString m_url; |
||||
QSize m_aspect; |
||||
Rotation m_rotation; |
||||
}; |
||||
|
||||
Movie::Movie( const QString& fileName ) |
||||
: d( new Private( fileName ) ) |
||||
{ |
||||
} |
||||
|
||||
Movie::~Movie() |
||||
{ |
||||
delete d; |
||||
} |
||||
|
||||
QString Movie::url() const |
||||
{ |
||||
return d->m_url; |
||||
} |
||||
|
||||
void Movie::setSize( const QSize &aspect ) |
||||
{ |
||||
d->m_aspect = aspect; |
||||
} |
||||
|
||||
QSize Movie::size() const |
||||
{ |
||||
return d->m_aspect; |
||||
} |
||||
|
||||
void Movie::setRotation( Rotation rotation ) |
||||
{ |
||||
d->m_rotation = rotation; |
||||
} |
||||
|
||||
Rotation Movie::rotation() const |
||||
{ |
||||
return d->m_rotation; |
||||
} |
||||
@ -0,0 +1,72 @@ |
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Pino Toscano <pino@kde.org> * |
||||
* * |
||||
* 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 _OKULAR_MOVIE_H_ |
||||
#define _OKULAR_MOVIE_H_ |
||||
|
||||
#include <okular/core/global.h> |
||||
#include <okular/core/okular_export.h> |
||||
|
||||
#include <QtCore/QSize> |
||||
|
||||
namespace Okular { |
||||
|
||||
/**
|
||||
* @short Contains information about a movie object. |
||||
* |
||||
* @since 0.8 (KDE 4.2) |
||||
*/ |
||||
class OKULAR_EXPORT Movie |
||||
{ |
||||
public: |
||||
/**
|
||||
* Creates a new movie object with the given external @p fileName. |
||||
*/ |
||||
explicit Movie( const QString& fileName ); |
||||
|
||||
/**
|
||||
* Destroys the movie object. |
||||
*/ |
||||
~Movie(); |
||||
|
||||
/**
|
||||
* Returns the url of the movie. |
||||
*/ |
||||
QString url() const; |
||||
|
||||
/**
|
||||
* Sets the size for the movie. |
||||
*/ |
||||
void setSize( const QSize &aspect ); |
||||
|
||||
/**
|
||||
* Returns the size of the movie. |
||||
*/ |
||||
QSize size() const; |
||||
|
||||
/**
|
||||
* Sets the @p rotation of the movie. |
||||
*/ |
||||
void setRotation( Rotation rotation ); |
||||
|
||||
/**
|
||||
* Returns the rotation of the movie. |
||||
*/ |
||||
Rotation rotation() const; |
||||
|
||||
private: |
||||
class Private; |
||||
Private* const d; |
||||
|
||||
Q_DISABLE_COPY( Movie ) |
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif |
||||
Loading…
Reference in new issue