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.
29 #ifndef kpMainWindowPrivate_H
30 #define kpMainWindowPrivate_H
33 #define DEBUG_KP_MAIN_WINDOW 0
36 #include <kpDocumentSaveOptions.h>
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
;
64 kpViewManager
*viewManager
;
65 kpColorToolBar
*colorToolBar
;
66 kpToolToolBar
*toolToolBar
;
67 kpCommandHistory
*commandHistory
;
73 bool configThumbnailShown
;
74 QRect configThumbnailGeometry
;
75 bool configZoomedThumbnail
;
77 kpDocumentEnvironment
*documentEnvironment
;
78 kpCommandEnvironment
*commandEnvironment
;
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
;
98 QList
<kpTool
*> tools
;
101 bool toolActionsEnabled
;
102 QAction
*actionPrevToolOptionGroup1
,
103 *actionNextToolOptionGroup1
,
104 *actionPrevToolOptionGroup2
,
105 *actionNextToolOptionGroup2
;
107 int settingImageSelectionTransparency
;
109 int docResizeWidth
, docResizeHeight
;
110 bool docResizeToBeCompleted
;
117 bool configOpenImagesInSameWindow
, configPrintImageCenteredOnPage
;
119 QAction
*actionNew
, *actionOpen
;
120 KRecentFilesAction
*actionOpenRecent
;
121 QAction
*actionScan
, *actionProperties
,
122 *actionSave
, *actionSaveAs
, *actionExport
,
124 *actionPrint
, *actionPrintPreview
,
126 *actionSetAsWallpaperTiled
, *actionSetAsWallpaperCentered
,
127 *actionClose
, *actionQuit
;
129 KScanDialog
*scanDialog
;
132 kpDocumentSaveOptions lastExportSaveOptions
;
133 bool exportFirstTime
;
140 bool editMenuDocumentActionsEnabled
;
142 QAction
*actionUndo
, *actionRedo
,
143 *actionCut
, *actionCopy
,
144 *actionPaste
, *actionPasteInNewWindow
,
146 *actionSelectAll
, *actionDeselect
,
147 *actionCopyToFile
, *actionPasteFromFile
;
149 KUrl lastPasteFromURL
;
152 kpDocumentSaveOptions lastCopyToSaveOptions
;
153 bool copyToFirstTime
;
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
;
181 kpTransformDialogEnvironment
*transformDialogEnvironment
;
183 bool imageMenuDocumentActionsEnabled
;
185 QAction
*actionResizeScale
,
186 *actionCrop
, *actionAutoCrop
,
188 *actionRotate
, *actionRotateLeft
, *actionRotateRight
,
190 *actionConvertToBlackAndWhite
, *actionConvertToGrayscale
,
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
;
207 bool colorMenuDocumentActionsEnabled
;
209 QAction
*actionColorsDefault
;
210 KSelectAction
*actionColorsKDE
;
211 QAction
*actionColorsOpen
, *actionColorsReload
;
213 QAction
*actionColorsSave
, *actionColorsSaveAs
;
215 QAction
*actionColorsAppendRow
;
216 QAction
*actionColorsDeleteRow
;
223 KToggleAction
*actionShowPath
;
224 QAction
*actionKeyBindings
, *actionConfigureToolbars
, *actionConfigure
;
225 KToggleFullScreenAction
*actionFullScreen
;
232 bool statusBarCreated
;
233 kpSqueezedTextLabel
*statusBarMessageLabel
;
235 bool statusBarShapeLastPointsInitialised
;
236 QPoint statusBarShapeLastStartPoint
, statusBarShapeLastEndPoint
;
237 bool statusBarShapeLastSizeInitialised
;
238 QSize statusBarShapeLastSize
;
245 KFontAction
*actionTextFontFamily
;
246 KFontSizeAction
*actionTextFontSize
;
247 KToggleAction
*actionTextBold
, *actionTextItalic
,
248 *actionTextUnderline
, *actionTextStrikeThru
;
250 int settingTextStyle
;
251 QString textOldFontFamily
;
259 QAction
*actionHelpTakingScreenshots
;
263 #endif // kpMainWindowPrivate_H