1 /* 2 * Copyright 2013-2015, Rene Gollent, rene@gollent.com. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef SIGNALS_CONFIG_VIEW_H 6 #define SIGNALS_CONFIG_VIEW_H 7 8 9 #include <GroupView.h> 10 11 #include "table/Table.h" 12 13 #include "Team.h" 14 15 #include "types/Types.h" 16 17 18 class BButton; 19 class BMenuField; 20 class UserInterfaceListener; 21 22 23 class SignalsConfigView : public BGroupView, private Team::Listener, 24 private TableListener { 25 public: 26 SignalsConfigView(::Team* team, 27 UserInterfaceListener* listener); 28 29 ~SignalsConfigView(); 30 31 static SignalsConfigView* Create(::Team* team, 32 UserInterfaceListener* listener); 33 // throws 34 35 virtual void AttachedToWindow(); 36 virtual void MessageReceived(BMessage* message); 37 38 // Team::Listener 39 40 // TableListener 41 virtual void TableSelectionChanged(Table* table); 42 43 private: 44 class SignalDispositionModel; 45 46 private: 47 void _Init(); 48 49 void _UpdateSignalConfigState(); 50 // must be called with team lock held 51 52 private: 53 ::Team* fTeam; 54 UserInterfaceListener* fListener; 55 BMenuField* fDefaultSignalDisposition; 56 Table* fDispositionExceptions; 57 BButton* fAddDispositionButton; 58 BButton* fEditDispositionButton; 59 BButton* fRemoveDispositionButton; 60 SignalDispositionModel* fDispositionModel; 61 }; 62 63 64 #endif // SIGNALS_CONFIG_VIEW_H 65