Changeset View
Changeset View
Standalone View
Standalone View
ui/guiutils.h
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | * Copyright (C) 2006-2007 by Pino Toscano <pino@kde.org> * | 2 | * Copyright (C) 2006-2007 by Pino Toscano <pino@kde.org> * | ||
3 | * * | 3 | * * | ||
4 | * This program is free software; you can redistribute it and/or modify * | 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 * | 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 * | 6 | * the Free Software Foundation; either version 2 of the License, or * | ||
7 | * (at your option) any later version. * | 7 | * (at your option) any later version. * | ||
8 | ***************************************************************************/ | 8 | ***************************************************************************/ | ||
9 | 9 | | |||
10 | #ifndef OKULAR_GUIUTILS_H | 10 | #ifndef OKULAR_GUIUTILS_H | ||
11 | #define OKULAR_GUIUTILS_H | 11 | #define OKULAR_GUIUTILS_H | ||
12 | 12 | | |||
13 | #include <QString> | 13 | #include <QString> | ||
14 | #include <QDomDocument> | ||||
14 | 15 | | |||
15 | class QColor; | 16 | class QColor; | ||
16 | class QImage; | 17 | class QImage; | ||
17 | class QPixmap; | 18 | class QPixmap; | ||
18 | class QSize; | 19 | class QSize; | ||
19 | class QWidget; | 20 | class QWidget; | ||
20 | class QFile; | 21 | class QFile; | ||
21 | class KIconLoader; | 22 | class KIconLoader; | ||
22 | 23 | | |||
23 | namespace Okular { | 24 | namespace Okular { | ||
24 | class Annotation; | 25 | class Annotation; | ||
25 | class EmbeddedFile; | 26 | class EmbeddedFile; | ||
26 | class Movie; | 27 | class Movie; | ||
27 | class ScreenAnnotation; | 28 | class ScreenAnnotation; | ||
28 | } | 29 | } | ||
29 | 30 | | |||
30 | namespace GuiUtils | 31 | namespace GuiUtils | ||
31 | { | 32 | { | ||
33 | enum ToolType | ||||
34 | { | ||||
35 | ToolNoteLinked, | ||||
36 | ToolNoteInline, | ||||
37 | ToolInk, | ||||
38 | ToolStraightLine, | ||||
39 | ToolPolygon, | ||||
40 | ToolTextMarkup, | ||||
41 | ToolGeometricalShape, | ||||
42 | ToolStamp, | ||||
43 | ToolTypewriter, | ||||
44 | ToolUnknown | ||||
45 | }; | ||||
46 | | ||||
32 | /** | 47 | /** | ||
33 | * Returns the translated string with the type of the given @p annotation. | 48 | * Returns the translated string with the type of the given @p annotation. | ||
34 | */ | 49 | */ | ||
35 | QString captionForAnnotation( const Okular::Annotation * annotation ); | 50 | QString captionForAnnotation( const Okular::Annotation * annotation ); | ||
36 | QString authorForAnnotation( const Okular::Annotation * annotation ); | 51 | QString authorForAnnotation( const Okular::Annotation * annotation ); | ||
37 | 52 | | |||
38 | QString contentsHtml( const Okular::Annotation * annotation ); | 53 | QString contentsHtml( const Okular::Annotation * annotation ); | ||
39 | 54 | | |||
40 | QString prettyToolTip( const Okular::Annotation * annotation ); | 55 | QString prettyToolTip( const Okular::Annotation * annotation ); | ||
41 | 56 | | |||
42 | QPixmap loadStamp( const QString& name, const QSize& size, int iconSize = 0 ); | 57 | QPixmap loadStamp( const QString& name, const QSize& size, int iconSize = 0 ); | ||
43 | 58 | | |||
59 | ToolType toolTypeFromAnnotation(const Okular::Annotation * annotation); | ||||
60 | QDomDocument annotationIconDescription(const Okular::Annotation * annotation); | ||||
61 | QDomDocument annotationIconDescription(ToolType toolType, const Okular::Annotation * annotation); | ||||
62 | | ||||
44 | void addIconLoader( KIconLoader * loader ); | 63 | void addIconLoader( KIconLoader * loader ); | ||
45 | void removeIconLoader( KIconLoader * loader ); | 64 | void removeIconLoader( KIconLoader * loader ); | ||
46 | KIconLoader* iconLoader(); | 65 | KIconLoader* iconLoader(); | ||
47 | 66 | | |||
48 | void saveEmbeddedFile( Okular::EmbeddedFile *ef, QWidget *parent ); | 67 | void saveEmbeddedFile( Okular::EmbeddedFile *ef, QWidget *parent ); | ||
49 | void writeEmbeddedFile( Okular::EmbeddedFile *ef, QWidget *parent, QFile& targetFile ); | 68 | void writeEmbeddedFile( Okular::EmbeddedFile *ef, QWidget *parent, QFile& targetFile ); | ||
50 | 69 | | |||
51 | /** | 70 | /** | ||
Show All 12 Lines |