15 #include "TGTextEntry.h" 17 #include "nutools/EventDisplayBase/PrintDialog.h" 18 #include "nutools/EventDisplayBase/Printable.h" 19 #include "nutools/EventDisplayBase/EventHolder.h" 20 #include "nutools/EventDisplayBase/evdb.h" 30 TGTransientFrame(0,0,800,300,0),
33 fL1 =
new TGLayoutHints(kLHintsLeft|kLHintsTop|kLHintsExpandX, 2, 2, 2, 2);
34 fL2 =
new TGLayoutHints(kLHintsLeft|kLHintsTop, 2, 2, 2, 2);
49 std::map<std::string,Printable*>&
53 for (; itr!=itrEnd; ++itr) {
62 base += itr->second->PrintTag();
65 sprintf(runevt,
".%d.%d",
80 fFilename[i]->SetToolTipText(
"Base file name for print");
87 fDoPNG[i]->Resize(wCheckBox,h);
90 if (gsFormatSelection[ptag])
fDoPNG[i]->SetState(kButtonDown);
94 fDoGIF[i]->Resize(wCheckBox,h);
97 if (gsFormatSelection[ptag])
fDoGIF[i]->SetState(kButtonDown);
101 fDoPDF[i]->Resize(wCheckBox,h);
104 if (gsFormatSelection[ptag])
fDoPDF[i]->SetState(kButtonDown);
108 fDoEPS[i]->Resize(wCheckBox,h);
111 if (gsFormatSelection[ptag])
fDoEPS[i]->SetState(kButtonDown);
127 new TGLayoutHints(kLHintsLeft,4,4,4,4));
130 fCancelButton->Connect(
"Clicked()",
"evdb::PrintDialog",
this,
"Cancel()");
132 new TGLayoutHints(kLHintsRight,4,4,4,4));
137 this->MapSubwindows();
138 this->Resize(500, fNprintable*(h+8)+38);
140 this->SetWindowName(
"Print Dialog");
143 this->Connect(
"CloseWindow()",
"evdb::PrintDialog",
this,
"CloseWindow()");
183 bool printMe = (
fPrintableCB[i]->GetState() == kButtonDown);
186 gsPrintableSelection[
fPrintTag[i]] = printMe;
192 doPrint[0] = (
fDoPNG[i]->GetState() == kButtonDown);
193 doPrint[1] = (
fDoGIF[i]->GetState() == kButtonDown);
194 doPrint[2] = (
fDoPDF[i]->GetState() == kButtonDown);
195 doPrint[3] = (
fDoEPS[i]->GetState() == kButtonDown);
196 for (
int j=0; j<nFormats; ++j) {
202 gsFormatSelection[ftag] = doPrint[j];
static std::map< std::string, bool > gsPrintableSelection
TGCheckButton * fDoGIF[10]
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
TGCheckButton * fDoEPS[10]
TGTextEntry * fFilename[10]
Manage all things related to colors for the event display.
std::string fPrintTag[10]
TGCheckButton * fDoPDF[10]
TGCheckButton * fPrintableCB[10]
static std::map< std::string, evdb::Printable * > & GetPrintables()
TGCheckButton * fDoPNG[10]
static EventHolder * Instance()
TGTextButton * fCancelButton
TGCompositeFrame * fButtonFrame
TGCompositeFrame * fPrintFrame[10]
static std::map< std::string, bool > gsFormatSelection
TGTextButton * fPrintButton
Printable * fPrintable[10]
h
training ###############################
virtual void Print(const char *filename)=0