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 <qglobal.h>
36#include <qpoint.h>
37#include <qsize.h>
38#include <qstring.h>
39
40#include <kdeversion.h>
41
42
43// approx. 2896x2896x32bpp or 3344x3344x24bpp (TODO: 24==32?) or 4096*4096x16bpp
44#define KP_BIG_IMAGE_SIZE (32 * 1048576)
45
46
47#define KP_PI 3.141592653589793238462
48
49
50#define KP_DEGREES_TO_RADIANS(deg) ((deg) * KP_PI / 180.0)
51#define KP_RADIANS_TO_DEGREES(rad) ((rad) * 180.0 / KP_PI)
52
53
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)
58
59
60#define KP_INCHES_PER_METER (100 / 2.54)
61#define KP_MILLIMETERS_PER_INCH 25.4
62
63
64//
65// Settings
66//
67
68#define kpSettingsGroupRecentFiles "Recent Files"
69
70#define kpSettingsGroupGeneral "General Settings"
71#define kpSettingFirstTime "First Time"
72#define kpSettingShowGrid "Show Grid"
73#define kpSettingShowPath "Show Path"
74#define kpSettingColorSimilarity "Color Similarity"
75#define kpSettingDitherOnOpen "Dither on Open if Screen is 15/16bpp and Image Num Colors More Than"
76#define kpSettingPrintImageCenteredOnPage "Print Image Centered On Page"
77#define kpSettingOpenImagesInSameWindow "Open Images in the Same Window"
78
79#define kpSettingsGroupFileSaveAs "File/Save As"
80#define kpSettingsGroupFileExport "File/Export"
81#define kpSettingsGroupEditCopyTo "Edit/Copy To"
82
83#define kpSettingForcedMimeType "Forced MimeType"
84#define kpSettingForcedColorDepth "Forced Color Depth"
85#define kpSettingForcedDither "Forced Dither"
86#define kpSettingForcedQuality "Forced Quality"
87
88#define kpSettingLastDocSize "Last Document Size"
89
90#define kpSettingMoreEffectsLastEffect "More Effects - Last Effect"
91
92#define kpSettingsGroupMimeTypeProperties "MimeType Properties Version 1.2-3"
93#define kpSettingMimeTypeMaximumColorDepth "Maximum Color Depth"
94#define kpSettingMimeTypeHasConfigurableColorDepth "Configurable Color Depth"
95#define kpSettingMimeTypeHasConfigurableQuality "Configurable Quality Setting"
96
97
98#define kpSettingsGroupUndoRedo "Undo/Redo Settings"
99#define kpSettingUndoMinLimit "Min Limit"
100#define kpSettingUndoMaxLimit "Max Limit"
101#define kpSettingUndoMaxLimitSizeLimit "Max Limit Size Limit"
102
103
104#define kpSettingsGroupThumbnail "Thumbnail Settings"
105#define kpSettingThumbnailShown "Shown"
106#define kpSettingThumbnailGeometry "Geometry"
107#define kpSettingThumbnailZoomed "Zoomed"
108#define kpSettingThumbnailShowRectangle "ShowRectangle"
109
110
111#define kpSettingsGroupPreviewSave "Save Preview Settings"
112#define kpSettingPreviewSaveGeometry "Geometry"
113#define kpSettingPreviewSaveUpdateDelay "Update Delay"
114
115
116#define kpSettingsGroupTools "Tool Settings"
117#define kpSettingLastTool "Last Used Tool"
118#define kpSettingToolBoxIconSize "Tool Box Icon Size"
119
120
121#define kpSettingsGroupText "Text Settings"
122#define kpSettingFontFamily "Font Family"
123#define kpSettingFontSize "Font Size"
124#define kpSettingBold "Bold"
125#define kpSettingItalic "Italic"
126#define kpSettingUnderline "Underline"
127#define kpSettingStrikeThru "Strike Thru"
128
129
130#define kpSettingsGroupFlattenEffect "Flatten Effect Settings"
131#define kpSettingFlattenEffectColor1 "Color1"
132#define kpSettingFlattenEffectColor2 "Color2"
133
134
135//
136// Session Restore Setting
137//
138
139// URL of the document in the main window.
140//
141// This key only exists if the document does. If it exists, it can be empty.
142// The URL need not point to a file that exists e.g. "kolourpaint doesnotexist.png".
143#define kpSessionSettingDocumentUrl QString::fromLatin1 ("Session Document Url")
144
145// The size of a document which is not from a URL e.g. "kolourpaint doesnotexist.png".
146// This key does not exist for documents from URLs.
147#define kpSessionSettingNotFromUrlDocumentSize QString::fromLatin1 ("Session Not-From-Url Document Size")
148
149
150#endif // KP_DEFS_H
151
152
153