#include <loadDialog.h>
Definition at line 35 of file loadDialog.h.
Public Member Functions | |
| LoadDialog (QWidget *parent=0, const char *name=0) | |
| Creates window and prints "Loading..." message. | |
| void | printMessage (QString message) |
| Adds a message to end of list. | |
| 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 * | loading |
| "Loading..." label | |
| QListBox * | entries |
| Listbox all entries are placed in. | |
| bool | lastMessageSubalbumPhoto |
| Used to keep track what the last message was and if it can be altered. | |
| int | lastSubalbum |
|
||||||||||||
|
Creates window and prints "Loading..." message.
Definition at line 30 of file loadDialog.cpp. References applicationIcon, entries, grid, IMAGE_PATH, lastMessageSubalbumPhoto, lastSubalbum, and loading.
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( "Loading...");
00038
00039 //create widgts and place in window
00040 loading = new QLabel( this );
00041 loading->setText( "Loading..." );
00042 loading->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( loading, 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 lastMessageSubalbumPhoto = false;
00057 lastSubalbum = -1;
00058 }
//==============================================
|
|
|
Adds a message to end of list.
Definition at line 60 of file loadDialog.cpp. References entries, lastMessageSubalbumPhoto, and lastSubalbum. Referenced by Album::importFromDisk(), and TitleWidget::loadAlbum().
00061 {
00062 entries->insertItem( message );
00063 entries->triggerUpdate( false );
00064 lastMessageSubalbumPhoto = false;
00065 lastSubalbum = -1;
00066 repaint();
00067 qApp->processEvents();
00068 }
|
|
||||||||||||
|
Prints out a "Subalbum # Photo #" message.
Definition at line 70 of file loadDialog.cpp. References entries, lastMessageSubalbumPhoto, and lastSubalbum. Referenced by Subalbum::importFromDisk().
00071 {
00072 if(lastMessageSubalbumPhoto && lastSubalbum == subalbum)
00073 {
00074 entries->changeItem( QString("Subalbum %1 photo %2").arg(subalbum).arg(photo), entries->count() -1 );
00075 }
00076 else
00077 {
00078 entries->insertItem( QString("Subalbum %1 photo %2").arg(subalbum).arg(photo) );
00079 lastMessageSubalbumPhoto = true;
00080 lastSubalbum = subalbum;
00081 }
00082
00083 repaint();
00084 qApp->processEvents();
00085 }
|
|
|
Application icon.
Definition at line 50 of file loadDialog.h. Referenced by LoadDialog(). |
|
|
Listbox all entries are placed in.
Definition at line 59 of file loadDialog.h. Referenced by LoadDialog(), printMessage(), and printSubalbumPhoto(). |
|
|
Layout widgets placed in.
Definition at line 53 of file loadDialog.h. Referenced by LoadDialog(). |
|
|
Used to keep track what the last message was and if it can be altered.
Definition at line 62 of file loadDialog.h. Referenced by LoadDialog(), printMessage(), and printSubalbumPhoto(). |
|
|
Definition at line 63 of file loadDialog.h. Referenced by LoadDialog(), printMessage(), and printSubalbumPhoto(). |
|
|
"Loading..." label
Definition at line 56 of file loadDialog.h. Referenced by LoadDialog(). |
1.3.1