#include <addPhotosDialog.h>
Inheritance diagram for AddPhotosDialog:
Definition at line 88 of file addPhotosDialog.h.
Public Member Functions | |
AddPhotosDialog (QString path, QWidget *parent=0, const char *name=0) | |
QStringList | getFilenames (bool &setDescriptions) |
returns the list of selected filenames, while setting setDescritions to the state the checkbox was left in. | |
Private Slots | |
void | updatePreview (const QString &filename) |
handle the user selecting items by updating the file preview fields | |
Private Attributes | |
QCheckBox * | setDescriptions |
Checkbox asking if filenames should be used to set image descriptions. | |
FilePreview * | filePreview |
Used to preview selected files. |
|
Definition at line 233 of file addPhotosDialog.cpp. References filePreview, setDescriptions, and updatePreview(). 00233 : 00234 QFileDialog(path, 00235 tr("Images") + " (*.gif *.jpg *.jpeg *.png *.xpm *.GIF *.JPG *.JPEG *.PNG *.XPM)", 00236 parent,name) 00237 { 00238 //setup filter filter and modes 00239 setMode( QFileDialog::ExistingFiles ); 00240 setViewMode( QFileDialog::List ); 00241 00242 filePreview = new FilePreview(); 00243 setContentsPreviewEnabled( true ); 00244 setContentsPreview( filePreview, filePreview ); 00245 setPreviewMode( QFileDialog::Contents ); 00246 00247 //create label and checkbox asking user if they want to 00248 //set image descriptions from filenames 00249 setDescriptions = new QCheckBox( tr("Use filenames for descriptions."), this ); 00250 setDescriptions->setChecked( false ); 00251 addWidgets( NULL, setDescriptions, NULL ); 00252 00253 //set window description 00254 setCaption( tr("Add Photos") ); 00255 00256 connect( this, SIGNAL( fileHighlighted(const QString&)), 00257 this, SLOT( updatePreview(const QString&)) ); 00258 } //==============================================
|
|
returns the list of selected filenames, while setting setDescritions to the state the checkbox was left in.
Definition at line 260 of file addPhotosDialog.cpp. References setDescriptions. Referenced by SubalbumWidget::addImageAction(). 00261 { 00262 if( exec() == QDialog::Accepted ) 00263 { 00264 setDescriptionsBool = setDescriptions->isChecked(); 00265 return selectedFiles(); 00266 } 00267 else { return QStringList(); } 00268 }
|
|
handle the user selecting items by updating the file preview fields
Definition at line 270 of file addPhotosDialog.cpp. References filePreview, and FilePreview::updatePreview(). Referenced by AddPhotosDialog(). 00271 { 00272 filePreview->updatePreview( filename ); 00273 }
|
|
Used to preview selected files.
Definition at line 104 of file addPhotosDialog.h. Referenced by AddPhotosDialog(), and updatePreview(). |
|
Checkbox asking if filenames should be used to set image descriptions.
Definition at line 101 of file addPhotosDialog.h. Referenced by AddPhotosDialog(), and getFilenames(). |