be added to file path database (default null/void).
{*/
qDebug() << "Creating table filepath";
query.exec("drop table if exists filepath");
+ // TODO: add last scanned column
ret = query.exec("create table if not exists filepath "
"(id integer primary key, "
"name text, "
private:
virtual QSqlTableModel* getData();
+ // TODO: add last scanned column
enum { FilePath_Id = 0,
FilePath_Name = 1,
FilePath_FileTypeId = 3,
void MediaImagePathDialog::browseFilePath()
{
-
+ qDebug() << "Browse file path";
+ QString fpath = QFileDialog::getExistingDirectory(this, tr("Select a directory"), ".",
+ QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
+ QDir d(fpath);
+ if (d.exists() && d.isReadable())
+ {
+ filePathLabel->setText(d.path());
+ }
+ qDebug() << fpath << " selected.";
}
void MediaImagePathDialog::initWidgets()