#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 238 of file addPhotosDialog.cpp. References filePreview, setDescriptions, and updatePreview(). 00238 : 00239 QFileDialog(path, 00240 tr("Images") + " (*.gif *.jpg *.jpeg *.png *.xpm *.GIF *.JPG *.JPEG *.PNG *.XPM)", 00241 parent,name) 00242 { 00243 //setup filter filter and modes 00244 setMode( QFileDialog::ExistingFiles ); 00245 setViewMode( QFileDialog::List ); 00246 00247 filePreview = new FilePreview(); 00248 setContentsPreviewEnabled( true ); 00249 setContentsPreview( filePreview, filePreview ); 00250 setPreviewMode( QFileDialog::Contents ); 00251 00252 //create label and checkbox asking user if they want to 00253 //set image descriptions from filenames 00254 setDescriptions = new QCheckBox( tr("Use filenames for descriptions."), this ); 00255 setDescriptions->setChecked( false ); 00256 addWidgets( NULL, setDescriptions, NULL ); 00257 00258 //set window description 00259 setCaption( tr("Add Photos") ); 00260 00261 connect( this, SIGNAL( fileHighlighted(const QString&)), 00262 this, SLOT( updatePreview(const QString&)) ); 00263 } //==============================================
|
|
returns the list of selected filenames, while setting setDescritions to the state the checkbox was left in.
Definition at line 265 of file addPhotosDialog.cpp. References setDescriptions. Referenced by SubalbumWidget::addImageAction(). 00266 { 00267 if( exec() == QDialog::Accepted ) 00268 { 00269 setDescriptionsBool = setDescriptions->isChecked(); 00270 return selectedFiles(); 00271 } 00272 else { return QStringList(); } 00273 }
|
|
handle the user selecting items by updating the file preview fields
Definition at line 275 of file addPhotosDialog.cpp. References filePreview, and FilePreview::updatePreview(). Referenced by AddPhotosDialog(). 00276 { 00277 filePreview->updatePreview( filename ); 00278 }
|
|
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(). |