Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

AddPhotosDialog Class Reference

#include <addPhotosDialog.h>

Inheritance diagram for AddPhotosDialog:

[legend]
Collaboration diagram for AddPhotosDialog:
[legend]
List of all members.

Detailed Description

Simple dialog for browsing and select photos to add to a subalbum.

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.

FilePreviewfilePreview
 Used to preview selected files.


Constructor & Destructor Documentation

AddPhotosDialog::AddPhotosDialog QString  path,
QWidget parent = 0,
const char *  name = 0
 

Definition at line 238 of file addPhotosDialog.cpp.

References AddPhotosDialog(), filePreview, setDescriptions, and updatePreview().

Referenced by AddPhotosDialog().

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 } //==============================================


Member Function Documentation

QStringList AddPhotosDialog::getFilenames bool &  setDescriptions  ) 
 

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 getFilenames(), and setDescriptions.

Referenced by SubalbumWidget::addImageAction(), and getFilenames().

00266 { 00267 if( exec() == QDialog::Accepted ) 00268 { 00269 setDescriptionsBool = setDescriptions->isChecked(); 00270 return selectedFiles(); 00271 } 00272 else { return QStringList(); } 00273 }

void AddPhotosDialog::updatePreview const QString &  filename  )  [private, slot]
 

handle the user selecting items by updating the file preview fields

Definition at line 275 of file addPhotosDialog.cpp.

References filePreview, FilePreview::updatePreview(), and updatePreview().

Referenced by AddPhotosDialog(), and updatePreview().

00276 { 00277 filePreview->updatePreview( filename ); 00278 }


Member Data Documentation

FilePreview* AddPhotosDialog::filePreview [private]
 

Used to preview selected files.

Definition at line 104 of file addPhotosDialog.h.

Referenced by AddPhotosDialog(), and updatePreview().

QCheckBox* AddPhotosDialog::setDescriptions [private]
 

Checkbox asking if filenames should be used to set image descriptions.

Definition at line 101 of file addPhotosDialog.h.

Referenced by AddPhotosDialog(), and getFilenames().


The documentation for this class was generated from the following files:
Generated on Sun Mar 4 19:43:04 2007 for AlbumShaper by doxygen 1.3.7