2006-12-27 23:56:38 +00:00
|
|
|
/***************************************************************************
|
2007-12-24 00:54:21 +00:00
|
|
|
* Copyright (C) 2006-2007 by Pino Toscano <pino@kde.org> *
|
2006-12-27 23:56:38 +00:00
|
|
|
* *
|
|
|
|
* 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. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
2007-12-24 00:54:21 +00:00
|
|
|
#ifndef OKULAR_GUIUTILS_H
|
|
|
|
#define OKULAR_GUIUTILS_H
|
2006-12-27 23:56:38 +00:00
|
|
|
|
2007-04-19 18:30:20 +00:00
|
|
|
#include <QtCore/QString>
|
|
|
|
|
2012-06-12 10:19:21 +00:00
|
|
|
class QColor;
|
|
|
|
class QImage;
|
2008-09-19 20:21:57 +00:00
|
|
|
class QPixmap;
|
|
|
|
class QSize;
|
2008-04-14 22:31:28 +00:00
|
|
|
class QWidget;
|
2007-12-24 15:02:32 +00:00
|
|
|
class KIconLoader;
|
|
|
|
|
2006-12-27 23:56:38 +00:00
|
|
|
namespace Okular {
|
|
|
|
class Annotation;
|
2008-04-14 22:31:28 +00:00
|
|
|
class EmbeddedFile;
|
2012-09-27 12:14:03 +00:00
|
|
|
class Movie;
|
|
|
|
class ScreenAnnotation;
|
2006-12-27 23:56:38 +00:00
|
|
|
}
|
|
|
|
|
2007-12-24 00:54:21 +00:00
|
|
|
namespace GuiUtils
|
2006-12-27 23:56:38 +00:00
|
|
|
{
|
2007-09-08 14:44:21 +00:00
|
|
|
/**
|
|
|
|
* Returns the translated string with the type of the given @p annotation.
|
|
|
|
*/
|
|
|
|
QString captionForAnnotation( const Okular::Annotation * annotation );
|
|
|
|
QString authorForAnnotation( const Okular::Annotation * annotation );
|
2006-12-28 00:40:09 +00:00
|
|
|
|
2007-09-08 14:44:21 +00:00
|
|
|
QString contentsHtml( const Okular::Annotation * annotation );
|
2007-07-17 20:58:38 +00:00
|
|
|
|
2007-09-08 14:44:21 +00:00
|
|
|
QString prettyToolTip( const Okular::Annotation * annotation );
|
2007-09-08 14:41:40 +00:00
|
|
|
|
2008-09-19 22:43:41 +00:00
|
|
|
QPixmap loadStamp( const QString& name, const QSize& size, int iconSize = 0 );
|
2008-09-19 20:21:57 +00:00
|
|
|
|
2010-03-17 19:37:52 +00:00
|
|
|
void addIconLoader( KIconLoader * loader );
|
|
|
|
void removeIconLoader( KIconLoader * loader );
|
2007-12-24 15:02:32 +00:00
|
|
|
KIconLoader* iconLoader();
|
2008-04-14 22:31:28 +00:00
|
|
|
|
|
|
|
void saveEmbeddedFile( Okular::EmbeddedFile *ef, QWidget *parent );
|
2012-09-27 12:14:03 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the movie object that is referenced by a rendition action of the passed screen @p annotation
|
|
|
|
* or @c 0 if the screen annotation has no rendition action set or the rendition action does not contain
|
|
|
|
* a media rendition.
|
|
|
|
*/
|
|
|
|
Okular::Movie* renditionMovieFromScreenAnnotation( const Okular::ScreenAnnotation * annotation );
|
2012-06-12 10:19:21 +00:00
|
|
|
|
|
|
|
// colorize a gray image to the given color
|
|
|
|
void colorizeImage( QImage & image, const QColor & color, unsigned int alpha = 255 );
|
2007-09-08 14:44:21 +00:00
|
|
|
}
|
2006-12-27 23:56:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|