QGuiRadioSelector.hh
Go to the documentation of this file.00001
00002 #ifndef _Q_GUI_RADIO_SELECTOR_HH_
00003 #define _Q_GUI_RADIO_SELECTOR_HH_
00004
00005 #include "QGuiCompositeFrame.hh"
00006
00007 #include <vector>
00008 #include <string>
00009
00010 class TGRadioButton;
00011
00024 class QGuiRadioSelector: public QGuiCompositeFrame
00025 {
00026 public:
00027
00032 QGuiRadioSelector(const TGWindow* parent);
00033
00035 virtual ~QGuiRadioSelector();
00036
00044 void SetEntries(const std::vector<std::string>& entries);
00045
00050 Bool_t SetPictures(const std::vector<TGPicture*>& pictures);
00051
00057 Bool_t SetSelected(size_t id);
00058
00063 size_t GetSelected() const { return fSelected; }
00064
00066 void ValueChanged();
00067
00068 void Lock(Bool_t doLock);
00069
00070 private:
00071
00072 std::vector<std::string> fEntries;
00073 std::vector<TGPicture*> fPictures;
00074
00075 std::vector<TGRadioButton*> fButtons;
00076
00077 size_t fSelected;
00078
00079
00080 void Display();
00081 void UpdateSelected();
00082
00083 ClassDef(QGuiRadioSelector,0);
00084 };
00085 #endif