27 #include <boost/python/errors.hpp>
29 #include "KeySymbols.h"
37 : TGMainFrame(gClient->GetRoot(), 400, 600),
41 m_moduleLabel(nullptr),
42 m_moduleName(nullptr),
45 m_guiManager(guiManager) {
46 gVirtualX->SelectInput(GetId(),
47 kKeyPressMask | kKeyReleaseMask | kExposureMask | kPointerMotionMask | kStructureNotifyMask |
48 kFocusChangeMask | kEnterWindowMask | kLeaveWindowMask);
49 this->Connect(
"CloseWindow()",
"FWPathsPopup",
this,
"windowIsClosing()");
65 editor->SetBackgroundColor(gVirtualX->GetPixel(kYellow - 7));
66 editor->SetFrameDrawn(
false);
68 m_psTable->
m_editor->Connect(
"ReturnPressed()",
"FWPathsPopup",
this,
"applyEditor()");
70 m_apply->Connect(
"Clicked()",
"FWPathsPopup",
this,
"scheduleReloadEvent()");
73 m_search->Connect(
"TextChanged(const char *)",
"FWPathsPopup",
this,
"updateFilterString(const char *)");
77 m_tableWidget->Connect(
"cellClicked(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t)",
80 "cellClicked(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t)");
83 SetWindowName(
"CMSSW Configuration Editor");
85 editor->UnmapWindow();
93 UInt_t keysym =
event->fCode;
95 if (keysym == (UInt_t)gVirtualX->KeysymToKeycode(kKey_Escape)) {
100 return TGMainFrame::HandleKey(event);
118 if (iButton != kButton1)
121 if (iColumn == 0 || iColumn == 1) {
153 gSystem->ProcessEvents();
159 gSystem->ProcessEvents();
164 gSystem->ProcessEvents();
179 event.getByLabel(tag, triggerResults);
181 std::vector<FWPSetTableManager::PathUpdate> pathUpdates;
183 if (triggerResults.
isValid()) {
186 for (
size_t i = 0,
e = triggerResults->size();
i !=
e; ++
i) {
189 update.
passed = triggerResults->accept(
i);
191 pathUpdates.push_back(update);
212 for (
size_t mni = 0, mne =
m_psTable->
modules().size(); mni != mne; ++mni) {
214 if (module.
dirty ==
false)
222 }
catch (boost::python::error_already_set
const &) {
collection_type::const_iterator const_iterator
int selectedColumn() const
std::vector< ModuleInfo > & modules()
void pythonToCppException(const std::string &iType, const std::string &error)
FWDialogBuilder & addTextButton(const char *text, TGTextButton **out=nullptr)
std::vector< int > & rowToIndex()
std::string const & moduleName() const
void setExpanded(int row)
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
void updateStatus(const char *status)
FWDialogBuilder & addLabel(const char *text, size_t fontSize=12, size_t weight=0, TGLabel **out=nullptr)
void requestChanges(const std::string &, const edm::ParameterSet &)
std::vector< PSetData > & data()
ModuleDescription const * moduleDescription() const
char const * what() const noexceptoverride
static std::string const triggerResults
FWPSetCellEditor * m_editor
void updateSchedule(const edm::ScheduleInfo *info)
FWDialogBuilder & addTextEntry(const char *defaultText, TGTextEntry **out)
ProcessHistory const & processHistory() const override
virtual void updateFilter(const char *filter)
FWDialogBuilder & floatLeft(size_t spacing=3)
std::string const & triggerName(unsigned int index) const
FWDialogBuilder & addTable(FWTableManagerBase *manager, FWTableWidget **out=nullptr)
void setCellValueEditor(FWPSetCellEditor *editor)
FWDialogBuilder & expand(size_t expandX=true, size_t expandY=false)
char data[epos_bytes_allocation]
void update(std::vector< PathUpdate > &pathUpdates)
void setSelection(int row, int column, int mask)
FWDialogBuilder & indent(int left=2, int right=-1)
std::vector< PSetData > & entries()
FWDialogBuilder & spaceDown(size_t spacing=3)
edm::ParameterSet * current_pset