traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso resources/keymap.xml src/core/AudioCli...


From: Remon Sijrier
Subject: [Traverso-commit] traverso resources/keymap.xml src/core/AudioCli...
Date: Thu, 24 May 2007 17:45:20 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       07/05/24 17:45:20

Modified files:
        resources      : keymap.xml 
        src/core       : AudioClip.cpp AudioClip.h AudioSource.cpp 
                         AudioSource.h Project.cpp ResourcesManager.cpp 
                         ResourcesManager.h Song.cpp 
        src/traverso/songcanvas: TrackPanelViewPort.cpp 
        src/traverso/widgets: ResourcesWidget.cpp ResourcesWidget.h 

Log message:
        * Resources Bin: sort on Sheet
        * Bug fixes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/keymap.xml?cvsroot=traverso&r1=1.68&r2=1.69
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioClip.cpp?cvsroot=traverso&r1=1.97&r2=1.98
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioClip.h?cvsroot=traverso&r1=1.49&r2=1.50
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioSource.cpp?cvsroot=traverso&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioSource.h?cvsroot=traverso&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Project.cpp?cvsroot=traverso&r1=1.45&r2=1.46
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ResourcesManager.cpp?cvsroot=traverso&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ResourcesManager.h?cvsroot=traverso&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Song.cpp?cvsroot=traverso&r1=1.107&r2=1.108
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/TrackPanelViewPort.cpp?cvsroot=traverso&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/ResourcesWidget.cpp?cvsroot=traverso&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/ResourcesWidget.h?cvsroot=traverso&r1=1.7&r2=1.8

Patches:
Index: resources/keymap.xml
===================================================================
RCS file: /sources/traverso/traverso/resources/keymap.xml,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -b -r1.68 -r1.69
--- resources/keymap.xml        15 May 2007 20:15:14 -0000      1.68
+++ resources/keymap.xml        24 May 2007 17:45:18 -0000      1.69
@@ -164,6 +164,7 @@
                        <Objects>
                                <Object objectname="FadeCurve" 
slotsignature="toggle_bypass" modes="All" instantanious="0" />
                                <Object objectname="Plugin" 
slotsignature="toggle_bypass" modes="All" instantanious="0" />
+                               <Object objectname="LV2Plugin" 
slotsignature="toggle_bypass" modes="All" instantanious="0" />
                                <Object objectname="TrackView" 
slotsignature="select_bus" modes="All" sortorder="8" instantanious="0" />
                        </Objects>
                </keyfact>

Index: src/core/AudioClip.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/AudioClip.cpp,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -b -r1.97 -r1.98
--- src/core/AudioClip.cpp      22 May 2007 20:04:10 -0000      1.97
+++ src/core/AudioClip.cpp      24 May 2007 17:45:19 -0000      1.98
@@ -66,7 +66,7 @@
        m_length = sourceStartFrame = sourceEndFrame = trackEndFrame = 0;
        isMuted=false;
        m_id = create_id();
-       m_readSourceId = 0;
+       m_readSourceId = m_songId = 0;
        init();
 }
 
@@ -83,6 +83,7 @@
        QDomElement e = node.toElement();
        m_id = e.attribute("id", "").toLongLong();
        m_readSourceId = e.attribute("source", "").toLongLong();
+       m_songId = e.attribute("sheet", "0").toLongLong();
        m_name = e.attribute( "clipname", "" ) ;
        isMuted =  e.attribute( "mute", "" ).toInt();
        m_length = e.attribute( "length", "0" ).toUInt();
@@ -133,6 +134,7 @@
        }
 
        m_readSourceId = e.attribute("source", "").toLongLong();
+       m_songId = e.attribute("sheet", "0").toLongLong();
        isMuted =  e.attribute( "mute", "" ).toInt();
 
        sourceStartFrame = e.attribute( "sourcestart", "" ).toUInt();
@@ -184,6 +186,7 @@
        node.setAttribute("clipname", m_name );
        node.setAttribute("selected", isSelected );
        node.setAttribute("id", m_id );
+       node.setAttribute("sheet", m_songId );
        node.setAttribute("locked", isLocked);
 
        node.setAttribute("source", m_readSource->get_id());
@@ -754,6 +757,8 @@
                PWARN("AudioClip::set_song() : Setting Song, but no ReadSource 
available!!");
        }
        
