#include <saveDialog.h>
Definition at line 35 of file saveDialog.h.
Public Member Functions | |
SaveDialog (QWidget *parent=0, const char *name=0) | |
Creates window and prints "Saveing..." message. | |
~SaveDialog () | |
Frees Widgets. | |
void | printMessage (QString message) |
Adds a message to end of list. | |
void | printSubalbumHTML (int val) |
Prints out a "Subalbum # html" message. | |
void | printSubalbumPhoto (int subalbum, int photo) |
Prints out a "Subalbum # Photo #" message. | |
Private Attributes | |
QPixmap * | applicationIcon |
Application icon. | |
QGridLayout * | grid |
Layout widgets placed in. | |
QLabel * | saving |
"Saving..." label | |
QListBox * | entries |
Listbox all entries are placed in. | |
bool | lastMessageSubalbumHTML |
Used to keep track what the last message was and if it can be altered. | |
bool | lastMessageSubalbumPhoto |
int | lastSubalbum |
|
Creates window and prints "Saveing..." message.
Definition at line 30 of file saveDialog.cpp. References applicationIcon, entries, grid, IMAGE_PATH, lastMessageSubalbumHTML, lastMessageSubalbumPhoto, lastSubalbum, and saving.
00030 : 00031 QWidget(parent,name) 00032 00033 { 00034 //create and set application icon 00035 applicationIcon = new QPixmap(QString(IMAGE_PATH)+"albumShaperIcon.png"); 00036 setIcon( *applicationIcon ); 00037 setCaption( "Saving..."); 00038 00039 //create widgts and place in window 00040 saving = new QLabel( this ); 00041 saving->setText( "Saving..." ); 00042 saving->setFont( QFont( "Time", 12, QFont::Bold ) ); 00043 00044 entries = new QListBox( this ); 00045 entries->setSelectionMode( QListBox::NoSelection ); 00046 00047 //place all labels in grid layout 00048 grid = new QGridLayout( this, 2, 1, 0 ); 00049 grid->addWidget( saving, 0, 0, Qt::AlignLeft); 00050 grid->addWidget( entries, 1, 0); 00051 00052 //set the background of the widget to be white 00053 setPaletteBackgroundColor( QColor(255, 255, 255) ); 00054 00055 //set defaults 00056 lastMessageSubalbumHTML = false; 00057 lastMessageSubalbumPhoto = false; 00058 lastSubalbum = -1; 00059 } //============================================== |
|
Frees Widgets.
Definition at line 61 of file saveDialog.cpp. References applicationIcon.
00062 { 00063 delete applicationIcon; 00064 } |
|
Adds a message to end of list.
Definition at line 66 of file saveDialog.cpp. References entries, lastMessageSubalbumHTML, lastMessageSubalbumPhoto, and lastSubalbum. Referenced by Album::exportSubalbumImages(), Album::exportToDisk(), Album::exportToHTML(), Album::exportToXML(), Album::removeStagnantImages(), and Album::reorderSubalbumImages().
00067 { 00068 entries->insertItem( message ); 00069 entries->triggerUpdate( false ); 00070 lastMessageSubalbumHTML = false; 00071 lastMessageSubalbumPhoto = false; 00072 lastSubalbum = -1; 00073 repaint(); 00074 qApp->processEvents(); 00075 } |
|
Prints out a "Subalbum # html" message.
Definition at line 77 of file saveDialog.cpp. References entries, lastMessageSubalbumHTML, lastMessageSubalbumPhoto, and lastSubalbum. Referenced by Album::exportSublabumsToHTML().
00078 { 00079 if(lastMessageSubalbumHTML) 00080 { 00081 entries->changeItem( QString("Subalbum %1 HTML").arg(val), entries->count() -1); 00082 } 00083 else 00084 { 00085 entries->insertItem( QString("Subalbum %1 HTML").arg(val) ); 00086 lastMessageSubalbumHTML = true; 00087 } 00088 00089 lastMessageSubalbumPhoto = false; 00090 lastSubalbum = -1; 00091 repaint(); 00092 qApp->processEvents(); 00093 } |
|
Prints out a "Subalbum # Photo #" message.
Definition at line 95 of file saveDialog.cpp. References entries, lastMessageSubalbumHTML, lastMessageSubalbumPhoto, and lastSubalbum. Referenced by Album::exportSubalbumImages(), and Album::reorderSubalbumImages().
00096 { 00097 if(lastMessageSubalbumPhoto && lastSubalbum == subalbum) 00098 { 00099 entries->changeItem( QString("Subalbum %1 photo %2").arg(subalbum).arg(photo), entries->count() -1 ); 00100 } 00101 else 00102 { 00103 entries->insertItem( QString("Subalbum %1 photo %2").arg(subalbum).arg(photo) ); 00104 lastMessageSubalbumPhoto = true; 00105 lastSubalbum = subalbum; 00106 } 00107 00108 lastMessageSubalbumHTML = false; 00109 repaint(); 00110 qApp->processEvents(); 00111 } |
|
Application icon.
Definition at line 56 of file saveDialog.h. Referenced by SaveDialog(), and ~SaveDialog(). |
|
Listbox all entries are placed in.
Definition at line 65 of file saveDialog.h. Referenced by printMessage(), printSubalbumHTML(), printSubalbumPhoto(), and SaveDialog(). |
|
Layout widgets placed in.
Definition at line 59 of file saveDialog.h. Referenced by SaveDialog(). |
|
Used to keep track what the last message was and if it can be altered.
Definition at line 68 of file saveDialog.h. Referenced by printMessage(), printSubalbumHTML(), printSubalbumPhoto(), and SaveDialog(). |
|
Definition at line 69 of file saveDialog.h. Referenced by printMessage(), printSubalbumHTML(), printSubalbumPhoto(), and SaveDialog(). |
|
Definition at line 70 of file saveDialog.h. Referenced by printMessage(), printSubalbumHTML(), printSubalbumPhoto(), and SaveDialog(). |
|
"Saving..." label
Definition at line 62 of file saveDialog.h. Referenced by SaveDialog(). |