|
|
Go to the documentation of this file.
16 #include <sigc++/sigc++.h>
26 #include "TGNumberEntry.h"
27 #include "TGTextEntry.h"
28 #include "TGTextView.h"
31 #include "TEveManager.h"
34 #include "TGComboBox.h"
35 #include "TVirtualX.h"
65 : TGTransientFrame(gClient->GetDefaultRoot(),
p,
w,
h),
68 m_colorManager(colorMgr),
69 m_settersFrame(nullptr) {
71 SetCleanup(kDeepCleanup);
75 TGVerticalFrame* vf =
new TGVerticalFrame(
this);
76 AddFrame(vf,
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0));
157 m_filterError->SetForegroundColor(gVirtualX->GetPixel(kRed));
158 m_filterError->SetBackgroundColor(TGFrame::GetDefaultFrameBackground());
161 m_selectError->SetForegroundColor(gVirtualX->GetPixel(kRed));
162 m_selectError->SetBackgroundColor(TGFrame::GetDefaultFrameBackground());
168 m_colorSelectWidget->Connect(
"ColorChosen(Color_t)",
"CmsShowEDI",
this,
"changeItemColor(Color_t)");
169 m_cw->Connect(
"ColorChosen(Color_t)",
"CmsShowEDI",
this,
"changeSelectionColor(Color_t)");
170 m_opacitySlider->Connect(
"PositionChanged(Int_t)",
"CmsShowEDI",
this,
"changeItemOpacity(Int_t)");
171 m_isVisibleButton->Connect(
"Toggled(Bool_t)",
"CmsShowEDI",
this,
"toggleItemVisible(Bool_t)");
173 m_filterButton->Connect(
"Clicked()",
"CmsShowEDI",
this,
"runFilter()");
175 m_selectButton->Connect(
"Clicked()",
"CmsShowEDI",
this,
"runSelection()");
176 m_removeButton->Connect(
"Clicked()",
"CmsShowEDI",
this,
"removeItem()");
179 m_frontButton->Connect(
"Clicked()",
"CmsShowEDI",
this,
"moveToFront()");
180 m_backButton->Connect(
"Clicked()",
"CmsShowEDI",
this,
"moveToBack()");
181 m_layerEntry->Connect(
"ValueSet(Long_t)",
"CmsShowEDI",
this,
"moveToLayer(Long_t)");
183 TGCompositeFrame* cf =
m_tabs->GetTabContainer(0);
186 cf->AddFrame(
m_settersFrame,
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
188 SetWindowName(
"Collection Controller");
190 Resize(GetDefaultSize());
203 m_colorSelectWidget->Disconnect(
"ColorSelected(Pixel_t)",
this,
"changeItemColor(Pixel_t)");
204 m_cw->Disconnect(
"ColorSelected(Pixel_t)",
this,
"changeSelectionColor(Pixel_t)");
205 m_opacitySlider->Disconnect(
"PositionChanged(Int_t)",
this,
"changeItemColor");
206 m_isVisibleButton->Disconnect(
"Toggled(Bool_t)",
this,
"toggleItemVisible(Bool_t)");
214 m_frontButton->Disconnect(
"Clicked()",
this,
"moveToFront()");
215 m_backButton->Disconnect(
"Clicked()",
this,
"moveToBack()");
216 m_layerEntry->Disconnect(
"ValueSet(Long_t)",
this,
"moveToLayer(Long_t)");
242 TGFrameElement* el = (TGFrameElement*)
m_settersFrame->GetList()->First();
243 TGFrame*
f = el->fFrame;
252 bool multipleCollections =
false;
257 multipleCollections =
true;
290 m_cw->SetEnabled(kTRUE);
302 }
else if (multipleCollections) {
303 std::ostringstream
s;
308 Resize(GetDefaultSize());
315 std::string message(
"This action will remove the ");
318 " collection from the display."
319 "\nIf you wish to return the collection you would have to use the 'Add Collection' window.";
320 new TGMsgBox(gClient->GetDefaultRoot(),
322 "Remove Collection Confirmation",
325 kMBCancel | kMBApply,
327 if (kMBApply == chosen) {
331 gEve->EditElement(
nullptr);
446 if (
e.column() > -1) {
462 item->selectionManager()->clearModelSelectionLeaveItem();
468 if (
e.column() > -1) {
477 for (
int i = 0; i < static_cast<int>(
m_item->
size());
i++) {
483 for (
int i = 0; i < static_cast<int>(
m_item->
size());
i++) {
493 for (std::set<FWModelId>::const_iterator
i =
ss.begin();
i !=
ss.end(); ++
i) {
void SetColorByIndex(Color_t iColor)
FWDialogBuilder & endTab(void)
void setValidator(FWValidatorBase *)
void updateLayerControls()
FWDialogBuilder & addHSeparator(size_t horizontalPadding=4, size_t verticalPadding=3)
const std::string & productInstanceLabel() const
FWDialogBuilder & addTextView(const char *defaultText=nullptr, TGTextView **out=nullptr)
FWSelectionManager * m_selectionManager
FWProxyBuilderConfiguration * getConfig() const
sigc::connection m_displayChangedConn
const std::string & processName() const
bool isInFront() const
returns true if item is in front of all other items
sigc::connection m_modelChangedConn
FWGUIValidatingTextEntry * m_selectExpressionEntry
FWGUIValidatingTextEntry * m_filterExpressionEntry
TGCheckButton * m_isVisibleButton
static int maxLayerValue()
TGTextButton * m_filterButton
void setIsVisible(bool iSet)
FWDialogBuilder & tabs(TGTab **out)
FWItemChangeSignal goingToBeDestroyed_
TGCompositeFrame * m_settersFrame
FWDialogBuilder & indent(int left=2, int right=-1)
FWDialogBuilder & addNumberEntry(float defaultValue, size_t digits, TGNumberFormat::EStyle style, int min, int max, TGNumberEntry **out)
TGTextButton * m_deselectAllButton
const std::string & moduleLabel() const
FWSelectionManager * selectionManager() const
FWDialogBuilder & floatLeft(size_t spacing=3)
TGTextEntry * m_instanceEntry
FWDialogBuilder & untabs(void)
TGTextEntry * m_nameEntry
void setDefaultDisplayProperties(const FWDisplayProperties &)
FWItemChangeSignal defaultDisplayPropertiesChanged_
void select(int iIndex) const
FWDialogBuilder & addTextButton(const char *text, TGTextButton **out=nullptr)
FWModelChangeManager * changeManager() const
TGTextEntry * m_moduleEntry
const FWDisplayProperties & defaultDisplayProperties() const
void show(FWDataCategories)
sigc::signal< void, const FWSelectionManager & > itemSelectionChanged_
FWDialogBuilder & addValidatingTextEntry(const char *defaultText, FWGUIValidatingTextEntry **out)
bool isInBack() const
returns true if item is behind all other items
TGTextEntry * m_processEntry
FWColorSelect * m_colorSelectWidget
const std::set< FWModelId > & selected() const
const TClass * modelType() const
FWDialogBuilder & vSpacer(size_t size=0)
CmsShowEDI(const TGWindow *p=nullptr, UInt_t w=1, UInt_t h=1, FWSelectionManager *selMgr=nullptr, FWColorManager *colorMgr=nullptr)
void select(FWEventItem *iItem, const std::string &iExpression, Color_t iColor=-1) const
Char_t transparency() const
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
FWDialogBuilder & addHSlider(size_t size, TGHSlider **out=nullptr)
FWDialogBuilder & addColorPicker(const FWColorManager *manager, FWColorSelect **out=nullptr)
const std::set< FWEventItem * > & selectedItems() const
void setColor(Color_t iColor)
TGTextButton * m_selectAllButton
const std::string & filterExpression() const
void unselect(int iIndex) const
TGTextButton * m_frontButton
void changeSelectionColor(Color_t color)
sigc::connection m_destroyedConn
TGTextButton * m_removeButton
const TClass * type() const
void setTransparency(Char_t transparency)
void changeItemOpacity(Int_t opacity)
void setDisplayProperties(int iIndex, const FWDisplayProperties &) const
TGTextView * m_filterError
TGNumberEntry * m_layerEntry
void changeItemColor(Color_t color)
FWExpressionValidator * m_validator
FWDialogBuilder & beginTab(const char *label)
static int minLayerValue()
TGTextEntry * m_typeEntry
void toggleItemVisible(Bool_t on=kTRUE)
TGHSlider * m_opacitySlider
TGTextButton * m_selectButton
const std::string & name() const
void setType(const edm::TypeWithDict &)
void setFilterExpression(const std::string &)
TGTextButton * m_backButton
void populateFrame(TGCompositeFrame *frame)
FWModelChangeSignal changed_
void moveToLayer(int layer)
FWDialogBuilder & addTextEntry(const char *defaultText, TGTextEntry **out)
FWDialogBuilder & addLabel(const char *text, size_t fontSize=12, size_t weight=0, TGLabel **out=nullptr)
TGTextView * m_selectError
FWDialogBuilder & addCheckbox(const char *text, TGCheckButton **out=nullptr)