Archive / / / / / / LibraryTab.h
2008-10-21 13:37:57 UTC
previous next
/* Echo Media Player * Copyright (C) 2008 Shane O'Connell * * [ The original file includes a copyright header in this location describing * the file as being released under the terms of the GNU General Public * License. It has been removed in order to display the file as part of the * archive. ] */ #ifndef LIBRARYTAB_H_ #define LIBRARYTAB_H_ #include "../../db/Library.h" #include "PlaySourceTreeModel.h" #include <boost/shared_ptr.hpp> #include <gtkmm.h> class LibraryTab : public Gtk::ScrolledWindow { public: static boost::shared_ptr<LibraryTab> create(PlaySourceRef source); const Glib::ustring& get_tab_name() { return m_source->get_name(); } const Glib::ustring& get_tab_icon() { return m_source->get_icon(); } PlaySourceRef get_library() { return m_source; } private: LibraryTab(PlaySourceRef library); void init_treeview(); void on_row_activated(const Gtk::TreePath& path, Gtk::TreeViewColumn* column); void on_click(GdkEventButton* event); void on_open_album(bool new_tab); void on_open_artist(bool new_tab); TrackRef m_selected_track; PlaySourceRef m_source; Glib::RefPtr<PlaySourceTreeModel> m_treemodel; Gtk::TreeView m_treeview; Gtk::Menu m_popup_menu; // ------------ Signals ------------ public: sigc::signal<void> signal_refesh_tab_label() { return m_signal_refesh_tab_label; } sigc::signal<void, PlaySourceRef> signal_open_new_tab() { return m_signal_open_new_tab; } private: sigc::signal<void> m_signal_refesh_tab_label; sigc::signal<void, PlaySourceRef> m_signal_open_new_tab; }; #endif /* LIBRARYTAB_H_ */