summaryrefslogtreecommitdiff
path: root/dgedit/filelist.cc
diff options
context:
space:
mode:
authordeva <deva>2009-11-30 19:16:33 +0000
committerdeva <deva>2009-11-30 19:16:33 +0000
commit373de0f137e4b7f7e8b348cabd6151573bd80a74 (patch)
tree2345fe4ed63d304574ed0e6bd43c6e381c2ac87b /dgedit/filelist.cc
parent6e715b6a7816d5db31c0078cf99d13aaf811472f (diff)
Graphical identification of the current master file.
Diffstat (limited to 'dgedit/filelist.cc')
-rw-r--r--dgedit/filelist.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/dgedit/filelist.cc b/dgedit/filelist.cc
index aca1f5d..5326eef 100644
--- a/dgedit/filelist.cc
+++ b/dgedit/filelist.cc
@@ -38,7 +38,7 @@ FileList::FileList()
void FileList::addFiles()
{
QStringList files = QFileDialog::getOpenFileNames(this, tr("Open file"),
- "", tr("Audio Files (*.wav)"));
+ "", tr("Audio Files (*.wav)"));
QStringList::Iterator i = files.begin();
while(i != files.end()) {
QString file = *i;
@@ -48,6 +48,7 @@ void FileList::addFiles()
QListWidgetItem *item = new QListWidgetItem();
item->setText(file);
item->setData(Qt::UserRole, name);
+ item->setIcon(QPixmap("icons/file.png"));
addItem(item);
emit fileAdded(file, name);
@@ -56,8 +57,13 @@ void FileList::addFiles()
}
}
-void FileList::selectionChanged(QListWidgetItem *item)
+void FileList::selectionChanged(QListWidgetItem *i)
{
- QString filename = item->text();
+ QString filename = i->text();
+
+ for(int idx = 0; idx < count(); idx++)
+ item(idx)->setIcon(QPixmap("icons/file.png"));
+
+ i->setIcon(QPixmap("icons/master.png"));
emit masterFileChanged(filename);
}