summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dgedit/filelist.cc12
-rw-r--r--dgedit/icons/file.pngbin0 -> 173 bytes
-rw-r--r--dgedit/icons/master.pngbin0 -> 325 bytes
3 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);
}
diff --git a/dgedit/icons/file.png b/dgedit/icons/file.png
new file mode 100644
index 0000000..fc8fc40
--- /dev/null
+++ b/dgedit/icons/file.png
Binary files differ
diff --git a/dgedit/icons/master.png b/dgedit/icons/master.png
new file mode 100644
index 0000000..27fe9c4
--- /dev/null
+++ b/dgedit/icons/master.png
Binary files differ