summaryrefslogtreecommitdiff
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
parent6e715b6a7816d5db31c0078cf99d13aaf811472f (diff)
Graphical identification of the current master file.
-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