|
AlbumShaper
1.0a3
|
Simple dialog for browsing and select photos to add to a subalbum. More...
#include <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. | |
Simple dialog for browsing and select photos to add to a subalbum.
Definition at line 88 of file addPhotosDialog.h.
| AddPhotosDialog::AddPhotosDialog | ( | QString | path, |
| QWidget * | parent = 0, |
||
| const char * | name = 0 |
||
| ) |
Definition at line 238 of file addPhotosDialog.cpp.
References filePreview, setDescriptions, and updatePreview().
:
QFileDialog(path,
tr("Images") + " (*.gif *.jpg *.jpeg *.png *.xpm *.GIF *.JPG *.JPEG *.PNG *.XPM)",
parent,name)
{
//setup filter filter and modes
setMode( QFileDialog::ExistingFiles );
setViewMode( QFileDialog::List );
filePreview = new FilePreview();
setContentsPreviewEnabled( true );
setContentsPreview( filePreview, filePreview );
setPreviewMode( QFileDialog::Contents );
//create label and checkbox asking user if they want to
//set image descriptions from filenames
setDescriptions = new QCheckBox( tr("Use filenames for descriptions."), this );
setDescriptions->setChecked( false );
addWidgets( NULL, setDescriptions, NULL );
//set window description
setCaption( tr("Add Photos") );
connect( this, SIGNAL( fileHighlighted(const QString&)),
this, SLOT( updatePreview(const QString&)) );
}
| 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 setDescriptions.
Referenced by SubalbumWidget::addImageAction().
{
if( exec() == QDialog::Accepted )
{
setDescriptionsBool = setDescriptions->isChecked();
return selectedFiles();
}
else { return QStringList(); }
}
| 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, and FilePreview::updatePreview().
Referenced by AddPhotosDialog().
{
filePreview->updatePreview( filename );
}
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().
1.7.5.1