+       m_songId = song->get_id();
+       
        set_history_stack(m_song->get_history_stack());
        
        if (!m_gainEnvelope) {

Index: src/core/AudioClip.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/AudioClip.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- src/core/AudioClip.h        18 May 2007 11:11:56 -0000      1.49
+++ src/core/AudioClip.h        24 May 2007 17:45:19 -0000      1.50
@@ -110,6 +110,7 @@
        int get_rate() const;
        int get_bitdepth() const;
        qint64 get_readsource_id() const;
+       qint64 get_song_id() const {return m_songId;}
        ReadSource* get_readsource() const;
        
        QString get_name() const;
@@ -165,6 +166,7 @@
        float           m_normfactor;
        
        qint64          m_readSourceId;
+       qint64          m_songId;
        int             m_refcount;
 
        void init();

Index: src/core/AudioSource.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/AudioSource.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- src/core/AudioSource.cpp    17 May 2007 21:38:15 -0000      1.19
+++ src/core/AudioSource.cpp    24 May 2007 17:45:19 -0000      1.20
@@ -17,7 +17,7 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
 
-$Id: AudioSource.cpp,v 1.19 2007/05/17 21:38:15 r_sijrier Exp $
+$Id: AudioSource.cpp,v 1.20 2007/05/24 17:45:19 r_sijrier Exp $
 */
 
 
@@ -69,7 +69,7 @@
        QDomElement node = doc.createElement("Source");
        node.setAttribute("channelcount", m_channelCount);
        node.setAttribute("filecount", m_fileCount);
-       node.setAttribute("origsongid", m_origSongId);
+       node.setAttribute("origsheetid", m_origSongId);
        node.setAttribute("dir", m_dir);
        node.setAttribute("id", m_id);
        node.setAttribute("name", m_name);
@@ -87,7 +87,7 @@
        QDomElement e = node.toElement();
        m_channelCount = e.attribute("channelcount", "0").toInt();
        m_fileCount = e.attribute("filecount", "0").toInt();
-       m_origSongId = e.attribute("origsongid", "").toInt();
+       m_origSongId = e.attribute("origsheetid", "0").toLongLong();
        set_dir( e.attribute("dir", "" ));
        m_id = e.attribute("id", "").toLongLong();
        set_name( e.attribute("name", "No name supplied?" ));
@@ -97,7 +97,7 @@
        // For older project files, this should properly detect if the 
        // audio source was a recording or not., in fact this should suffice
        // and the flag wasrecording would be unneeded, but oh well....
-       if (m_origSongId != -1 && m_channelCount == 2 && m_fileCount == 2) {
+       if (m_origSongId != 0 && m_channelCount == 2 && m_fileCount == 2) {
                m_wasRecording = true;
        }
        
@@ -136,7 +136,7 @@
        m_origBitDepth = bitDepth;
 }
 
-void AudioSource::set_created_by_song( int id )
+void AudioSource::set_created_by_song(qint64 id)
 {
        m_origSongId = id;
 }

Index: src/core/AudioSource.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/AudioSource.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- src/core/AudioSource.h      15 May 2007 20:07:00 -0000      1.15
+++ src/core/AudioSource.h      24 May 2007 17:45:19 -0000      1.16
@@ -17,7 +17,7 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
 
-$Id: AudioSource.h,v 1.15 2007/05/15 20:07:00 r_sijrier Exp $
+$Id: AudioSource.h,v 1.16 2007/05/24 17:45:19 r_sijrier Exp $
 */
 
 #ifndef AUDIOSOURCE_H
@@ -44,7 +44,7 @@
        void set_name(const QString& name);
        void set_dir(const QString& name);
        void set_original_bit_depth(uint bitDepth);
-       void set_created_by_song(int id);
+       void set_created_by_song(qint64 id);
        void set_sample_rate(int rate);
        int set_state( const QDomNode& node );
        
@@ -55,6 +55,7 @@
        QString get_name() const;
        QString get_short_name() const;
        qint64 get_id() const;
+       qint64 get_orig_song_id() const {return m_origSongId;}
        int get_rate() const;
        uint get_channel_count() const;
        int get_bit_depth() const;
@@ -62,7 +63,7 @@
 protected:
        uint            m_channelCount;
        uint            m_fileCount;
-       int             m_origSongId;
+       qint64          m_origSongId;
        QString         m_dir;
        qint64          m_id;
        QString         m_name;

Index: src/core/Project.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Project.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- src/core/Project.cpp        17 May 2007 21:38:15 -0000      1.45
+++ src/core/Project.cpp        24 May 2007 17:45:19 -0000      1.46
@@ -43,7 +43,7 @@
 #include "Utils.h"
 #include <AddRemove.h>
 
-#define PROJECT_FILE_VERSION   1
+#define PROJECT_FILE_VERSION   2
 
 // Always put me below _all_ includes, this is needed
 // in case we run with memory leak detection enabled!
@@ -219,7 +219,7 @@
        m_resourcesManager->set_state(asmNode);
 
 
-       QDomNode songsNode = docElem.firstChildElement("Songs");
+       QDomNode songsNode = docElem.firstChildElement("Sheets");
        QDomNode songNode = songsNode.firstChild();
 
        // Load all the Songs
@@ -230,7 +230,7 @@
                songNode = songNode.nextSibling();
        }
 
