13 #include <TGPicture.h>
14 #include <TGTextEntry.h>
15 #include <TRootEmbeddedCanvas.h>
19 #include "ImageDelete.xpm"
20 #include "ImageDraw.xpm"
21 #include "ImageEdit.xpm"
28 TGHorizontalFrame(p, w, h)
30 SetCleanup(kDeepCleanup);
31 SetBackgroundColor(TColor::RGB2Pixel(110, 110, 110));
50 TTimer::SingleShot(50,
"QGPlotListEntryFrame",
this,
"DeletePlot()");
80 AddFrame(
fEmbeddedCanvas,
new TGLayoutHints(kLHintsCenterY, 5, 0, 0, 0));
84 fNameBox->SetAlignment(kTextCenterX);
87 AddFrame(
fNameBox,
new TGLayoutHints(kLHintsExpandX | kLHintsCenterY, 5, 0, 0, 0));
89 fDrawButton =
new TGPictureButton(
this, gClient->GetPicturePool()->GetPicture(
"Draw", (
char**)ImageDraw));
90 fDrawButton->Connect(
"Clicked()",
"QGPlotListEntryFrame",
this,
"HandleDrawButton()");
93 fDeleteButton =
new TGPictureButton(
this, gClient->GetPicturePool()->GetPicture(
"Delete", (
char**)ImageDelete));
94 fDeleteButton->Connect(
"Clicked()",
"QGPlotListEntryFrame",
this,
"HandleDeleteButton()");
97 histogram->DrawStyleHistogram();
99 fEditButton =
new TGPictureButton(
this, gClient->GetPicturePool()->GetPicture(
"Edit", (
char**)ImageEdit));
100 fEditButton->Connect(
"Clicked()",
"QGPlotListEntryFrame",
this,
"HandleEditButton()");
101 fEditButton->SetToolTipText(
"Display histogram edit window");
103 AddFrame(
fDrawButton,
new TGLayoutHints(kLHintsCenterY, 5, 0, 0, 0));
104 AddFrame(
fEditButton,
new TGLayoutHints(kLHintsCenterY, 0, 0, 0, 0));
105 AddFrame(
fDeleteButton,
new TGLayoutHints(kLHintsCenterY, 0, 5, 0, 0));
107 scatterPlot->DrawStyleScatterPlot();
109 fEditButton =
new TGPictureButton(
this, gClient->GetPicturePool()->GetPicture(
"Edit", (
char**)ImageEdit));
110 fEditButton->Connect(
"Clicked()",
"QGPlotListEntryFrame",
this,
"HandleEditButton()");
111 fEditButton->SetToolTipText(
"Display scatter plot edit window");
113 AddFrame(
fDrawButton,
new TGLayoutHints(kLHintsCenterY, 5, 0, 0, 0));
114 AddFrame(
fEditButton,
new TGLayoutHints(kLHintsCenterY, 0, 0, 0, 0));
115 AddFrame(
fDeleteButton,
new TGLayoutHints(kLHintsCenterY, 0, 5, 0, 0));
117 pulse->DrawStylePulse();
119 fEditButton =
new TGPictureButton(
this, gClient->GetPicturePool()->GetPicture(
"Edit", (
char**)ImageEdit));
120 fEditButton->Connect(
"Clicked()",
"QGPlotListEntryFrame",
this,
"HandleEditButton()");
121 fEditButton->SetToolTipText(
"Display pulse edit window");
123 AddFrame(
fDrawButton,
new TGLayoutHints(kLHintsCenterY, 5, 0, 0, 0));
124 AddFrame(
fEditButton,
new TGLayoutHints(kLHintsCenterY, 0, 0, 0, 0));
125 AddFrame(
fDeleteButton,
new TGLayoutHints(kLHintsCenterY, 0, 5, 0, 0));
127 AddFrame(
fDrawButton,
new TGLayoutHints(kLHintsCenterY, 5, 0, 0, 0));
129 AddFrame(
fDeleteButton,
new TGLayoutHints(kLHintsCenterY, 0, 5, 0, 0));
Class for graphical cuts.
Class for GUI histograms.
Class for entries in the plot list.
TGPictureButton * fDrawButton
Draw button.
void HandleDrawButton()
Handle draw button.
virtual ~QGPlotListEntryFrame()
Destructor.
void HandleDeleteButton()
Handle delete button.
TGTextEntry * fNameBox
Box for plot name.
TGPictureButton * fDeleteButton
Delete button.
QGPlot * fPlot
Plot represented by this entry.
TRootEmbeddedCanvas * fEmbeddedCanvas
Embedded canvas for style preview.
void HandleEditButton()
Handle edit button.
void DeletePlot()
Delete associated plot.
TGPictureButton * fEditButton
Edit button.
void SetPlot(QGPlot *plot)
Set plot that this entry represents.
QGPlotListEntryFrame(TGWindow *p=0, UInt_t w=10, UInt_t h=10)
Constructor.
Base class for GUI plots including histograms, scatter plots, pulses, and graphical cuts.
virtual const char * GetName() const
Get plot name, should be overridden by derived classes.
virtual void Plot()
Plot this in the associated canvas window, generating it if necessary.
virtual void DisplayEditWindow()
Display edit window for the plot, should be overridden by derived classes.
virtual void Erase()
Erase plot, should be overridden by derived classes.
Class for GUI pulse plots.
Class for GUI scatter plots.