AlbumShaper 1.0a3
titleWidget.h
Go to the documentation of this file.
1//Added by qt3to4:
2#include <QDropEvent>
3#include <Q3GridLayout>
4#include <QPixmap>
5#include <QLabel>
6#include <Q3PopupMenu>
7#include <QDragEnterEvent>
8//==============================================
9// copyright : (C) 2003-2005 by Will Stokes
10//==============================================
11// This program is free software; you can redistribute it
12// and/or modify it under the terms of the GNU General
13// Public License as published by the Free Software
14// Foundation; either version 2 of the License, or
15// (at your option) any later version.
16//==============================================
17
18#ifndef GUI_TITLEWIDGET_H
19#define GUI_TITLEWIDGET_H
20
21//--------------------
22//forward declarations
23class QMenuBar;
24class Q3PopupMenu;
25class Q3GridLayout;
26class QLabel;
27class QLineEdit;
28class QPixmap;
29class QToolButton;
30class Album;
31class Subalbum;
32class Window;
33class AlbumStatistics;
35class About;
36class HelpWindow;
37class Shortcuts;
38class ALabel;
39class Q3IconViewItem;
40class Photo;
42//--------------------
43
44#define ABOUT 0
45#define UPDATES 1
46#define UPCOMING 2
47
48#include <q3frame.h>
50
51//=====================================
55//=====================================
56class TitleWidget : public Q3Frame
57{
58Q_OBJECT
59
60public:
62 TitleWidget(QWidget *parent=0, const char* name=0);
63
66
68 void useAnimation(bool val);
69
71 void setAlbum( Album* val);
72
74 Album* getAlbum();
75
77 void refresh();
78
80 bool getBusy();
81
83 void setBusy(bool val);
84
87//----------------------
88protected:
89 void dragEnterEvent( QDragEnterEvent* e);
90 void dropEvent( QDropEvent* e);
91
92 //create and return path to temporary directory for an album,
93 //if no string is provided temporary directory is created
94 //using user prefernce for default temporary directories
95 QString createTmpDir(QString albumPath = QString::null );
96//----------------------
97signals:
100//----------------------
101public slots:
104
106 void aboutClosed();
107
109 void helpClosed();
110
112 void quitApplication();
113
114 //Settings closed
116
119
121 void refreshCollectionAnnotations(Subalbum* collection);
122
124 void setAlbumImage(Photo* photo);
125
127 void setSubalbumImage(Photo* photo);
128
130 void aboutProgram(int mode = ABOUT);
131
133 void help();
134
136 void windowStateChanged(bool state);
137
139 void updateMenus(bool anySelected=false, bool anyRevertable=false);
140//----------------------
141private slots:
143 void storeAnnotations();
144
146 void setAlbumImage();
147
149 void unsetAlbumImage();
150
152 void setSubalbumImage();
153
155 void unsetSubalbumImage();
156
158 void newAlbum();
159 //----------------------------
161 void loadAlbum();
162
164 void loadRecentAlbum(int index);
165
169 bool proceedWithLoad();
170
172 void loadAlbum(QString location);
173 //----------------------------
175 void saveAlbum();
176
178 void saveAsAlbum();
179
181 void revertToSaved();
182
185
187 void exportLargeImages();
188
190 void settings();
191
194
196 void revertPhotos();
197
199 void albumStatistics();
200
202 void clearOpenRecentMenu();
203 //----------------------
204private:
207
209 void refreshOpenRecentMenu();
210
212 QMenuBar* menu;
213
215 Q3PopupMenu* file;
216
218 Q3PopupMenu* openRecent;
222
223
225 Q3PopupMenu* photoMenu;
226
228 Q3PopupMenu* tools;
229
230 //PLATFORM_SPECIFIC_CODE
232 #if defined(Q_OS_MACX)
233 Q3PopupMenu* windowMenu;
234 int WINDOW_MINIMIZE;
235 #endif
236
238 Q3PopupMenu* helpMenu;
239
241 Q3GridLayout* mainGrid;
243
245 Q3GridLayout* albumAnnotationGrid;
249 QLineEdit* albumNameVal;
253 QLineEdit* albumAuthorVal;
254
260 QLineEdit* subalbumNameVal;
263
266
269
272
275
278
281
283 bool busy;
284
285 //modification detection enabled/disabled
287
288 //file menu item id's
296
300
304
307
310
311 //recent albums object
313 //----------------------
314};
315//======================
316
317#endif //GUI_TITLEWIDGET_H
About window widget.
Definition about.h:39
Album Statistics Window.
An album contains Subalbums.
Definition album.h:53
Configuration/Settings Interface.
Help window widget.
Definition helpWindow.h:29
A photo consists of a full size image, a smaller slide show image, a very small thumbnail image,...
Definition photo.h:45
A custom menu entry, displays album image, name, and number of photos.
This class maintains and handles saving and loading a list of recently viewed albums.
Shortcuts window widget.
A subalbum contains photos.
Definition subalbum.h:49
Widget which displays album name, description, representative image, and album shaper logo.
Definition titleWidget.h:57
void dropEvent(QDropEvent *e)
bool detectModifications
void settingsWindowClosed()
QString createTmpDir(QString albumPath=QString::null)
void windowStateChanged(bool state)
Enables/disables "minimize" window menu entry depending on window state.
Q3Frame * albumAnnotationFrame
int REMOVE_DESCRIPTIONS
photos menu item id's
Album * getAlbum()
Returns a pointer to the album object.
QString tmpDirErrorDesc
void albumStatistics()
Pops up album statistics window.
TitleWidget(QWidget *parent=0, const char *name=0)
Creates layout.
bool cacheSetButtonState
cached set button state
Window * window
Window pointer.
void unsetAlbumImage()
Unsets the Album Image.
void revertToSaved()
Revert to last saved album.
RecentAlbums * getRecentAlbums()
returns handle to recent albums object
void loadRecentAlbum(int index)
Loads a recent album.
Q3PopupMenu * tools
Tools menu.
void albumStatisticsClosed()
Frees album statistics dialog once closed.
QLabel * subalbumName
int numRecentMenuItems
QLineEdit * albumDescriptionVal
void revertPhotos()
Revert selected photos to original form.
int BEGIN_PRESENTATION
tools menu item id's
QLineEdit * albumAuthorVal
void refreshOpenRecentMenu()
Refreshes open recent menu.
QLabel * albumDescription
void aboutClosed()
Frees about dialog once closed.
Q3Frame * subalbumAnnotationFrame
void clearOpenRecentMenu()
Clears albums from open recent menu.
void storeAnnotations()
Store annotations.
void exportLargeImages()
Export large images only to a new directory for printing purposes.
bool proceedWithLoad()
Helper function for load methods, checks if there are any unsaved changes and if so warns user any su...
void setBusy(bool val)
set program busy state
void quitApplication()
Quit slot.
int BEGIN_PRESENTATION_AT
Q3PopupMenu * file
File menu.
void subalbumNameChanged()
Emitted when user changes subalbum name.
HelpWindow * helpWindow
HelpWindow pointer.
void aboutProgram(int mode=ABOUT)
Pops up about dialog.
void updateAlbumAnnotations()
Updates subalbum annotations.
~TitleWidget()
Deletes stuff!
void removeSelectedPhotoDesc()
Strip descriptions from selected photos.
void helpClosed()
Frees HelpWindow once closed.
QLineEdit * subalbumDescriptionVal
int EXPORT_SMALL_WEB_GALLERY
ALabel * albumImage
QString tmpDirErrorMessage
error message and description when temp directory cannot be created
Q3PopupMenu * helpMenu
Window menu, only used in OSX.
void updateMenus(bool anySelected=false, bool anyRevertable=false)
update begin presentation menu entry - disabled when no photos in album
About * about
About dialog pointer.
void setAlbumImage()
Sets the Album Image.
void settings()
Pops up settings window.
int EXPORT_LARGE_IMAGES
void exportSmallWebGallery()
Export small web gallery (excludes full size images and Album.xml file)
QLabel * albumName
Q3Frame * mainFrame
bool getBusy()
is program busy?
void setSubalbumImage()
Sets the Subalbum Image.
Q3GridLayout * subalbumAnnotationGrid
Subalbum annotation grid.
Q3GridLayout * albumAnnotationGrid
Album annotation grid.
QLabel * subalbumDescription
void dragEnterEvent(QDragEnterEvent *e)
QLineEdit * albumNameVal
void help()
Pops up HelpWindow.
ALabel * subalbumImage
void setAlbum(Album *val)
Sets new pointer to the album object.
void unsetSubalbumImage()
Unsets the Subalbum Image.
void saveAlbum()
Saves album.
void populateOpenRecentMenu()
Populates the open recent menu with a default set of 9 items + clear.
RecentAlbums recentAlbums
int REVERT_TO_SAVED_ALBUM
void loadAlbum()
Loads an album specified with file chooser.
AlbumStatistics * albumStats
Album Statistics dialog pointer.
QMenuBar * menu
Menubar file menu and help menu inserted in.
QLabel * albumAuthor
void refresh()
Refreshs data from backend objects.
QLineEdit * subalbumNameVal
void newAlbum()
Resets to empty album.
void saveAsAlbum()
Saves album as.
ConfigurationWidget * settingsWindow
Settings dialog pointer.
void refreshCollectionAnnotations(Subalbum *collection)
Update displayed collection name and cover image.
bool busy
Is the program currently busy? helps block other operations.
Album * albm
Backend album object.
int * recentMenuItems
Q3PopupMenu * openRecent
Open recent submenu.
Q3GridLayout * mainGrid
Main grid.
Q3PopupMenu * photoMenu
Photos menu.
RecentAlbumMenuItem ** customRecentMenuItems
void useAnimation(bool val)
Use animation for rep images?
Top level widget, encapsulates the title widget, the layout widget, and the toolbar widget.
Definition window.h:40
#define ABOUT
Definition titleWidget.h:44