Changeset 438
- Timestamp:
- 09/06/08 15:14:12 (5 years ago)
- Location:
- trunk/gui/src/SoundLibrary
- Files:
-
- 2 modified
-
SoundLibraryPanel.cpp (modified) (3 diffs)
-
SoundLibraryPanel.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/src/SoundLibrary/SoundLibraryPanel.cpp
r422 r438 41 41 #include "../InstrumentRack.h" 42 42 43 #include <hydrogen/LocalFileMng.h> 43 #include <hydrogen/adsr.h> 44 #include <hydrogen/audio_engine.h> 44 45 #include <hydrogen/data_path.h> 45 #include <hydrogen/sample.h> 46 #include <hydrogen/adsr.h> 46 #include <hydrogen/h2_exception.h> 47 47 #include <hydrogen/hydrogen.h> 48 48 #include <hydrogen/instrument.h> 49 #include <hydrogen/h2_exception.h> 50 #include <hydrogen/audio_engine.h> 49 #include <hydrogen/LocalFileMng.h> 51 50 #include <hydrogen/Preferences.h> 52 51 #include <hydrogen/Pattern.h> 52 #include <hydrogen/sample.h> 53 #include <hydrogen/Song.h> 54 #include <hydrogen/SoundLibrary.h> 55 53 56 using namespace H2Core; 54 57 … … 58 61 : QWidget( pParent ) 59 62 , Object( "SoundLibraryPanel" ) 63 , m_pSoundLibraryTree( NULL ) 64 , m_pDrumkitMenu( NULL ) 65 , m_pInstrumentMenu( NULL ) 66 , m_pSongMenu( NULL ) 67 , m_pPatternMenu( NULL ) 68 , m_pPatternMenuList( NULL ) 69 , m_pSystemDrumkitsItem( NULL ) 70 , m_pUserDrumkitsItem( NULL ) 71 , m_pSongItem( NULL ) 72 , m_pPatternItem( NULL ) 73 , m_pPatternItemList( NULL ) 60 74 { 61 75 //INFOLOG( "INIT" ); 62 63 76 m_pDrumkitMenu = new QMenu( this ); 64 77 m_pDrumkitMenu->addAction( trUtf8( "Load" ), this, SLOT( on_drumkitLoadAction() ) ); … … 746 759 void SoundLibraryPanel::test_expandedItems() 747 760 { 761 assert( m_pSoundLibraryTree ); 748 762 expandsongslist = m_pSoundLibraryTree->isItemExpanded( m_pSongItem ); 749 763 expandpatternlist = m_pSoundLibraryTree->isItemExpanded( m_pPatternItem ); -
trunk/gui/src/SoundLibrary/SoundLibraryPanel.h
r422 r438 30 30 #include <vector> 31 31 32 #include <hydrogen/Song.h>33 32 #include <hydrogen/Object.h> 34 #include <hydrogen/SoundLibrary.h> 33 34 namespace H2Core 35 { 36 class Song; 37 class Drumkit; 38 class SoundLibrary; 39 } 35 40 36 41 class SoundLibraryTree; … … 39 44 class SoundLibraryPanel : public QWidget, private Object 40 45 { 41 Q_OBJECT42 public:43 SoundLibraryPanel( QWidget *pParent );44 ~SoundLibraryPanel();46 Q_OBJECT 47 public: 48 SoundLibraryPanel( QWidget *pParent ); 49 ~SoundLibraryPanel(); 45 50 46 void updateDrumkitList();47 void test_expandedItems();51 void updateDrumkitList(); 52 void test_expandedItems(); 48 53 49 private slots:50 void on_DrumkitList_ItemChanged( QTreeWidgetItem * current, QTreeWidgetItem * previous );51 void on_DrumkitList_itemActivated( QTreeWidgetItem * item, int column );52 void on_DrumkitList_leftClicked( QPoint pos );53 void on_DrumkitList_rightClicked( QPoint pos );54 void on_DrumkitList_mouseMove( QMouseEvent *event );54 private slots: 55 void on_DrumkitList_ItemChanged( QTreeWidgetItem * current, QTreeWidgetItem * previous ); 56 void on_DrumkitList_itemActivated( QTreeWidgetItem * item, int column ); 57 void on_DrumkitList_leftClicked( QPoint pos ); 58 void on_DrumkitList_rightClicked( QPoint pos ); 59 void on_DrumkitList_mouseMove( QMouseEvent *event ); 55 60 56 void on_drumkitLoadAction();57 void on_drumkitDeleteAction();58 void on_drumkitPropertiesAction();59 void on_drumkitExportAction();60 void on_instrumentDeleteAction();61 void on_songLoadAction();62 void on_patternLoadAction();63 void on_patternDeleteAction();61 void on_drumkitLoadAction(); 62 void on_drumkitDeleteAction(); 63 void on_drumkitPropertiesAction(); 64 void on_drumkitExportAction(); 65 void on_instrumentDeleteAction(); 66 void on_songLoadAction(); 67 void on_patternLoadAction(); 68 void on_patternDeleteAction(); 64 69 65 private:66 SoundLibraryTree *m_pSoundLibraryTree;67 //FileBrowser *m_pFileBrowser;70 private: 71 SoundLibraryTree *m_pSoundLibraryTree; 72 //FileBrowser *m_pFileBrowser; 68 73 69 QPoint m_startDragPosition;70 QMenu* m_pDrumkitMenu;71 QMenu* m_pInstrumentMenu;72 QMenu* m_pSongMenu;73 QMenu* m_pPatternMenu;74 QMenu* m_pPatternMenuList;74 QPoint m_startDragPosition; 75 QMenu* m_pDrumkitMenu; 76 QMenu* m_pInstrumentMenu; 77 QMenu* m_pSongMenu; 78 QMenu* m_pPatternMenu; 79 QMenu* m_pPatternMenuList; 75 80 76 QTreeWidgetItem* m_pSystemDrumkitsItem;77 QTreeWidgetItem* m_pUserDrumkitsItem;78 QTreeWidgetItem* m_pSongItem;79 QTreeWidgetItem* m_pPatternItem;80 QTreeWidgetItem* m_pPatternItemList;81 QTreeWidgetItem* m_pSystemDrumkitsItem; 82 QTreeWidgetItem* m_pUserDrumkitsItem; 83 QTreeWidgetItem* m_pSongItem; 84 QTreeWidgetItem* m_pPatternItem; 85 QTreeWidgetItem* m_pPatternItemList; 81 86 82 std::vector<H2Core::Drumkit*> m_systemDrumkitInfoList; 83 std::vector<H2Core::Drumkit*> m_userDrumkitInfoList; 84 bool expandpatternlist; 85 bool expandsongslist; 86 87 88 87 std::vector<H2Core::Drumkit*> m_systemDrumkitInfoList; 88 std::vector<H2Core::Drumkit*> m_userDrumkitInfoList; 89 bool expandpatternlist; 90 bool expandsongslist; 89 91 }; 90 92