5 #include "TEveManager.h" 21 std::vector< std::pair<std::string, std::string> >
names = { {
"GUI",
"Windows" }, {
"CommonPreferences",
"Colors" }, {
"EventNavigator" ,
"EventFilters" }, {
"EventItems" ,
"Collections" } };
25 for (std::vector< std::pair<std::string, std::string> >::iterator
i = names.begin();
i!= names.end(); ++
i) {
26 if (
i->second == btnName)
36 for (std::vector< std::pair<std::string, std::string> >::iterator
i = names.begin();
i!= names.end(); ++
i) {
37 if (
i->first == rlName)
48 TGTransientFrame(gClient->GetRoot(),
FWGUIManager::getGUIManager()->getMainFrame(), 200, 140), m_cfgMng(iCfg)
51 std::ifstream
g(path);
62 TGVerticalFrame* vf =
new TGVerticalFrame(
this);
63 AddFrame(vf,
new TGLayoutHints(kLHintsNormal, 2, 2, 4, 4));
68 [](
const std::pair<std::string, FWConfiguration>& lhs,
const std::pair<std::string, FWConfiguration>& rhs) ->
bool {
69 return nmm.btnName(lhs.first) < nmm.btnName(rhs.first); } );
72 if ( it->second.keyValues()) {
74 TGCheckButton* cb =
new TGCheckButton(vf, nb.c_str());
96 TGHorizontalFrame*
hf =
new TGHorizontalFrame(
this);
97 AddFrame(hf,
new TGLayoutHints( kLHintsRight| kLHintsBottom, 1, 1, 2, 4));
98 TGTextButton*
load =
new TGTextButton(hf,
" Load ");
99 load->Connect(
"Clicked()",
"FWPartialConfigLoadGUI",
this,
"Load()");
100 hf->AddFrame(load,
new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0));
101 TGTextButton* cancel =
new TGTextButton(hf,
" Cancel ");
102 cancel->Connect(
"Clicked()",
"FWPartialConfigGUI",
this,
"Cancel()");
103 hf->AddFrame(cancel,
new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0));
105 SetWindowName(
"Load Config");
117 bool resetViews =
true;
123 if (!((*i)->IsOn())) {
125 if (key ==
"EventItems") resetEI =
false;
126 if (key ==
"GUI") resetViews =
false;
128 for(FWConfiguration::KeyValues::iterator it = kv->begin(); it != kv->end(); ++it)
130 if ( key == it->first) {
144 gEve->DisableRedraw();
146 gEve->EnableRedraw();
159 TGHorizontalFrame*
hf =
new TGHorizontalFrame(
this);
160 AddFrame(hf,
new TGLayoutHints( kLHintsRight| kLHintsBottom, 1, 1, 2, 4));
162 TGTextButton*
write =
new TGTextButton(hf,
" Write ");
163 write->Connect(
"Clicked()",
"FWPartialConfigSaveGUI",
this,
"WriteConfig()");
164 hf->AddFrame(write,
new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0));
166 TGTextButton* cancel =
new TGTextButton(hf,
" Cancel ");
167 cancel->Connect(
"Clicked()",
"FWPartialConfigGUI",
this,
"Cancel()");
168 hf->AddFrame(cancel,
new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0));
170 AddFrame(
new TGLabel(
this, Form(
"Output file: %s", gSystem->BaseName(path_out))),
new TGLayoutHints(kLHintsLeft, 8,2,3,3));
172 SetWindowName(
"Save Config");
188 if (
g.peek() == (
int)
'<') {
206 for(FWConfiguration::KeyValues::iterator it = cur_kv->begin(); it != cur_kv->end(); ++it)
208 if ( key == it->first) {
211 for(FWConfiguration::KeyValues::iterator oldit = old_kv->begin(); oldit != old_kv->end(); ++oldit) {
212 if ( key == oldit->first) {
214 oldit->second.swap(it->second);
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
void to(FWConfiguration &) const
const KeyValues * keyValues() const
FWEventItemsManager * m_eiMng
FWConfigurationManager * m_cfgMng
~FWPartialConfigLoadGUI() override
def replace(string, replacements)
FWConfiguration * config(void)
std::vector< TGCheckButton * > m_entries
const std::string names[nVars_]
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
std::string m_outFileName
void setFrom(const FWConfiguration &) const
void swap(FWConfiguration &)
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
FWPartialConfigLoadGUI(const char *path, FWConfigurationManager *, FWEventItemsManager *)
FWPartialConfigGUI(const char *path, FWConfigurationManager *)
FWPartialConfigSaveGUI(const char *path_out, const char *path_in, FWConfigurationManager *)
static FWGUIManager * getGUIManager()
FWConfiguration m_origConfig
std::string m_currFileName
static void streamTo(std::ostream &oTo, const FWConfiguration &iConfig, const std::string &name)