9 #include <qwt_legend.h>
12 #define ZSCAL_FACT 0.008
13 #define RXSCL_FACT 0.032
14 #define RYSCL_FACT 0.900
21 qDebug() <<
"PCtrl: IN";
24 qDebug() <<
"PCtrl: xyzdat count" <<
xyzdat->count();
26 setObjectName(
"US_MwlPlotControl" );
27 setAttribute( Qt::WA_DeleteOnClose,
true );
32 setWindowTitle( tr(
"3-D Plotting Controls" ) );
44 QLabel* lb_zscalefac =
us_label( tr(
"Z Scale Factor:" ) );
45 QLabel* lb_rxscale =
us_label( tr(
"Relative X Scale:" ) );
46 QLabel* lb_ryscale =
us_label( tr(
"Relative Y Scale:" ) );
82 connect( pb_plot3d, SIGNAL( clicked() ),
84 connect( pb_help, SIGNAL( clicked() ),
85 this, SLOT (
help() ) );
86 connect( pb_close, SIGNAL( clicked() ),
93 qDebug() <<
"PCtrl: w size" << size();
111 QGLWidget* widgP = (QGLWidget*)0;
126 qDebug() <<
"PCtrl: plot3_btn";
127 QString wtitle = tr(
"Multiwavelength 3-Dimensional Viewer" );
128 QString ptitle = tr(
"MWL 3-D Plot, Scan 1" );
129 QString xatitle = tr(
"Radius(cm)" );
130 QString yatitle = tr(
"Lambda(nm)" );
131 QString zatitle = tr(
"Intensity" );
137 int nidpt =
xyzdat->count();
138 QList< double > xvals;
140 for (
int ii = 0; ii < nidpt; ii++ )
142 double xval =
xyzdat->at( ii ).x();
143 if ( ! xvals.contains( xval ) )
147 int nrow = xvals.count();
148 int ncol = nidpt / nrow;
158 int nhdx = qApp->desktop()->width() / 2;
159 int nhdy = qApp->desktop()->height() / 2;
162 int wx = ( cx < nhdx ) ? ( cx + ncx + 20 ) : ( cx - nwx - 20 );
163 int wy = ( cy < nhdy ) ? ( cy + ncy + 20 ) : ( cy - nwy - 20 );
168 plot3d_w->setTitles ( wtitle, ptitle, xatitle, yatitle, zatitle );