File indexing completed on 2024-04-28 04:32:43
0001 /* 0002 SPDX-FileCopyrightText: 2007 Tobias Koenig <tokoe@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef OKULAR_GLOBAL_H 0008 #define OKULAR_GLOBAL_H 0009 0010 #include <QFlags> 0011 #include <QGlobalStatic> 0012 0013 /** 0014 * \namespace Okular global.h 0015 * 0016 * \brief The documentation to the global Okular namespace. 0017 */ 0018 0019 namespace Okular 0020 { 0021 /** 0022 * Describes the DRM capabilities. 0023 */ 0024 enum Permission { 0025 AllowModify = 1, ///< Allows to modify the document 0026 AllowCopy = 2, ///< Allows to copy the document 0027 AllowPrint = 4, ///< Allows to print the document 0028 AllowNotes = 8, ///< Allows to add annotations to the document 0029 AllowFillForms = 16 ///< Allows to fill the forms in the document 0030 }; 0031 Q_DECLARE_FLAGS(Permissions, Permission) 0032 0033 /** 0034 * Describes the direction of searching. 0035 */ 0036 enum SearchDirection { 0037 FromTop, ///< Searching from top of the page, next result is to be found, there was no earlier search result. 0038 FromBottom, ///< Searching from bottom of the page, next result is to be found, there was no earlier search result. 0039 NextResult, ///< Searching for the next result on the page, earlier result should be located so we search from the last result not from the beginning of the page. 0040 PreviousResult ///< Searching for the previous result on the page, earlier result should be located so we search from the last result not from the beginning of the page. 0041 }; 0042 0043 /** 0044 * A rotation. 0045 */ 0046 enum Rotation { 0047 Rotation0 = 0, ///< Not rotated. 0048 Rotation90 = 1, ///< Rotated 90 degrees clockwise. 0049 Rotation180 = 2, ///< Rotated 180 degrees clockwise. 0050 Rotation270 = 3 ///< Rotated 2700 degrees clockwise. 0051 }; 0052 0053 /** 0054 * Describes the type of generation of objects 0055 */ 0056 enum GenerationType { 0057 Synchronous, ///< Will create the object in a synchronous way 0058 Asynchronous ///< Will create the object in an asynchronous way 0059 }; 0060 0061 /** 0062 * The side(s) to be considered when merging areas. 0063 */ 0064 enum MergeSide { 0065 MergeRight = 0, ///< Merge only if the right side of the first area intersect. 0066 MergeBottom = 1, ///< Merge only if the bottom side of the first area intersect. 0067 MergeLeft = 2, ///< Merge only if the left side of the first area intersect. 0068 MergeTop = 3, ///< Merge only if the top side of the first area intersect. 0069 MergeAll = 4 ///< Merge if the areas intersects, no matter which side(s). 0070 }; 0071 0072 /** 0073 * Describes the possible script types. 0074 */ 0075 enum ScriptType { 0076 JavaScript = 0 ///< JavaScript code 0077 }; 0078 0079 } 0080 0081 #endif