00001 //============================================== 00002 // copyright : (C) 2003 by Will Stokes 00003 //============================================== 00004 // This program is free software; you can redistribute it 00005 // and/or modify it under the terms of the GNU General 00006 // Public License as published by the Free Software 00007 // Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // As a special exception, Will Stokes gives permission to 00011 // link this program with Qt non-commercial edition, and 00012 // distribute the resulting executable, without including the 00013 // source code for the Qt non-commercial edition in the 00014 // source distribution. 00015 //============================================== 00016 00017 #ifndef GUI_TITLEWIDGET_H 00018 #define GUI_TITLEWIDGET_H 00019 00020 //-------------------- 00021 //forward declarations 00022 class QMenuBar; 00023 class QPopupMenu; 00024 class QGridLayout; 00025 class QLabel; 00026 class QLineEdit; 00027 class QPixmap; 00028 class QToolButton; 00029 class Album; 00030 class Window; 00031 class AlbumStatistics; 00032 class About; 00033 class Handbook; 00034 //-------------------- 00035 00036 #include <qframe.h> 00037 00038 //===================================== 00042 //===================================== 00043 class TitleWidget : public QFrame 00044 { 00045 Q_OBJECT 00046 00047 public: 00049 TitleWidget(QWidget *parent=0, const char* name=0); 00050 00052 void setAlbum( Album* val); 00053 00055 Album* getAlbum(); 00056 00058 void refresh(); 00059 00061 void setSetButtonState(bool state); 00062 00064 bool getBusy(); 00065 00067 void setBusy(bool val); 00068 //---------------------- 00069 public slots: 00071 void albumStatisticsClosed(); 00072 00074 void aboutClosed(); 00075 00077 void handbookClosed(); 00078 00080 void quitApplication(); 00081 //---------------------- 00082 private slots: 00084 void updateName( const QString& val ); 00085 00087 void updateDescription( const QString& val ); 00088 00090 void updateAuthor( const QString& val ); 00091 00093 void setImageAction(); 00094 00096 void newAlbum(); 00097 00099 void loadAlbum(); 00100 00102 void saveAlbum(bool smallSave=false); 00103 00105 void saveAsAlbum(bool smallSave=false); 00106 00108 void smallSave(); 00109 00111 void albumStatistics(); 00112 00114 void aboutProgram(); 00115 00117 void handbook(); 00118 //---------------------- 00119 private: 00121 QMenuBar* menu; 00122 00124 QPopupMenu* file; 00125 00127 QPopupMenu* tools; 00128 00130 QPopupMenu* help; 00131 00133 QGridLayout* grid; 00134 00136 QLabel* albumName; 00137 00139 QLineEdit* albumNameVal; 00140 00142 QLabel* albumDescription; 00143 00145 QLineEdit* albumDescriptionVal; 00146 00148 QLabel* albumAuthor; 00149 00151 QLineEdit* albumAuthorVal; 00152 00154 QLabel* representativeImageText; 00155 00157 QToolButton* setImage; 00158 00160 QLabel* representativeLogo; 00161 00163 QLabel* albumShaperLogo; 00164 00166 QFrame* line; 00167 00169 Album* albm; 00170 00172 Window* window; 00173 00175 AlbumStatistics* albumStats; 00176 00178 About* about; 00179 00181 Handbook* handbookWindow; 00182 00184 bool busy; 00185 00186 //file menu item id's 00187 int NEW_ALBUM; 00188 int OPEN_ALBUM; 00189 int SAVE_ALBUM; 00190 int SAVEAS_ALBUM; 00191 int SMALL_SAVE; 00192 00193 //cached set button state 00194 bool cacheSetButtonState; 00195 00196 //---------------------- 00197 }; 00198 //====================== 00199 00200 #endif //GUI_TITLEWIDGET_H
1.3.4