9 #include <qwt_legend.h>
11 #ifndef ZSCLF_CE // Plot scale adjusts: Contour/Points Envel/Integ
31 qDebug() <<
"PCtrl: IN";
36 qDebug() <<
"PCtrl: xyzdat count" <<
xyzdat->count();
38 setObjectName(
"US_VhwCPlotControl" );
39 setAttribute( Qt::WA_DeleteOnClose,
true );
44 setWindowTitle( tr(
"3-D Plotting Controls" ) );
56 QLabel* lb_zscalefac =
us_label( tr(
"Z Scale Factor:" ) );
57 QLabel* lb_rxscale =
us_label( tr(
"Relative X Scale:" ) );
58 QLabel* lb_ryscale =
us_label( tr(
"Relative Y Scale:" ) );
59 QLabel* lb_peaksmoo =
us_label( tr(
"Peak Smoothing" ) );
60 QLabel* lb_peakwid =
us_label( tr(
"Peak Width:" ) );
61 QLabel* lb_gridres =
us_label( tr(
"Grid Resolution:" ) );
121 connect( pb_plot3d, SIGNAL( clicked() ),
123 connect(
ck_contour, SIGNAL( toggled (
bool ) ),
125 connect( pb_help, SIGNAL( clicked() ),
126 this, SLOT (
help() ) );
127 connect( pb_close, SIGNAL( clicked() ),
134 qDebug() <<
"PCtrl: w size" << size();
160 QGLWidget* widgP = (QGLWidget*)0;
175 qDebug() <<
"PCtrl: plot3_btn";
176 QString wtitle = tr(
"Multiwavelength 3-D vHW Viewer" );
177 QString ptitle = tr(
"MWL 3-D Plot, vHW Distributions" );
178 QString xatitle = tr(
"Sed.C.(*e+13)" );
179 QString yatitle = tr(
"Lambda(nm)" );
180 QString zatitle =
envel ? tr(
"Concen." ) :
181 ( (
p_type == 1 ) ? tr(
"B.Frac." ) :
193 int nidpt =
xyzdat->count();
194 qDebug() <<
"PCtrl: plot3_btn: nidpt" << nidpt;
195 QList< double > yvals;
197 for (
int ii = 0; ii < nidpt; ii++ )
199 double yval =
xyzdat->at( ii ).y();
200 if ( ! yvals.contains( yval ) )
204 int ncol = yvals.count();
205 int nrow = nidpt / ncol;
206 gridres = contour ? (int)
ct_gridres->value() : nrow;
207 qDebug() <<
"PCtrl: ncol nrow" << ncol << nrow <<
"gridres" <<
gridres;
208 ncol = contour ? ncol :
gridres;
209 nrow = contour ? nrow :
gridres;
219 int nhdx = qApp->desktop()->width() / 2;
220 int nhdy = qApp->desktop()->height() / 2;
223 int wx = ( cx < nhdx ) ? ( cx + ncx + 20 ) : ( cx - nwx - 20 );
224 int wy = ( cy < nhdy ) ? ( cy + ncy + 20 ) : ( cy - nwy - 20 );
242 plot3d_w->setTitles ( wtitle, ptitle, xatitle, yatitle, zatitle );