9 #include <qwt_legend.h>
10 #include <qwt3d_plot.h>
12 using namespace Qwt3D;
17 : QMainWindow(
p, Qt::Dialog )
24 setWindowTitle( tr(
"Model Solute 3-Dimensional Viewer" ) );
27 setAttribute( Qt::WA_DeleteOnClose,
true );
30 QSize p1size( 960, 720 );
38 setCentralWidget(
frame );
69 poffsSlider->setTickPosition( QSlider::TicksAbove );
70 resolSlider->setTickPosition( QSlider::TicksAbove );
77 poffsSlider->setStatusTip( tr(
"Polygon Offset increase surface quality)" ));
78 resolSlider->setStatusTip( tr(
"Data Resolution (rectangular data)" ) );
79 normqSlider->setStatusTip( tr(
"Normals Quality (Roundness)" ) );
80 normlSlider->setStatusTip( tr(
"Normals Length" ) );
86 ck_ortho =
new QCheckBox( tr(
"Ortho" ) );
87 ck_legend =
new QCheckBox( tr(
"Legend" ) );
88 ck_autosc =
new QCheckBox( tr(
"Autoscale" ) );
89 ck_mouse =
new QCheckBox( tr(
"Mouse" ) );
90 ck_shade =
new QCheckBox( tr(
"Shading" ) );
98 ck_ortho ->setAutoFillBackground(
true );
101 ck_legend->setAutoFillBackground(
true );
104 ck_autosc->setAutoFillBackground(
true );
107 ck_mouse ->setAutoFillBackground(
true );
110 ck_shade ->setAutoFillBackground(
true );
112 QLabel* normLabl =
new QLabel( tr(
"Normals" ) );
123 pb_std =
new QPushButton( tr(
"Std" ) );
124 pb_light =
new QPushButton( tr(
"Lighting" ) );
126 pb_std ->setToolTip( tr(
"Standard View" ) );
127 pb_light->setToolTip( tr(
"Calibrate Lighting" ) );
128 ck_light->setToolTip( tr(
"Lighting On/Off" ) );
129 pb_std ->setStatusTip( tr(
"Set standard view" ) );
130 pb_light->setStatusTip( tr(
"Calibrate Lighting" ) );
131 ck_light->setStatusTip( tr(
"Turn Lighting On/Off" ) );
134 ck_light ->setAutoFillBackground(
true );
136 QLabel* offsLabl =
new QLabel( tr(
"Polygon Offset" ) );
137 QLabel* resoLabl =
new QLabel( tr(
"Resolution" ) );
138 QLabel* dumyLabl =
new QLabel(
" " );
139 offsLabl->setAlignment( Qt::AlignVCenter | Qt::AlignHCenter );
140 resoLabl->setAlignment( Qt::AlignVCenter | Qt::AlignHCenter );
160 statusBar()->showMessage( tr(
"status bar active" ) );
170 connect(
pb_std, SIGNAL( clicked() ),
172 connect(
pb_light, SIGNAL( clicked() ),
175 connect(
cb_ifmt, SIGNAL( activated(
int ) ),
178 connect(
ck_light, SIGNAL( stateChanged(
int ) ),
180 connect(
ck_ortho, SIGNAL( stateChanged(
int ) ),
182 connect(
ck_legend, SIGNAL( stateChanged(
int ) ),
184 connect(
ck_autosc, SIGNAL( stateChanged(
int ) ),
186 connect(
ck_mouse, SIGNAL( stateChanged(
int ) ),
188 connect(
ck_shade, SIGNAL( stateChanged(
int ) ),
191 connect(
poffsSlider, SIGNAL( valueChanged(
int ) ),
193 connect(
resolSlider, SIGNAL( valueChanged(
int ) ),
195 connect(
normlSlider, SIGNAL( valueChanged(
int ) ),
197 connect(
normqSlider, SIGNAL( valueChanged(
int ) ),
200 timer =
new QTimer(
this );
201 connect(
movieAct, SIGNAL( toggled(
bool ) ),
203 connect(
timer, SIGNAL( timeout() ),
205 connect(
openAct, SIGNAL( triggered(
bool ) ),
207 connect(
saveAct, SIGNAL( triggered(
bool ) ),
209 connect(
exitAct, SIGNAL( triggered(
bool ) ),
212 connect(
coaxesAct, SIGNAL( triggered(
bool ) ),
214 connect(
cobackAct, SIGNAL( triggered(
bool ) ),
216 connect(
comeshAct, SIGNAL( triggered(
bool ) ),
218 connect(
conumbAct, SIGNAL( triggered(
bool ) ),
220 connect(
colablAct, SIGNAL( triggered(
bool ) ),
222 connect(
cocaptAct, SIGNAL( triggered(
bool ) ),
224 connect(
codataAct, SIGNAL( triggered(
bool ) ),
226 connect(
corsetAct, SIGNAL( triggered(
bool ) ),
229 connect(
fnnumbAct, SIGNAL( triggered(
bool ) ),
231 connect(
fnaxesAct, SIGNAL( triggered(
bool ) ),
233 connect(
fncaptAct, SIGNAL( triggered(
bool ) ),
235 connect(
fnrsetAct, SIGNAL( triggered(
bool ) ),
238 connect(
frameAct, SIGNAL( toggled(
bool ) ),
240 connect(
boxAct, SIGNAL( toggled(
bool ) ),
242 connect(
noneAct, SIGNAL( toggled(
bool ) ),
245 connect(
gridfrAct, SIGNAL( toggled(
bool ) ),
247 connect(
gridbAct, SIGNAL( toggled(
bool ) ),
249 connect(
gridrAct, SIGNAL( toggled(
bool ) ),
251 connect(
gridlAct, SIGNAL( toggled(
bool ) ),
253 connect(
gridcAct, SIGNAL( toggled(
bool ) ),
255 connect(
gridfAct, SIGNAL( toggled(
bool ) ),
257 connect(
gridbAct, SIGNAL( toggled(
bool ) ),
259 connect(
gridbAct, SIGNAL( toggled(
bool ) ),
262 connect(
scattdAct, SIGNAL( toggled(
bool ) ),
264 connect(
wirefrAct, SIGNAL( toggled(
bool ) ),
266 connect(
hiddlnAct, SIGNAL( toggled(
bool ) ),
268 connect(
polygnAct, SIGNAL( toggled(
bool ) ),
270 connect(
fdmeshAct, SIGNAL( toggled(
bool ) ),
272 connect(
nodataAct, SIGNAL( toggled(
bool ) ),
275 connect(
fldataAct, SIGNAL( toggled(
bool ) ),
277 connect(
flisolAct, SIGNAL( toggled(
bool ) ),
279 connect(
flemptAct, SIGNAL( toggled(
bool ) ),
282 connect(
normsAct, SIGNAL( toggled(
bool ) ),
285 dataWidget->coordinates()->setLineSmooth(
true );
294 dataWidget->setTitle( tr(
"Model 3-D Plot " ) );
319 const double VROUND = 10.0;
320 const double VNEGOF = (1.0/VROUND);
321 const double MAX_ANNO = (99.9/VROUND);
329 double xround = VROUND;
330 double yround = VROUND;
347 for (
int ii = 0; ii < ncomp; ii++ )
382 double xavg = (
xmin +
xmax ) * 0.5;
383 double yavg = (
ymin +
ymax ) * 0.5;
390 powry = qRound( log10( y_norm ) );
391 powrz = qRound( log10(
z_norm ) );
393 y_norm = pow( 10.0, (
double)
powry );
394 z_norm = pow( 10.0, (
double)powrz );
397 if ( ( xavg *
x_norm ) > MAX_ANNO )
403 if ( ( yavg * y_norm ) > MAX_ANNO )
409 if ( ( zmax *
z_norm ) > MAX_ANNO )
426 DbgLv(2) <<
"P3D:sR: powx powy xnorm ynorm" << powrx << powry << x_norm <<
y_norm;
434 xmin = (double)( (
int)(
xmin * xround ) ) / xround;
435 xmax = (double)( (
int)(
xmax * xround ) + 1 ) / xround;
437 ymin = (double)( (
int)(
ymin * yround ) ) / yround;
438 ymax = (double)( (
int)( ymax * yround ) + 1 ) / yround;
440 zmax = (double)( (
int)( zmax * VROUND ) + 1 ) / VROUND;
443 <<
" ymin ymax" <<
ymin << ymax <<
" zmin zmax" <<
zmin <<
zmax;
448 double a_alpha,
double a_beta,
double x_scale,
double y_scale )
464 for (
int ii = 0; ii <
ncols; ii++ )
477 int hixd =
ncols / 5;
478 int hiyd =
nrows / 5;
493 double dfac = M_PI * 0.5 /
beta;
516 xdif = acos( pow( 1e-18, ( 1.0 /
alpha) ) )
517 *
beta / ( M_PI * 0.5 * sqrt( 2.0 ) );
518 nxd = qRound( xdif * xpinc );
519 nyd = qRound( xdif * ypinc );
520 DbgLv(2) <<
" xdif nxd nyd" << xdif << nxd << nyd;
523 nxd = ( nxd < hixd ) ? nxd : hixd;
524 nyd = ( nyd < hiyd ) ? nyd : hiyd;
525 nxd = ( nxd > loxd ) ? nxd : loxd;
526 nyd = ( nyd > loyd ) ? nyd : loyd;
527 DbgLv(2) <<
" nxd nyd" << nxd << nyd;
529 for (
int ii = 0; ii <
nrows; ii++ )
530 for (
int jj = 0; jj <
ncols; jj++ )
531 zdat[ ii ][ jj ] = zval;
533 for (
int kk = 0; kk < ncomp; kk++ )
540 rx = (int)( xval * xpinc );
543 fx = ( fx > 0 ) ? fx : 0;
544 lx = ( lx <
ncols ) ? lx : ncols;
546 ry = (int)( yval * ypinc );
549 fy = ( fy > 0 ) ? fy : 0;
550 ly = ( ly <
nrows ) ? ly : nrows;
552 for (
int ii = fx; ii < lx; ii++ )
554 xdif =
sq( (
double)ii / xpinc - xval );
556 for (
int jj = fy; jj < ly; jj++ )
558 ydif =
sq( (
double)jj / ypinc - yval );
560 dist = sqrt( xdif + ydif );
576 zdat[ ii ][ jj ] += ( ( zval *
577 ( pow( cos( dist * dfac ),
alpha ) ) ) * zfact );
598 unsigned int kcols = (
unsigned int)
ncols;
599 unsigned int krows = (
unsigned int)
nrows;
601 double** wdata =
new double* [
ncols ];
607 for (
int ii = 0; ii <
ncols; ii++ )
609 if ((ii&63)==1)
DbgLv(2) <<
"P3D: rp: row" << ii;
610 wdata[ ii ] =
new double [
nrows ];
612 for (
int jj = 0; jj <
nrows; jj++ )
614 double zval =
zdata[ ii ][ jj ];
615 wdata[ ii ][ jj ] = zval;
616 zdmx = zdmx > zval ? zdmx : zval;
617 if ((ii&63)==1&&(jj&63)==1)
DbgLv(2) <<
"P3D: rp: col" << jj
625 for (
int ii = 0; ii <
ncols; ii++ )
626 for (
int jj = 0; jj <
nrows; jj++ )
627 wdata[ ii ][ jj ] *= zfac;
645 dataWidget->legend()->setScale( LINEARSCALE );
647 for (
uint ii = 0; ii !=
dataWidget->coordinates()->axes.size(); ++ii )
649 dataWidget->coordinates()->axes[ ii ].setMajors( 4 );
650 dataWidget->coordinates()->axes[ ii ].setMinors( 5 );
656 dataWidget->coordinates()->setLabelColor( Qwt3D::RGBA( 0, 0, 0, 1 ) );
661 QString annopad(
" " );
686 dataWidget->coordinates()->axes[X1].setLabelString( xatitle );
687 dataWidget->coordinates()->axes[X2].setLabelString( xatitle );
688 dataWidget->coordinates()->axes[X3].setLabelString( xatitle );
689 dataWidget->coordinates()->axes[X4].setLabelString( xatitle );
698 DbgLv(2) <<
"P3D:rp:xatitle yatitle" << xatitle <<
yatitle;
705 for (
int ii = 0; ii <
nrows; ii++ )
706 delete [] wdata[ ii ];
726 return IO::save(
dataWidget, filename, imagetype );
731 QString atitle = tr(
"s" );
749 atitle = tr(
"f/f0" );
752 atitle = tr(
"vbar" );
756 if ( sclnorm != 1.0 )
757 atitle = atitle +
" * " + QString::number( sclnorm );
759 DbgLv(2) <<
"P3D: xyAT: type atitle" << type << atitle;
765 QString atitle = tr(
"Concentration " );
768 atitle = tr(
"Mol.Concentr. " );
787 openAct =
new QAction( QIcon(
":/images/fileopen.png" ),
788 tr(
"&Open File" ),
this );
789 openffAct =
new QAction( QIcon(
":/images/filecell.png" ),
790 tr(
"Open FEM File" ),
this );
791 saveAct =
new QAction( QIcon(
":/images/savecontent.png" ),
792 tr(
"Dump Contents" ),
this );
793 movieAct =
new QAction( QIcon(
":/images/movie.png" ),
794 tr(
"Animation" ),
this );
796 frameAct =
new QAction( QIcon(
":/images/frame.png" ),
797 tr(
"Frame Axes" ),
this );
798 boxAct =
new QAction( QIcon(
":/images/box.png" ),
799 tr(
"Box Axes" ),
this );
800 noneAct =
new QAction( QIcon(
":/images/none.png" ),
801 tr(
"No Axes" ),
this );
803 gridfrAct =
new QAction( QIcon(
":/images/gridfr.png" ),
804 tr(
"Front Grid" ),
this );
805 gridbAct =
new QAction( QIcon(
":/images/gridb.png" ),
806 tr(
"Back Grid" ),
this );
807 gridrAct =
new QAction( QIcon(
":/images/gridr.png" ),
808 tr(
"Right Grid" ),
this );
809 gridlAct =
new QAction( QIcon(
":/images/gridl.png" ),
810 tr(
"Left Grid" ),
this );
811 gridcAct =
new QAction( QIcon(
":/images/gridc.png" ),
812 tr(
"Ceiling Grid" ),
this );
813 gridfAct =
new QAction( QIcon(
":/images/gridf.png" ),
814 tr(
"Floor Grid" ),
this );
816 scattdAct =
new QAction( QIcon(
":/images/scattered.png" ),
817 tr(
"Points" ),
this );
818 wirefrAct =
new QAction( QIcon(
":/images/wireframe.png" ),
819 tr(
"Wire Frame" ),
this );
820 hiddlnAct =
new QAction( QIcon(
":/images/hiddenline.png" ),
821 tr(
"Hidden Line" ),
this );
822 polygnAct =
new QAction( QIcon(
":/images/polygon.png" ),
823 tr(
"Polygon only" ),
this );
824 fdmeshAct =
new QAction( QIcon(
":/images/filledmesh.png" ),
825 tr(
"Filled Mesh" ),
this );
827 nodataAct =
new QAction( QIcon(
":/images/nodata.png" ),
828 tr(
"No Data" ),
this );
829 fldataAct =
new QAction( QIcon(
":/images/floordata.png" ),
830 tr(
"Floor Data" ),
this );
831 flisolAct =
new QAction( QIcon(
":/images/flooriso.png" ),
832 tr(
"Floor Isolines" ),
this );
833 flemptAct =
new QAction( QIcon(
":/images/floorempty.png" ),
834 tr(
"Floor Empty" ),
this );
836 normsAct =
new QAction( QIcon(
":/images/normals.png" ),
837 tr(
"Normal Vectors" ),
this );
838 iconAct =
new QAction( QIcon(
":/images/icon.png" ),
839 tr(
"Icon" ),
this );
840 qwtpltAct =
new QAction( QIcon(
":/images/qwtplot.png" ),
841 tr(
"QwtPlot" ),
this );
843 exitAct =
new QAction( tr(
"Exit" ),
this );
845 coaxesAct =
new QAction( tr(
"Axes" ),
this );
846 cobackAct =
new QAction( tr(
"Background" ),
this );
847 comeshAct =
new QAction( tr(
"Mesh" ),
this );
848 conumbAct =
new QAction( tr(
"Number" ),
this );
849 colablAct =
new QAction( tr(
"Label" ),
this );
850 cocaptAct =
new QAction( tr(
"Caption" ),
this );
851 codataAct =
new QAction( tr(
"Data Color" ),
this );
852 corsetAct =
new QAction( tr(
"Reset" ),
this );
854 fnnumbAct =
new QAction( tr(
"Scale numbering" ),
this );
855 fnaxesAct =
new QAction( tr(
"Axes label" ),
this );
856 fncaptAct =
new QAction( tr(
"Caption" ),
this );
857 fnrsetAct =
new QAction( tr(
"Reset" ),
this );
859 cb_ifmt =
new QComboBox(
this );
860 cb_ifmt->addItem( tr(
"BMP" ) );
861 cb_ifmt->addItem( tr(
"JPEG" ) );
862 cb_ifmt->addItem( tr(
"PBM" ) );
863 cb_ifmt->addItem( tr(
"PGM" ) );
864 cb_ifmt->addItem( tr(
"PNG" ) );
865 cb_ifmt->addItem( tr(
"PPM" ) );
866 cb_ifmt->addItem( tr(
"XBM" ) );
867 cb_ifmt->addItem( tr(
"XPM" ) );
868 cb_ifmt->addItem( tr(
"EPS" ) );
869 cb_ifmt->addItem( tr(
"PS" ) );
870 cb_ifmt->addItem( tr(
"EPS-GZ" ) );
871 cb_ifmt->addItem( tr(
"PS-GZ" ) );
872 cb_ifmt->addItem( tr(
"PDF" ) );
878 fileMenu = menuBar()->addMenu( tr(
"&File" ) );
885 colorMenu = menuBar()->addMenu( tr(
"&Color" ) );
895 fontMenu = menuBar()->addMenu( tr(
"Font" ) );
925 boxAct ->setCheckable(
true );
926 noneAct ->setCheckable(
true );
985 openAct ->setStatusTip( tr(
"Open GridData (.mes) files" ) );
986 openffAct->setStatusTip( tr(
"Open Node/Cell files" ) );
987 saveAct ->setStatusTip( tr(
"Dump content to image file" ) );
988 cb_ifmt ->setStatusTip( tr(
"Select image file format" ) );
989 movieAct ->setStatusTip( tr(
"Turn on animation" ) );
990 frameAct ->setStatusTip( tr(
"Show frame axes" ) );
991 boxAct ->setStatusTip( tr(
"Show box axes" ) );
992 noneAct ->setStatusTip( tr(
"Hide axes" ) );
993 gridfrAct->setStatusTip( tr(
"Show front grid" ) );
994 gridbAct ->setStatusTip( tr(
"Show back grid" ) );
995 gridrAct ->setStatusTip( tr(
"Show right grid" ) );
996 gridlAct ->setStatusTip( tr(
"Show left grid" ) );
997 gridcAct ->setStatusTip( tr(
"Show ceiling grid" ) );
998 gridfAct ->setStatusTip( tr(
"Show floor grid" ) );
999 scattdAct->setStatusTip( tr(
"Display scattered points data" ) );
1000 wirefrAct->setStatusTip( tr(
"Display wire frame data" ) );
1001 hiddlnAct->setStatusTip( tr(
"Display hidden line data" ) );
1002 polygnAct->setStatusTip( tr(
"Display polygon only data" ) );
1003 fdmeshAct->setStatusTip( tr(
"Display mesh & filled polygons" ) );
1004 nodataAct->setStatusTip( tr(
"Hide data" ) );
1005 fldataAct->setStatusTip( tr(
"Floor data projection" ) );
1006 flisolAct->setStatusTip( tr(
"Floor isolines" ) );
1007 flemptAct->setStatusTip( tr(
"Floor empty" ) );
1008 normsAct ->setStatusTip( tr(
"Show normal vectors" ) );
1012 int wdim = qRound( (
double)
fileToolBar->size().width() * 0.75 );
1013 int hdim = qRound( (
double)wdim * 0.75 );
1014 setMinimumSize( wdim, hdim );
1016 wdim = qRound( (
double)size().width() * 0.75 );
1017 DbgLv(2) <<
" min x,y dim" << wdim;
1024 double xyval = sc->
s;
1029 xyval = sc->
mw * normscl;
1033 xyval = sc->
s * normscl;
1037 xyval = sc->
D * normscl;
1041 xyval = sc->
f * normscl;
1045 xyval = sc->
f_f0 * normscl;
1049 xyval = sc->
vbar20 * normscl;
1075 DbgLv(2) <<
"light_button";
1081 DbgLv(2) <<
"ifmt_chosen" << index <<
cb_ifmt->itemText(index);
1087 DbgLv(2) <<
"light_check" << (state==Qt::Checked);
1089 pb_light->setEnabled( ( state == Qt::Checked ) );
1095 DbgLv(2) <<
"ortho_check" << (state==Qt::Checked);
1102 DbgLv(2) <<
"legnd_check" << (state==Qt::Checked);
1109 DbgLv(2) <<
"autsc_check" << (state==Qt::Checked);
1110 dataWidget->coordinates()->setAutoScale( state );
1117 DbgLv(2) <<
"mouse_check" << (state==Qt::Checked);
1123 DbgLv(2) <<
"shade_check" << (state==Qt::Checked);
1124 dataWidget->setShading( state ? GOURAUD : FLAT );
1130 DbgLv(2) <<
"poffs_slide" << pos;
1131 dataWidget->setPolygonOffset( (
double)pos / 10.0 );
1139 DbgLv(2) <<
"resol_slide" << pos;
1150 timer->start( redrawWait );
1226 int sum =
dataWidget->coordinates()->grids();
1228 sum = isOn ? ( sum | side ) : ( sum & ~side );
1230 dataWidget->coordinates()->setGridLines(
true,
true, sum );
1329 DbgLv(2) <<
"normals_on" << isOn;
1337 DbgLv(2) <<
"norml_slide" << val;
1338 dataWidget->setNormalLength( (
double)val / 400.0 );
1345 DbgLv(2) <<
"normq_slide" << val;
1359 (
int)(
dataWidget->zRotation() + 1 ) % 360 );
1366 DbgLv(2) <<
"open_file";
1372 DbgLv(2) <<
"close_all";
1375 for (
int ii = 0; ii <
ncols; ii++ )
1376 zdata[ ii ].clear();
1387 QColor cc = QColorDialog::getColor( Qt::black,
this,
1388 tr(
"Select Axes Color" ) );
1389 Qwt3D::RGBA rgb = Qt2GL( cc );
1390 dataWidget->coordinates()->setAxesColor( rgb );
1396 QColor cc = QColorDialog::getColor( Qt::white,
this,
1397 tr(
"Select Background Color" ) );
1398 Qwt3D::RGBA rgb = Qt2GL( cc );
1405 QColor cc = QColorDialog::getColor( Qt::black,
this,
1406 tr(
"Select Mesh Color" ) );
1407 Qwt3D::RGBA rgb = Qt2GL( cc );
1415 QColor cc = QColorDialog::getColor( Qt::black,
this,
1416 tr(
"Select Number Color" ) );
1417 Qwt3D::RGBA rgb = Qt2GL( cc );
1418 dataWidget->coordinates()->setNumberColor( rgb );
1424 QColor cc = QColorDialog::getColor( Qt::black,
this,
1425 tr(
"Select Label Color" ) );
1426 Qwt3D::RGBA rgb = Qt2GL( cc );
1427 dataWidget->coordinates()->setLabelColor( rgb );
1433 QColor cc = QColorDialog::getColor( Qt::black,
this,
1434 tr(
"Select Caption Color" ) );
1435 Qwt3D::RGBA rgb = Qt2GL( cc );
1442 QList< QColor > colorlist;
1443 Qwt3D::ColorVector colorvect;
1444 Qwt3D::StandardColor* stdcol;
1447 QString filter = tr(
"Color Map files (*cm-*.xml);;" )
1448 + tr(
"Any XML files (*.xml);;" )
1449 + tr(
"Any files (*)" );
1452 QString mapfname = QFileDialog::getOpenFileName(
this,
1453 tr(
"Load Color Map File" ),
1456 QFileDialog fd(
this, tr(
"Load Color Map File" ) );
1458 fd.setFilter ( filter );
1459 fd.setOption ( QFileDialog::DontUseNativeDialog );
1460 QString mapfname = fd.getOpenFileName();
1463 if ( mapfname.isEmpty() )
1468 for (
int ii = 0; ii < colorlist.size(); ii++ )
1470 rgb = Qt2GL( colorlist.at( ii ) );
1471 colorvect.push_back( rgb );
1475 stdcol->setColorVector( colorvect );
1490 +
"/cm-w-green-blue-red-black.xml";
1491 const Qwt3D::RGBA blackc = Qt2GL( QColor( Qt::black ) );
1492 const Qwt3D::RGBA whitec = Qt2GL( QColor( Qt::white ) );
1493 QList< QColor > colorlist;
1494 Qwt3D::ColorVector colorvect;
1496 Qwt3D::StandardColor* stdcol =
new StandardColor(
dataWidget );
1500 for (
int ii = 0; ii < colorlist.size(); ii++ )
1502 rgb = Qt2GL( colorlist.at( ii ) );
1503 colorvect.push_back( rgb );
1506 stdcol ->setColorVector( colorvect );
1507 dataWidget->coordinates()->setAxesColor( blackc );
1508 dataWidget->coordinates()->setNumberColor( blackc );
1509 dataWidget->coordinates()->setLabelColor( blackc );
1524 QFont oldfont =
dataWidget->coordinates()->axes[X1].numberFont();
1525 QFont newfont = QFontDialog::getFont( &ok, oldfont,
this,
1526 tr(
"Select Scale Numbers Font" ) );
1531 dataWidget->coordinates()->setNumberFont( newfont );
1538 QFont oldfont =
dataWidget->coordinates()->axes[X1].labelFont();
1539 QFont newfont = QFontDialog::getFont( &ok, oldfont,
this,
1540 tr(
"Select Axes Labels Font" ) );
1545 dataWidget->coordinates()->setLabelFont( newfont );
1552 QFont newfont = QFontDialog::getFont( &ok,
titleFont,
this,
1553 tr(
"Select Title Caption Font" ) );
1558 dataWidget->setTitleFont( newfont.family(), newfont.pointSize(),
1580 QString imagetype =
cb_ifmt->currentText();
1581 QString fileext =
cb_ifmt->currentText().toLower();
1582 QString datetime = QDateTime::currentDateTime().toString(
"yyMMddhhmm" );
1584 if ( !imagetype.contains(
"PS" ) && !imagetype.contains(
"PDF" ) )
1585 imagetype = imagetype.toLower();
1589 if ( ! dir.exists( reportDir ) ) dir.mkpath( reportDir );
1592 +
"_" + datetime +
"_plot3d." + fileext;
1594 bool ok = IO::save(
dataWidget, ofname, imagetype );
1596 DbgLv(2) <<
" dump_contents" << ofname <<
" OK " << ok;
1597 DbgLv(2) <<
" imagetype" << imagetype;
1601 statusBar()->showMessage( tr(
"Successful dump to " )
1607 statusBar()->showMessage( tr(
"*ERROR* Unable to create " )