use kDebug
[kdegraphics.git] / kolourpaint / mainWindow / kpMainWindowPrivate.h
blob44878ee681686fa18b7fcd207fc028cc8a7e1567
2 /*
3 Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
4 All rights reserved.
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
8 are met:
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.
29 #ifndef kpMainWindowPrivate_H
30 #define kpMainWindowPrivate_H
33 #define DEBUG_KP_MAIN_WINDOW 0
36 #include <kpDocumentSaveOptions.h>
39 class QAction;
40 class QActionGroup;
42 class KSelectAction;
43 class KToggleAction;
45 class kpCommandEnvironment;
46 class kpDocumentEnvironment;
47 class kpToolSelectionEnvironment;
48 class kpTransformDialogEnvironment;
51 struct kpMainWindowPrivate
53 kpMainWindowPrivate ()
57 bool isFullyConstructed;
59 kpViewScrollableContainer *scrollView;
60 kpZoomedView *mainView;
61 kpThumbnail *thumbnail;
62 kpThumbnailView *thumbnailView;
63 kpDocument *document;
64 kpViewManager *viewManager;
65 kpColorToolBar *colorToolBar;
66 kpToolToolBar *toolToolBar;
67 kpCommandHistory *commandHistory;
69 bool configFirstTime;
70 bool configShowGrid;
71 bool configShowPath;
73 bool configThumbnailShown;
74 QRect configThumbnailGeometry;
75 bool configZoomedThumbnail;
77 kpDocumentEnvironment *documentEnvironment;
78 kpCommandEnvironment *commandEnvironment;
82 // Tools
85 kpToolSelectionEnvironment *toolSelectionEnvironment;
86 QActionGroup *toolsActionGroup;
88 kpTool *toolSpraycan, *toolBrush,
89 *toolColorEraser, *toolColorPicker,
90 *toolCurve, *toolEllipse,
91 *toolEllipticalSelection, *toolEraser,
92 *toolFloodFill, *toolFreeFormSelection,
93 *toolLine, *toolPen, *toolPolygon,
94 *toolPolyline, *toolRectangle, *toolRectSelection,
95 *toolRoundedRectangle, *toolZoom;
96 kpToolText *toolText;
98 QList <kpTool *> tools;
99 int lastToolNumber;
101 bool toolActionsEnabled;
102 QAction *actionPrevToolOptionGroup1,
103 *actionNextToolOptionGroup1,
104 *actionPrevToolOptionGroup2,
105 *actionNextToolOptionGroup2;
107 int settingImageSelectionTransparency;
109 int docResizeWidth, docResizeHeight;
110 bool docResizeToBeCompleted;
114 // File Menu
117 bool configOpenImagesInSameWindow, configPrintImageCenteredOnPage;
119 QAction *actionNew, *actionOpen;
120 KRecentFilesAction *actionOpenRecent;
121 QAction *actionScan, *actionProperties,
122 *actionSave, *actionSaveAs, *actionExport,
123 *actionReload,
124 *actionPrint, *actionPrintPreview,
125 *actionMail,
126 *actionSetAsWallpaperTiled, *actionSetAsWallpaperCentered,
127 *actionClose, *actionQuit;
129 KScanDialog *scanDialog;
131 KUrl lastExportURL;
132 kpDocumentSaveOptions lastExportSaveOptions;
133 bool exportFirstTime;
137 // Edit Menu
140 bool editMenuDocumentActionsEnabled;
142 QAction *actionUndo, *actionRedo,
143 *actionCut, *actionCopy,
144 *actionPaste, *actionPasteInNewWindow,
145 *actionDelete,
146 *actionSelectAll, *actionDeselect,
147 *actionCopyToFile, *actionPasteFromFile;
149 KUrl lastPasteFromURL;
151 KUrl lastCopyToURL;
152 kpDocumentSaveOptions lastCopyToSaveOptions;
153 bool copyToFirstTime;
157 // View Menu
160 bool configThumbnailShowRectangle;
161 KToggleAction *actionShowThumbnailRectangle;
163 bool viewMenuDocumentActionsEnabled;
165 QAction *actionActualSize,
166 *actionFitToPage, *actionFitToWidth, *actionFitToHeight,
167 *actionZoomIn, *actionZoomOut;
168 KSelectAction *actionZoom;
169 KToggleAction *actionShowGrid,
170 *actionShowThumbnail, *actionZoomedThumbnail;
172 QList <int> zoomList;
174 QTimer *thumbnailSaveConfigTimer;
178 // Image Menu
181 kpTransformDialogEnvironment *transformDialogEnvironment;
183 bool imageMenuDocumentActionsEnabled;
185 QAction *actionResizeScale,
186 *actionCrop, *actionAutoCrop,
187 *actionFlip,
188 *actionRotate, *actionRotateLeft, *actionRotateRight,
189 *actionSkew,
190 *actionConvertToBlackAndWhite, *actionConvertToGrayscale,
191 *actionMoreEffects,
192 *actionInvertColors, *actionClear;
194 // Implemented in kpMainWindow_Tools.cpp, not kpImageWindow_Image.cpp
195 // since they're really setting tool options.
196 KToggleAction *actionDrawOpaque;
197 QAction *actionDrawColorSimilarity;
199 int moreEffectsDialogLastEffect;
200 bool resizeScaleDialogLastKeepAspect;
204 // Colors Menu
207 bool colorMenuDocumentActionsEnabled;
209 QAction *actionColorsDefault;
210 KSelectAction *actionColorsKDE;
211 QAction *actionColorsOpen, *actionColorsReload;
213 QAction *actionColorsSave, *actionColorsSaveAs;
215 QAction *actionColorsAppendRow;
216 QAction *actionColorsDeleteRow;
220 // Settings Menu
223 KToggleAction *actionShowPath;
224 QAction *actionKeyBindings, *actionConfigureToolbars, *actionConfigure;
225 KToggleFullScreenAction *actionFullScreen;
229 // Status Bar
232 bool statusBarCreated;
233 kpSqueezedTextLabel *statusBarMessageLabel;
235 bool statusBarShapeLastPointsInitialised;
236 QPoint statusBarShapeLastStartPoint, statusBarShapeLastEndPoint;
237 bool statusBarShapeLastSizeInitialised;
238 QSize statusBarShapeLastSize;
242 // Text ToolBar
245 KFontAction *actionTextFontFamily;
246 KFontSizeAction *actionTextFontSize;
247 KToggleAction *actionTextBold, *actionTextItalic,
248 *actionTextUnderline, *actionTextStrikeThru;
250 int settingTextStyle;
251 QString textOldFontFamily;
252 int textOldFontSize;
256 // Help Menu
259 QAction *actionHelpTakingScreenshots;
263 #endif // kpMainWindowPrivate_H