3 Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
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.
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.
40 #include <kdeversion.h>
43 // approx. 2896x2896x32bpp or 3344x3344x24bpp (TODO: 24==32?) or 4096*4096x16bpp
44 #define KP_BIG_IMAGE_SIZE (32 * 1048576)
47 #define KP_PI 3.141592653589793238462
50 #define KP_DEGREES_TO_RADIANS(deg) ((deg) * KP_PI / 180.0)
51 #define KP_RADIANS_TO_DEGREES(rad) ((rad) * 180.0 / KP_PI)
54 #define KP_INVALID_POINT QPoint (INT_MIN / 8, INT_MIN / 8)
55 #define KP_INVALID_WIDTH (INT_MIN / 8)
56 #define KP_INVALID_HEIGHT (INT_MIN / 8)
57 #define KP_INVALID_SIZE QSize (INT_MIN / 8, INT_MIN / 8)
60 #define KP_INCHES_PER_METER (100 / 2.54)
61 #define KP_MILLIMETERS_PER_INCH 25.4
68 // (I would use QLatin1String but that doesn't compile with
69 // KConfigBase::readEntry()'s use of QVariant due to the lack of
70 // QLatin1String::QLatin1String(void))
72 #define kpSettingsGroupRecentFiles QString::fromLatin1 ("Recent Files")
74 #define kpSettingsGroupGeneral QString::fromLatin1 ("General Settings")
75 #define kpSettingFirstTime QString::fromLatin1 ("First Time")
76 #define kpSettingShowGrid QString::fromLatin1 ("Show Grid")
77 #define kpSettingShowPath QString::fromLatin1 ("Show Path")
78 #define kpSettingColorSimilarity QString::fromLatin1 ("Color Similarity")
79 #define kpSettingDitherOnOpen QString::fromLatin1 ("Dither on Open if Screen is 15/16bpp and Image Num Colors More Than")
80 #define kpSettingPrintImageCenteredOnPage QString::fromLatin1 ("Print Image Centered On Page")
81 #define kpSettingOpenImagesInSameWindow QString::fromLatin1 ("Open Images in the Same Window")
83 #define kpSettingsGroupFileSaveAs QString::fromLatin1 ("File/Save As")
84 #define kpSettingsGroupFileExport QString::fromLatin1 ("File/Export")
85 #define kpSettingsGroupEditCopyTo QString::fromLatin1 ("Edit/Copy To")
87 #define kpSettingForcedMimeType QString::fromLatin1 ("Forced MimeType")
88 #define kpSettingForcedColorDepth QString::fromLatin1 ("Forced Color Depth")
89 #define kpSettingForcedDither QString::fromLatin1 ("Forced Dither")
90 #define kpSettingForcedQuality QString::fromLatin1 ("Forced Quality")
92 #define kpSettingLastDocSize QString::fromLatin1 ("Last Document Size")
94 #define kpSettingMoreEffectsLastEffect QString::fromLatin1 ("More Effects - Last Effect")
96 #define kpSettingResizeScaleLastKeepAspect QString::fromLatin1 ("Resize Scale - Last Keep Aspect")
99 #define kpSettingsGroupMimeTypeProperties QString::fromLatin1 ("MimeType Properties Version 1.2-2")
100 #define kpSettingMimeTypeMaximumColorDepth QString::fromLatin1 ("Maximum Color Depth")
101 #define kpSettingMimeTypeHasConfigurableColorDepth QString::fromLatin1 ("Configurable Color Depth")
102 #define kpSettingMimeTypeHasConfigurableQuality QString::fromLatin1 ("Configurable Quality Setting")
105 #define kpSettingsGroupUndoRedo QString::fromLatin1 ("Undo/Redo Settings")
106 #define kpSettingUndoMinLimit QString::fromLatin1 ("Min Limit")
107 #define kpSettingUndoMaxLimit QString::fromLatin1 ("Max Limit")
108 #define kpSettingUndoMaxLimitSizeLimit QString::fromLatin1 ("Max Limit Size Limit")
111 #define kpSettingsGroupThumbnail QString::fromLatin1 ("Thumbnail Settings")
112 #define kpSettingThumbnailShown QString::fromLatin1 ("Shown")
113 #define kpSettingThumbnailGeometry QString::fromLatin1 ("Geometry")
114 #define kpSettingThumbnailZoomed QString::fromLatin1 ("Zoomed")
115 #define kpSettingThumbnailShowRectangle QString::fromLatin1 ("ShowRectangle")
118 #define kpSettingsGroupPreviewSave QString::fromLatin1 ("Save Preview Settings")
119 #define kpSettingPreviewSaveGeometry QString::fromLatin1 ("Geometry")
120 #define kpSettingPreviewSaveUpdateDelay QString::fromLatin1 ("Update Delay")
123 #define kpSettingsGroupTools QString::fromLatin1 ("Tool Settings")
124 #define kpSettingLastTool QString::fromLatin1 ("Last Used Tool")
125 #define kpSettingToolBoxIconSize QString::fromLatin1 ("Tool Box Icon Size")
128 #define kpSettingsGroupText QString::fromLatin1 ("Text Settings")
129 #define kpSettingFontFamily QString::fromLatin1 ("Font Family")
130 #define kpSettingFontSize QString::fromLatin1 ("Font Size")
131 #define kpSettingBold QString::fromLatin1 ("Bold")
132 #define kpSettingItalic QString::fromLatin1 ("Italic")
133 #define kpSettingUnderline QString::fromLatin1 ("Underline")
134 #define kpSettingStrikeThru QString::fromLatin1 ("Strike Thru")
137 #define kpSettingsGroupFlattenEffect QString::fromLatin1 ("Flatten Effect Settings")
138 #define kpSettingFlattenEffectColor1 QString::fromLatin1 ("Color1")
139 #define kpSettingFlattenEffectColor2 QString::fromLatin1 ("Color2")
143 // Session Restore Setting
146 // URL of the document in the main window.
148 // This key only exists if the document does. If it exists, it can be empty.
149 // The URL need not point to a file that exists e.g. "kolourpaint doesnotexist.png".
150 #define kpSessionSettingDocumentUrl QString::fromLatin1 ("Session Document Url")
152 // The size of a document which is not from a URL e.g. "kolourpaint doesnotexist.png".
153 // This key does not exist for documents from URLs.
154 #define kpSessionSettingNotFromUrlDocumentSize QString::fromLatin1 ("Session Not-From-Url Document Size")