diff options
author | deva <deva> | 2009-11-30 19:16:33 +0000 |
---|---|---|
committer | deva <deva> | 2009-11-30 19:16:33 +0000 |
commit | 373de0f137e4b7f7e8b348cabd6151573bd80a74 (patch) | |
tree | 2345fe4ed63d304574ed0e6bd43c6e381c2ac87b | |
parent | 6e715b6a7816d5db31c0078cf99d13aaf811472f (diff) |
Graphical identification of the current master file.
-rw-r--r-- | dgedit/filelist.cc | 12 | ||||
-rw-r--r-- | dgedit/icons/file.png | bin | 0 -> 173 bytes | |||
-rw-r--r-- | dgedit/icons/master.png | bin | 0 -> 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 Binary files differnew file mode 100644 index 0000000..fc8fc40 --- /dev/null +++ b/dgedit/icons/file.png diff --git a/dgedit/icons/master.png b/dgedit/icons/master.png Binary files differnew file mode 100644 index 0000000..27fe9c4 --- /dev/null +++ b/dgedit/icons/master.png |