there is no moc file generated for this class
[kdegraphics.git] / kolourpaint / mainWindow / kpMainWindowPrivate.h
blob7e3fc63acb90c2f1a1cedae3195832bc49d404d7
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;
44 class KAction;
46 class kpCommandEnvironment;
47 class kpDocumentEnvironment;
48 class kpToolSelectionEnvironment;
49 class kpTransformDialogEnvironment;
52 struct kpMainWindowPrivate
54 kpMainWindowPrivate ()
58 bool isFullyConstructed;
60 kpViewScrollableContainer *scrollView;
61 kpZoomedView *mainView;
62 kpThumbnail *thumbnail;
63 kpThumbnailView *thumbnailView;
64 kpDocument *document;
65 kpViewManager *viewManager;
66 kpColorToolBar *colorToolBar;
67 kpToolToolBar *toolToolBar;
68 kpCommandHistory *commandHistory;
70 bool configFirstTime;
71 bool configShowGrid;
72 bool configShowPath;
74 bool configThumbnailShown;
75 QRect configThumbnailGeometry;
76 bool configZoomedThumbnail;
78 kpDocumentEnvironment *documentEnvironment;
79 kpCommandEnvironment *commandEnvironment;
83 // Tools
86 kpToolSelectionEnvironment *toolSelectionEnvironment;
87 QActionGroup *toolsActionGroup;
89 kpTool *toolSpraycan, *toolBrush,
90 *toolColorEraser, *toolColorPicker,
91 *toolCurve, *toolEllipse,
92 *toolEllipticalSelection, *toolEraser,
93 *toolFloodFill, *toolFreeFormSelection,
94 *toolLine, *toolPen, *toolPolygon,
95 *toolPolyline, *toolRectangle, *toolRectSelection,
96 *toolRoundedRectangle, *toolZoom;
97 kpToolText *toolText;
99 QList <kpTool *> tools;
100 int lastToolNumber;
102 bool toolActionsEnabled;
103 KAction *actionPrevToolOptionGroup1,
104 *actionNextToolOptionGroup1,
105 *actionPrevToolOptionGroup2,
106 *actionNextToolOptionGroup2;
108 int settingImageSelectionTransparency;
110 int docResizeWidth, docResizeHeight;
111 bool docResizeToBeCompleted;
115 // File Menu
118 bool configOpenImagesInSameWindow, configPrintImageCenteredOnPage;
120 QAction *actionNew, *actionOpen;
121 KRecentFilesAction *actionOpenRecent;
122 KAction *actionScan, *actionProperties,
123 *actionSave, *actionSaveAs, *actionExport,
124 *actionReload,
125 *actionPrint, *actionPrintPreview,
126 *actionMail,
127 *actionSetAsWallpaperTiled, *actionSetAsWallpaperCentered,
128 *actionClose, *actionQuit;
130 KScanDialog *scanDialog;
132 KUrl lastExportURL;
133 kpDocumentSaveOptions lastExportSaveOptions;
134 bool exportFirstTime;
138 // Edit Menu
141 bool editMenuDocumentActionsEnabled;
143 KAction *actionUndo, *actionRedo,
144 *actionCut, *actionCopy,
145 *actionPaste, *actionPasteInNewWindow,
146 *actionDelete,
147 *actionSelectAll, *actionDeselect,
148 *actionCopyToFile, *actionPasteFromFile;
150 KUrl lastPasteFromURL;
152 KUrl lastCopyToURL;
153 kpDocumentSaveOptions lastCopyToSaveOptions;
154 bool copyToFirstTime;
158 // View Menu
161 bool configThumbnailShowRectangle;
162 KToggleAction *actionShowThumbnailRectangle;
164 bool viewMenuDocumentActionsEnabled;
166 QAction *actionActualSize,
167 *actionFitToPage, *actionFitToWidth, *actionFitToHeight,
168 *actionZoomIn, *actionZoomOut;
169 KSelectAction *actionZoom;
170 KToggleAction *actionShowGrid,
171 *actionShowThumbnail, *actionZoomedThumbnail;
173 QList <int> zoomList;
175 QTimer *thumbnailSaveConfigTimer;
179 // Image Menu
182 kpTransformDialogEnvironment *transformDialogEnvironment;
184 bool imageMenuDocumentActionsEnabled;
186 KAction *actionResizeScale,
187 *actionCrop, *actionAutoCrop,
188 *actionFlip,
189 *actionRotate, *actionRotateLeft, *actionRotateRight,
190 *actionSkew,
191 *actionConvertToBlackAndWhite, *actionConvertToGrayscale,
192 *actionMoreEffects,
193 *actionInvertColors, *actionClear;
195 // Implemented in kpMainWindow_Tools.cpp, not kpImageWindow_Image.cpp
196 // since they're really setting tool options.
197 KToggleAction *actionDrawOpaque;
198 QAction *actionDrawColorSimilarity;
200 int moreEffectsDialogLastEffect;
201 bool resizeScaleDialogLastKeepAspect;
205 // Colors Menu
208 bool colorMenuDocumentActionsEnabled;
210 QAction *actionColorsDefault;
211 KSelectAction *actionColorsKDE;
212 QAction *actionColorsOpen, *actionColorsReload;
214 QAction *actionColorsSave, *actionColorsSaveAs;
216 QAction *actionColorsAppendRow;
217 QAction *actionColorsDeleteRow;
221 // Settings Menu
224 KToggleAction *actionShowPath;
225 QAction *actionKeyBindings, *actionConfigureToolbars, *actionConfigure;
226 KToggleFullScreenAction *actionFullScreen;
230 // Status Bar
233 bool statusBarCreated;
234 kpSqueezedTextLabel *statusBarMessageLabel;
236 bool statusBarShapeLastPointsInitialised;
237 QPoint statusBarShapeLastStartPoint, statusBarShapeLastEndPoint;
238 bool statusBarShapeLastSizeInitialised;
239 QSize statusBarShapeLastSize;
243 // Text ToolBar
246 KFontAction *actionTextFontFamily;
247 KFontSizeAction *actionTextFontSize;
248 KToggleAction *actionTextBold, *actionTextItalic,
249 *actionTextUnderline, *actionTextStrikeThru;
251 int settingTextStyle;
252 QString textOldFontFamily;
253 int textOldFontSize;
257 // Help Menu
260 QAction *actionHelpTakingScreenshots;
264 #endif // kpMainWindowPrivate_H