24 #include "qcombobox.h"
25 #include "qlineedit.h"
26 #include "qmessagebox.h"
43 using namespace hippodraw;
59 const vector < string > & nt_vector
61 if ( nt_vector.empty () ) {
67 if ( count == nt_vector.size () )
return;
70 vector < string > ::const_iterator first = nt_vector.begin();
71 while ( first != nt_vector.end() ) {
72 const string & name = *first++;
91 const std::string & s = current_ds -> getLabelAt ( i );
92 const QString label = s.c_str();
95 item->setText( 1,
QString (
"%1").arg(label));
107 std::vector < PlotterBase * >::const_iterator it = cutlist.begin();
111 for ( ; it != cutlist.end(); ++ it )
117 Range cutrange = cp -> getCutRange();
119 const std::string & label = cp -> getLabel(
Axes::X);
120 double min = cutrange.
low();
121 double max = cutrange.
high();
122 const std::string & inversion = (cp -> getCutInversion())?
"Inverted":
"";
126 item->setText( 1,
QString(
"%1").arg ( label.c_str() ) );
127 item->setText( 2,
QString(
"%1").arg(min));
128 item->setText( 3,
QString(
"%1").arg(max));
129 item->setText( 5,
QString(
"%1").arg( inversion.c_str() ) );
134 item->setText( 4,
QString(
"2D-X"));
138 Range cutrange = cp2 -> getCutRangeY();
140 const std::string & label = cp2-> getLabel(
Axes::Y);
141 double min = cutrange.
low();
142 double max = cutrange.
high();
146 item->setText( 1,
QString(
"%1").arg ( label.c_str() ) );
147 item->setText( 2,
QString(
"%1").arg(min));
148 item->setText( 3,
QString(
"%1").arg(max));
149 item->setText( 4,
QString(
"2D-Y"));
150 item->setText( 5,
QString(
"%1").arg(inversion.c_str()));
155 item->setText( 4,
QString (
"1D"));
185 controller -> setCurrentIndex ( item );
202 canvaz -> fillPlotterList ( plotterlist );
206 const std::vector < PlotterBase * > &
210 vector < PlotterBase * > plotterlist;
217 return cutcontroller->
getCutList ( plotterlist, current_ds );
227 DataSource * ds = ds_controller -> getCurrent();
231 if ( name.size()==0 ) name =
"<no name>";
242 ntc-> registerNTuple ( name, nt );
256 if (filename.empty()==
true)
return;
260 string::size_type pos = filename.find_last_of (
'.' );
261 const string suffix = filename.substr (pos);
264 DataSource * ds = ds_controller -> getCurrent();
268 if ( name.size()==0 ) name =
"<no name>";
273 if ( suffix ==
".fits" || suffix ==
".gz" )
281 QString message (
"Sorry, can not create FITS file.\n"
282 "The application was not built with\n"
283 "optional FITS support." );
308 #if QT_VERSION < 0x040000
314 for (
unsigned int i = 0; i<
cutNumber; i++ )
319 item2 -> setOn ( yes );
320 item = item->nextSibling();
328 #if QT_VERSION < 0x040000
338 item2 -> setOn ( yes );
339 item = item->nextSibling();
350 #if QT_VERSION < 0x040000
363 std::string name( (item->text(1)).latin1() );
367 item = item->nextSibling();
378 #if QT_VERSION < 0x040000
383 vector < const TupleCut * >::iterator first =
m_cut_list.begin ();
387 if ( item2 -> isOn () == false ) {
393 item = item -> nextSibling ();