-       qint64 id = e.attribute("currentSongId", "0" ).toLongLong();
+       qint64 id = e.attribute("currentsheetid", "0" ).toLongLong();
        
        if ( id == 0) {
                if (m_songs.size()) {
@@ -291,7 +291,7 @@
        properties.setAttribute("arranger", m_arranger);
        properties.setAttribute("songwriter", m_songwriter);
        properties.setAttribute("message", m_message);
-       properties.setAttribute("currentSongId", m_currentSongId);
+       properties.setAttribute("currentsheetid", m_currentSongId);
        properties.setAttribute("rate", m_rate);
        properties.setAttribute("bitdepth", m_bitDepth);
        properties.setAttribute("projectfileversion", PROJECT_FILE_VERSION);
@@ -313,7 +313,7 @@
        }
 
        // Get all the Songs
-       QDomNode songsNode = doc.createElement("Songs");
+       QDomNode songsNode = doc.createElement("Sheets");
 
        foreach(Song* song, m_songs) {
                songsNode.appendChild(song->get_state(doc, istemplate));

Index: src/core/ResourcesManager.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/ResourcesManager.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- src/core/ResourcesManager.cpp       17 May 2007 23:29:39 -0000      1.16
+++ src/core/ResourcesManager.cpp       24 May 2007 17:45:19 -0000      1.17
@@ -175,7 +175,7 @@
        const QString& dir,
        const QString& name,
        int channelCount,
-       int songId)
+       qint64 songId)
 {
        PENTER;
        
@@ -357,8 +357,9 @@
        SourceData* sourcedata = m_sources.value(clip->get_readsource_id());
        if (!sourcedata) {
                PERROR("Source %lld not in database", 
clip->get_readsource_id());
-       }
+       } else {
        sourcedata->clipCount++;
+       }
        
        emit clipAdded(clip);
 }

Index: src/core/ResourcesManager.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/ResourcesManager.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- src/core/ResourcesManager.h 17 May 2007 21:38:15 -0000      1.9
+++ src/core/ResourcesManager.h 24 May 2007 17:45:19 -0000      1.10
@@ -48,7 +48,7 @@
        ReadSource* create_recording_source(const QString& dir,
                                const QString& name,
                                int channelCount,
-                               int songId);
+                               qint64 songId);
        
        ReadSource* import_source(const QString& dir, const QString& name);
        ReadSource* get_silent_readsource();

