1
/* ============================================================
2
* Author: Renchi Raju <renchi@pooh.tam.uiuc.edu>
3
* Gilles Caulier <caulier dot gilles at free.fr>
7
* Copyright 2004-2005 by Renchi Raju, Gilles Caulier
8
* Copyright 2006 by Gilles Caulier
10
* This program is free software; you can redistribute it
11
* and/or modify it under the terms of the GNU General
12
* Public License as published by the Free Software Foundation;
13
* either version 2, or (at your option)
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
21
* ============================================================ */
28
#include <kmainwindow.h>
42
class KToolBarPopupAction;
49
class ImageWindow : public KMainWindow
57
void loadURL(const KURL::List& urlList, const KURL& urlCurrent,
58
const QString& caption=QString::null,
59
bool allowSaving=true,
60
AlbumIconView* view=0L);
64
static ImageWindow* imagewindow();
70
QPopupMenu* m_contextMenu;
81
// Allow to use Image properties and Comments/Tags dialogs from main window.
82
AlbumIconView* m_view;
84
// If image editor is launched by camera interface, current
85
// image cannot be saved.
88
// If current image file format is only available in read only,
89
// typicially all RAW image file formats.
92
int m_JPEGCompression;
95
bool m_TIFFCompression;
96
bool m_rotatedOrFlipped;
98
bool m_fullScreenHideToolBar;
99
bool m_removeFullScreenButton;
103
KAction *m_navNextAction;
104
KAction *m_navPrevAction;
105
KAction *m_navFirstAction;
106
KAction *m_navLastAction;
108
KAction *m_saveAction;
109
KAction *m_saveAsAction;
110
KAction *m_restoreAction;
112
KAction *m_zoomPlusAction;
113
KAction *m_zoomMinusAction;
114
KToggleAction *m_zoomFitAction;
115
KToggleAction *m_fullScreenAction;
116
KSelectAction *m_viewHistogramAction;
118
KActionMenu *m_rotateAction;
119
KActionMenu *m_flipAction;
120
KAction *m_rotate90Action;
121
KAction *m_rotate180Action;
122
KAction *m_rotate270Action;
123
KAction *m_flipHorzAction;
124
KAction *m_flipVertAction;
126
KAction *m_resizeAction;
127
KAction *m_cropAction;
129
KAction *m_fileprint;
130
KAction *m_fileproperties;
131
KAction *m_fileDelete;
132
KAction *m_commentedit;
134
KAction *m_copyAction;
135
KToolBarPopupAction *m_undoAction;
136
KToolBarPopupAction *m_redoAction;
138
KAction *m_imagePluginsHelp;
140
static ImageWindow *m_instance;
148
bool promptUserSave();
149
void plugActionAccel(KAction* action);
150
void unplugActionAccel(KAction* action);
156
void signalFileDeleted(const KURL& url);
157
void signalFileAdded(const KURL& url);
158
void signalFileModified(const KURL& url);
162
void slotLoadCurrent();
166
void slotLoadFirst();
169
void slotToggleAutoZoom();
170
void slotViewHistogram();
171
void slotToggleFullScreen();
172
void slotEscapePressed();
176
void slotContextMenu();
177
void slotZoomChanged(float zoom);
178
void slotChanged(bool, bool);
179
void slotSelected(bool);
181
void slotRotatedOrFlipped();
183
void slotSave() { if (m_isReadOnly) saveAs(); else save(); };
184
void slotSaveAs() { saveAs(); };
186
void slotAboutToShowUndoMenu();
187
void slotAboutToShowRedoMenu();
189
void slotFilePrint();
190
void slotFileProperties();
191
void slotCommentsEdit();
193
void slotDeleteCurrentItem();
195
void slotImagePluginsHelp();
198
void slotConfToolbars();
199
void slotNewToolbarConfig();
201
void slotAssignTag(int tagID);
202
void slotRemoveTag(int tagID);
206
void closeEvent(QCloseEvent *e);
210
#endif /* IMAGEWINDOW_H */