1 
2 /*
3    Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
4    All rights reserved.
5 
6    Redistribution and use in source and binary forms, with or without
7    modification, are permitted provided that the following conditions
8    are met:
9 
10    1. Redistributions of source code must retain the above copyright
11       notice, this list of conditions and the following disclaimer.
12    2. Redistributions in binary form must reproduce the above copyright
13       notice, this list of conditions and the following disclaimer in the
14       documentation and/or other materials provided with the distribution.
15 
16    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19    IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21    NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 
29 #ifndef KP_DEFS_H
30 #define KP_DEFS_H
31 
32 
33 #include <limits.h>
34 
35 #include <QtGlobal>
36 #include <QPoint>
37 #include <QSize>
38 #include <QString>
39 
40 
41 // approx. 2896x2896x32bpp or 3344x3344x24bpp (TODO: 24==32?) or 4096*4096x16bpp
42 #define KP_BIG_IMAGE_SIZE (32 * 1048576)
43 
44 
45 #define KP_INVALID_POINT QPoint (INT_MIN / 8, INT_MIN / 8)
46 #define KP_INVALID_WIDTH (INT_MIN / 8)
47 #define KP_INVALID_HEIGHT (INT_MIN / 8)
48 #define KP_INVALID_SIZE QSize (INT_MIN / 8, INT_MIN / 8)
49 
50 
51 #define KP_INCHES_PER_METER (100 / 2.54)
52 #define KP_MILLIMETERS_PER_INCH 25.4
53 
54 
55 //
56 // Settings
57 //
58 
59 #define kpSettingsGroupRecentFiles "Recent Files"
60 
61 #define kpSettingsGroupGeneral "General Settings"
62 #define kpSettingFirstTime "First Time"
63 #define kpSettingShowGrid "Show Grid"
64 #define kpSettingShowPath "Show Path"
65 #define kpSettingDrawAntiAliased "Draw AntiAliased"
66 #define kpSettingColorSimilarity "Color Similarity"
67 #define kpSettingDitherOnOpen "Dither on Open if Screen is 15/16bpp and Image Num Colors More Than"
68 #define kpSettingPrintImageCenteredOnPage "Print Image Centered On Page"
69 #define kpSettingOpenImagesInSameWindow "Open Images in the Same Window"
70 
71 #define kpSettingsGroupFileSaveAs "File/Save As"
72 #define kpSettingsGroupFileExport "File/Export"
73 #define kpSettingsGroupEditCopyTo "Edit/Copy To"
74 
75 #define kpSettingForcedMimeType "Forced MimeType"
76 #define kpSettingForcedColorDepth "Forced Color Depth"
77 #define kpSettingForcedDither "Forced Dither"
78 #define kpSettingForcedQuality "Forced Quality"
79 
80 #define kpSettingLastDocSize "Last Document Size"
81 
82 #define kpSettingMoreEffectsLastEffect "More Effects - Last Effect"
83 
84 #define kpSettingsGroupUndoRedo "Undo/Redo Settings"
85 #define kpSettingUndoMinLimit "Min Limit"
86 #define kpSettingUndoMaxLimit "Max Limit"
87 #define kpSettingUndoMaxLimitSizeLimit "Max Limit Size Limit"
88 
89 
90 #define kpSettingsGroupThumbnail "Thumbnail Settings"
91 #define kpSettingThumbnailShown "Shown"
92 #define kpSettingThumbnailGeometry "Geometry"
93 #define kpSettingThumbnailZoomed "Zoomed"
94 #define kpSettingThumbnailShowRectangle "ShowRectangle"
95 
96 
97 #define kpSettingsGroupPreviewSave "Save Preview Settings"
98 #define kpSettingPreviewSaveGeometry "Geometry"
99 #define kpSettingPreviewSaveUpdateDelay "Update Delay"
100 
101 
102 #define kpSettingsGroupTools "Tool Settings"
103 #define kpSettingLastTool "Last Used Tool"
104 #define kpSettingToolBoxIconSize "Tool Box Icon Size"
105 
106 
107 #define kpSettingsGroupText "Text Settings"
108 #define kpSettingFontFamily "Font Family"
109 #define kpSettingFontSize "Font Size"
110 #define kpSettingBold "Bold"
111 #define kpSettingItalic "Italic"
112 #define kpSettingUnderline "Underline"
113 #define kpSettingStrikeThru "Strike Thru"
114 
115 
116 #define kpSettingsGroupFlattenEffect "Flatten Effect Settings"
117 #define kpSettingFlattenEffectColor1 "Color1"
118 #define kpSettingFlattenEffectColor2 "Color2"
119 
120 
121 //
122 // Session Restore Setting
123 //
124 
125 // URL of the document in the main window.
126 //
127 // This key only exists if the document does.  If it exists, it can be empty.
128 // The URL need not point to a file that exists e.g. "kolourpaint doesnotexist.png".
129 #define kpSessionSettingDocumentUrl QString::fromLatin1 ("Session Document Url")
130 
131 // The size of a document which is not from a URL e.g. "kolourpaint doesnotexist.png".
132 // This key does not exist for documents from URLs.
133 #define kpSessionSettingNotFromUrlDocumentSize QString::fromLatin1 ("Session Not-From-Url Document Size")
134 
135 
136 #endif  // KP_DEFS_H
137 
138 
139