Index: src/core/Song.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Song.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -b -r1.107 -r1.108
--- src/core/Song.cpp   24 May 2007 13:45:50 -0000      1.107
+++ src/core/Song.cpp   24 May 2007 17:45:19 -0000      1.108
@@ -216,7 +216,7 @@
 
 QDomNode Song::get_state(QDomDocument doc, bool istemplate)
 {
-       QDomElement songNode = doc.createElement("Song");
+       QDomElement songNode = doc.createElement("Sheet");
        
        if (! istemplate) {
                songNode.setAttribute("id", m_id);

Index: src/traverso/songcanvas/TrackPanelViewPort.cpp
===================================================================
RCS file: 
/sources/traverso/traverso/src/traverso/songcanvas/TrackPanelViewPort.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- src/traverso/songcanvas/TrackPanelViewPort.cpp      22 Mar 2007 18:39:13 
-0000      1.8
+++ src/traverso/songcanvas/TrackPanelViewPort.cpp      24 May 2007 17:45:20 
-0000      1.9
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
  
-    $Id: TrackPanelViewPort.cpp,v 1.8 2007/03/22 18:39:13 r_sijrier Exp $
+    $Id: TrackPanelViewPort.cpp,v 1.9 2007/05/24 17:45:20 r_sijrier Exp $
 */
 
 #include "TrackPanelViewPort.h"
@@ -49,7 +49,6 @@
 
 void TrackPanelViewPort::get_pointed_context_items(QList<ContextItem* > &list)
 {
-       printf("TrackPanelViewPort::get_pointed_view_items\n");
        QList<QGraphicsItem *> itemlist = 
items(cpointer().on_first_input_event_x(), cpointer().on_first_input_event_y());
        foreach(QGraphicsItem* item, itemlist) {
                list.append((ViewItem*)item);

Index: src/traverso/widgets/ResourcesWidget.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/widgets/ResourcesWidget.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- src/traverso/widgets/ResourcesWidget.cpp    21 May 2007 08:49:46 -0000      
1.21
+++ src/traverso/widgets/ResourcesWidget.cpp    24 May 2007 17:45:20 -0000      
1.22
@@ -186,6 +186,7 @@
        
        connect(viewComboBox, SIGNAL(currentIndexChanged(int)), this, 
SLOT(view_combo_box_index_changed(int)));
        connect(songComboBox, SIGNAL(currentIndexChanged(int)), this, 
SLOT(song_combo_box_index_changed(int)));
+       connect(songComboBox, SIGNAL(activated(int)), this, 
SLOT(song_combo_box_index_changed(int)));
        connect(&pm(), SIGNAL(projectLoaded(Project*)), this, 
SLOT(set_project(Project*)));
 }
 
@@ -204,10 +205,13 @@
        
        if (!m_project) {
                songComboBox->setEnabled(false);
+               m_currentSong = 0;
                return;
        }
        
        songComboBox->setEnabled(true);
+       m_currentSong = m_project->get_current_song();
+       
        ResourcesManager* rsmanager = m_project->get_audiosource_manager();
        
        connect(rsmanager, SIGNAL(stateRestored()), this, 
SLOT(populate_tree()));
@@ -217,6 +221,7 @@
        connect(rsmanager, SIGNAL(sourceRemoved(ReadSource*)), this, 
SLOT(remove_source(ReadSource*)));
        connect(m_project, SIGNAL(songAdded(Song*)), this, 
SLOT(song_added(Song*)));
        connect(m_project, SIGNAL(songRemoved(Song*)), this, 
SLOT(song_removed(Song*)));
+       connect(m_project, SIGNAL(currentSongChanged(Song*)), this, 
SLOT(set_current_song(Song*)));
 }
 
 void ResourcesWidget::populate_tree()
@@ -250,11 +255,14 @@
 
 void ResourcesWidget::song_combo_box_index_changed(int index)
 {
+       qint64 id = songComboBox->itemData(index).toLongLong();
+       Song* song = m_project->get_song(id);
+       set_current_song(song);
 }
 
 void ResourcesWidget::song_added(Song * song)
 {
-       songComboBox->addItem("Song " + 
QString::number(m_project->get_song_index(song->get_id())), song->get_id());
+       songComboBox->addItem("Sheet " + 
QString::number(m_project->get_song_index(song->get_id())), song->get_id());
 }
 
 void ResourcesWidget::song_removed(Song * song)
@@ -263,12 +271,44 @@
        songComboBox->removeItem(index);
 }
 
+void ResourcesWidget::set_current_song(Song * song)
+{
+       if (song) {
+               int index = songComboBox->findData(song->get_id());
+               if (index != -1) {
+                       songComboBox->setCurrentIndex(index);
+               }
+       }
+       
+       m_currentSong = song;
+       
+       filter_on_current_song();
+}
+
+
+void ResourcesWidget::filter_on_current_song()
+{
+       if (!m_currentSong) {
+               return;
+       }
+       
+       foreach(ClipTreeItem* item, m_clipindices.values()) {
+               item->apply_filter(m_currentSong);
+       }
+
+       
+       foreach(SourceTreeItem* item, m_sourceindices.values()) {
+               item->apply_filter(m_currentSong);
+       }
+}
+
+
 void ResourcesWidget::add_clip(AudioClip * clip)
 {
-       QTreeWidgetItem* item = m_clipindices.value(clip->get_id());
+       ClipTreeItem* item = m_clipindices.value(clip->get_id());
        
        if (!item) {
-               QTreeWidgetItem* sourceitem = 
m_sourceindices.value(clip->get_readsource_id());
+               SourceTreeItem* sourceitem = 
m_sourceindices.value(clip->get_readsource_id());
        
                if (! sourceitem ) return;
        
@@ -283,7 +323,7 @@
 
 void ResourcesWidget::remove_clip(AudioClip * clip)
 {
-       QTreeWidgetItem* item = m_clipindices.value(clip->get_id());
+       ClipTreeItem* item = m_clipindices.value(clip->get_id());
        
        if (!item) {
                 return;
@@ -294,10 +334,10 @@
 
 void ResourcesWidget::add_source(ReadSource * source)
 {
-       QTreeWidgetItem* item = m_sourceindices.value(source->get_id());
+       SourceTreeItem* item = m_sourceindices.value(source->get_id());
        
        if (! item) {
-               QTreeWidgetItem* item = new QTreeWidgetItem(sourcesTreeWidget);
+               SourceTreeItem* item = new SourceTreeItem(sourcesTreeWidget, 
source);
                m_sourceindices.insert(source->get_id(), item);
                QString duration = frame_to_ms(source->get_nframes(), 44100);
                item->setText(0, source->get_short_name());
@@ -327,7 +367,7 @@
 
 void ResourcesWidget::update_source_state(qint64 id)
 {
-       QTreeWidgetItem* item = m_sourceindices.value(id);
+       SourceTreeItem* item = m_sourceindices.value(id);
        Q_ASSERT(item);
        
        if (resources_manager()->is_source_in_use(id)) {
@@ -341,7 +381,7 @@
        }
 }
 
-ClipTreeItem::ClipTreeItem(QTreeWidgetItem * parent, AudioClip * clip)
+ClipTreeItem::ClipTreeItem(SourceTreeItem * parent, AudioClip * clip)
        : QTreeWidgetItem(parent)
        , m_clip(clip)
 {
@@ -370,3 +410,43 @@
        setToolTip(0, m_clip->get_name() + "   " + start + " - " + end);
 }
 
+void ClipTreeItem::apply_filter(Song * song)
+{
+       if (m_clip->get_song_id() == song->get_id()) {
+               setHidden(false);
+       } else {
+               setHidden(true);
+       } 
+}
+
+
+
+SourceTreeItem::SourceTreeItem(QTreeWidget* parent, ReadSource * source)
+       : QTreeWidgetItem(parent)
+       , m_source(source)
+{
+}
+
+void SourceTreeItem::apply_filter(Song * song)
+{
+       if (m_source->get_orig_song_id() == song->get_id()) {
+               setHidden(false);
+               return;
+       }
+       
+       bool show = false;
+               
+       for (int i=0; i < childCount(); ++i) {
+               if (!child(i)->isHidden()) {
+                       show = true;
+                       break;
+               }
+       }
+               
+       if (show) {
+               setHidden(false);
+       } else {
+               setHidden(true);
+       }
+}
+

Index: src/traverso/widgets/ResourcesWidget.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/widgets/ResourcesWidget.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- src/traverso/widgets/ResourcesWidget.h      18 May 2007 11:11:56 -0000      
1.7
+++ src/traverso/widgets/ResourcesWidget.h      24 May 2007 17:45:20 -0000      
1.8
@@ -23,6 +23,7 @@
 #define RESOURCESWIDGET_H
 
 #include <QWidget>
+#include <QTreeWidgetItem>
 #include "ui_ResourcesWidget.h"
 
 class Project;
@@ -30,14 +31,16 @@
 class FileWidget;
 class AudioClip;
 class ReadSource;
-class QTreeWidgetItem;
+class SourceTreeItem;
 
 class ClipTreeItem : public QObject, public QTreeWidgetItem
 {
        Q_OBJECT
        
 public:
-       ClipTreeItem(QTreeWidgetItem* parent, AudioClip* clip);
+       ClipTreeItem(SourceTreeItem* parent, AudioClip* clip);
+       
+       void apply_filter(Song* song);
 
 
 public slots:
@@ -47,6 +50,18 @@
        AudioClip* m_clip;
 };
 
+class SourceTreeItem : public QObject, public QTreeWidgetItem
+{
+       Q_OBJECT
+       
+public:
+       SourceTreeItem(QTreeWidget* parent, ReadSource* source);
+
+       void apply_filter(Song* song);
+
+private:
+       ReadSource* m_source;
+};
 
 class ResourcesWidget : public QWidget, protected Ui::ResourcesWidget
 {
@@ -56,17 +71,18 @@
        ResourcesWidget(QWidget* parent=0);
        ~ResourcesWidget();
 
-       
-       
 private:
        Project* m_project;
+       Song* m_currentSong;
        FileWidget* m_filewidget;
        QHash<qint64, ClipTreeItem*> m_clipindices;
-       QHash<qint64, QTreeWidgetItem*> m_sourceindices;
+       QHash<qint64, SourceTreeItem*> m_sourceindices;
        
        void update_clip_state(AudioClip* clip);
        void update_source_state(qint64 id);
        
+       void filter_on_current_song();
+       
 private slots:
        void set_project(Project* project);
        void populate_tree();
@@ -76,6 +92,7 @@
        
        void song_added(Song* song);
        void song_removed(Song* song);
+       void set_current_song(Song* song);
        
        void add_clip(AudioClip* clip);
        void remove_clip(AudioClip* clip);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]