diff options
Diffstat (limited to 'src/devicewidget.h')
-rw-r--r-- | src/devicewidget.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/devicewidget.h b/src/devicewidget.h index e4ba4af..3170f04 100644 --- a/src/devicewidget.h +++ b/src/devicewidget.h @@ -25,16 +25,21 @@ #include "minimalstreamwidget.h" +class MainWindow; class ChannelWidget; class DeviceWidget : public MinimalStreamWidget { public: DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); + void init(MainWindow* mainWindow, Glib::ustring); void setChannelMap(const pa_channel_map &m, bool can_decibel); void setVolume(const pa_cvolume &volume, bool force = false); virtual void updateChannelVolume(int channel, pa_volume_t v); + Glib::ustring name; + Glib::ustring description; + Gtk::ToggleButton *lockToggleButton, *muteToggleButton, *defaultToggleButton; pa_channel_map channelMap; @@ -45,6 +50,7 @@ public: virtual void onMuteToggleButton(); virtual void onDefaultToggleButton(); virtual void setDefault(bool isDefault); + virtual bool onContextTriggerEvent(GdkEventButton*); sigc::connection timeoutConnection; @@ -59,9 +65,17 @@ public: void prepareMenu(); + void renamePopup(); + protected: + MainWindow *mpMainWindow; + virtual void onPortChange() = 0; + Gtk::Menu contextMenu; + Gtk::MenuItem rename; + + /* Tree model columns */ class ModelColumns : public Gtk::TreeModel::ColumnRecord { @@ -79,6 +93,10 @@ protected: Gtk::HBox *portSelect; Gtk::ComboBox *portList; Glib::RefPtr<Gtk::ListStore> treeModel; + +private: + Glib::ustring mDeviceType; + }; #endif |