From fac74e818f1c5a81e793dacce436e89a23f37d6a Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Wed, 13 Jun 2007 09:16:34 +0000 Subject: [PATCH] SVGPro dialog allow to modify the main properies of SVG documents --- src/meshlabplugins/editslice/editslice.cpp | 178 ++++++---- src/meshlabplugins/editslice/editslice.h | 17 +- src/meshlabplugins/editslice/slicedialog.cpp | 110 +++--- src/meshlabplugins/editslice/slicedialog.h | 19 +- src/meshlabplugins/editslice/slicedialog.ui | 301 ++++++---------- src/meshlabplugins/editslice/svgpro.cpp | 115 +++++++ src/meshlabplugins/editslice/svgpro.h | 43 +++ src/meshlabplugins/editslice/svgpro.ui | 344 +++++++++++++++++++ 8 files changed, 767 insertions(+), 360 deletions(-) create mode 100644 src/meshlabplugins/editslice/svgpro.cpp create mode 100644 src/meshlabplugins/editslice/svgpro.h create mode 100644 src/meshlabplugins/editslice/svgpro.ui diff --git a/src/meshlabplugins/editslice/editslice.cpp b/src/meshlabplugins/editslice/editslice.cpp index b7cc88313..1b406a628 100644 --- a/src/meshlabplugins/editslice/editslice.cpp +++ b/src/meshlabplugins/editslice/editslice.cpp @@ -5,6 +5,7 @@ #include "editslice.h" #include #include + #include #include #include @@ -18,7 +19,7 @@ #include #include #include -#include + #include #include #include @@ -83,41 +84,27 @@ const PluginInfo &ExtraMeshSlidePlugin::Info() } -void ExtraMeshSlidePlugin::restoreDefault(){ - trackball_slice.Reset(); -} + void ExtraMeshSlidePlugin::mouseReleaseEvent (QAction *,QMouseEvent * e, MeshModel &/*m*/, GLArea * gla) - { - if(dialogsliceobj->getDefaultTrackball()) - gla->trackball.MouseUp(e->x(),gla->height()-e->y(),QT2VCG(e->button(), e->modifiers())); - else trackball_slice.MouseUp(e->x(),gla->height()-e->y(),QT2VCG(e->button(), e->modifiers())); +{ + + trackball_slice.MouseUp(e->x(),gla->height()-e->y(),QT2VCG(e->button(), e->modifiers())); + } void ExtraMeshSlidePlugin::mousePressEvent (QAction *, QMouseEvent * e, MeshModel &m, GLArea * gla) { - if ( (dialogsliceobj->getDefaultTrackball()) && - !(e->modifiers() & Qt::ShiftModifier) && - (e->button()==Qt::LeftButton) && - !(e->modifiers() & Qt::ControlModifier)) - gla->trackball.MouseDown(e->x(),(gla->height()-e->y()),QT2VCG(e->button(), e->modifiers()) ); - if ( (!dialogsliceobj->getDefaultTrackball())&& - (e->button()==Qt::LeftButton) && - !(e->modifiers() & Qt::ShiftModifier) ) - trackball_slice.MouseDown(e->x(),gla->height()-e->y(),QT2VCG(e->button(), e->modifiers()) ); + + if ( (e->button()==Qt::LeftButton) && + !(e->modifiers() & Qt::ShiftModifier) ) + trackball_slice.MouseDown(e->x(),gla->height()-e->y(),QT2VCG(e->button(), e->modifiers()) ); gla->update(); } void ExtraMeshSlidePlugin::mouseMoveEvent (QAction *,QMouseEvent * e, MeshModel &/*m*/, GLArea * gla) { - - if( (e->buttons()| Qt::LeftButton) && - (dialogsliceobj->getDefaultTrackball()) && - !(e->modifiers() & Qt::ShiftModifier) && - !(e->modifiers() & Qt::ControlModifier)) - gla->trackball.MouseMove(e->x(),gla->height()-e->y()); - if( (e->buttons()| Qt::LeftButton) && - !(dialogsliceobj->getDefaultTrackball()) && - !(e->modifiers() & Qt::ShiftModifier)) - trackball_slice.MouseMove(e->x(),gla->height()-e->y()); + if( (e->buttons()| Qt::LeftButton) && + !(e->modifiers() & Qt::ShiftModifier)) + trackball_slice.MouseMove(e->x(),gla->height()-e->y()); gla->update(); } void ExtraMeshSlidePlugin::RestoreDefault(){ @@ -125,60 +112,103 @@ void ExtraMeshSlidePlugin::mouseReleaseEvent (QAction *,QMouseEvent * e, MeshMo gla->trackball.Reset(); gla->update(); } - void ExtraMeshSlidePlugin::SlotExportButton(){ + void ExtraMeshSlidePlugin::SlotExportButton() + { - if (!dialogsliceobj->getExportOption()){ - QFileDialog saveF; - dirName=saveF.getExistingDirectory(gla->window(),tr("Save polyline in one or more file, one each pane"), "Choose a directory",QFileDialog::ShowDirsOnly ); - } - else - { - QFileDialog saveF; - fileName = saveF.getSaveFileName(gla->window(), tr("Save polyline in sigle File"),"/",tr("Mesh (*.svg)")); - } + QFileDialog saveF; + fileName = saveF.getSaveFileName(gla->window(), tr("Saving..."),"/",tr("Mesh (*.svg)")); + if (fileName==0) return; + + + dialogsliceobj->hide(); + Matrix44f mat_trac_rotation ; trackball_slice.track.rot.ToMatrix( mat_trac_rotation ); //rotation Matrix of the plans' trackball Point3f* dir=new Point3f(1,0,0); //the plans' normal vector init (*dir)= mat_trac_rotation * (*dir); //rotation of the directions vector Point3f translation_plans=trackball_slice.track.tra; //vettore di translazione dei piani - for(int i=0; iX() )+ (rotationCenter.Y()*dir->Y()) +(rotationCenter.Z()*dir->Z())+ (off*(*dir)) ); - double avg_length; - mesh_grid.Set(m.cm.face.begin() ,m.cm.face.end()); - edge_mesh.Clear(); - vcg::Intersection(p , edge_mesh, avg_length, &mesh_grid, intersected_cells); - vcg::edge::UpdateBounding::Box(edge_mesh); - Box3f b= edge_mesh.bbox; - if (!dialogsliceobj->getExportOption()){ + bool EvportVector=false; //variabile used after + vector ev; + ev.clear(); + + Point3d d((*dir).X(),(*dir).Y(), (*dir).Z()); + pr.setPlane(0, d); + svgpro= new SVGPro(gla->window(), point_Vector.size(), dialogsliceobj->getExportOption()); + svgpro->Init(pr.getWidth(), pr.getHeight(), pr.getViewBox()[0], pr.getViewBox()[1], pr.getScale()); + if ( svgpro->exec() == QDialog::Accepted ) + + { + UpdateVal(svgpro, &pr); + if (!dialogsliceobj->getExportOption()) + pr.numCol=1; + else + pr.numCol=point_Vector.size(); + pr.numRow=1; + mesh_grid = new TriMeshGrid(); + mesh_grid->Set(m.cm.face.begin() ,m.cm.face.end()); + float scale = (pr.getViewBox().V(0)/pr.numCol) /edgeMax ; + + pr.setScale(scale); + pr.setTextDetails( svgpro->showText ); + for(int i=0; iX() )+ (rotationCenter.Y()*dir->Y()) +(rotationCenter.Z()*dir->Z())+ (off*(*dir)) ); + double avg_length; + edge_mesh = new n_EdgeMesh(); + vcg::Intersection(p , *edge_mesh, avg_length, mesh_grid, intersected_cells); + vcg::edge::UpdateBounding::Box(*edge_mesh); + + + if (!dialogsliceobj->getExportOption()){ QString index; index.setNum(i); - fileN=dirName+"slice_"+index+".svg"; - vcg::edge::io::SVGProperties pr; - Point3d d((*dir).X(),(*dir).Y(), (*dir).Z()); - pr.setPlane(0, d); - vcg::edge::io::ExporterSVG::Save(&edge_mesh, fileN.toLatin1().data(), pr ); + fileN=fileName.left( fileName.length ()- 4 )+"_"+index+".svg"; + pr.setPosition(Point2d(0,0)); + pr.numCol=1; + pr.numRow=1; + vcg::edge::io::ExporterSVG::Save(edge_mesh, fileN.toLatin1().data(), pr ); + } + else{ + + ev.push_back(edge_mesh); + EvportVector=true; + } } - else{ - vcg::edge::io::SVGProperties pr; - Point3d d((*dir).X(),(*dir).Y(), (*dir).Z()); - pr.setPlane(0, d); - - - } - } + + if(EvportVector){ + + vcg::edge::io::ExporterSVG::Save(&ev, fileName.toLatin1().data(),pr); + //Free memory allocated + + vector::iterator it; + for(it=ev.begin(); it!=ev.end(); it++){ + delete *it;} + + } + } + dialogsliceobj->show(); } + +void ExtraMeshSlidePlugin::UpdateVal(SVGPro* sv, SVGProperties * pr){ + bool ok; + + + pr->setDimension(sv->getImageWidth(),sv->getImageHeight()); + pr->setViewBox(Point2d(sv->getViewBoxWidth(), sv->getViewBoxHeight())); + +} void ExtraMeshSlidePlugin::Decorate(QAction * ac, MeshModel &m, GLArea * gla) { @@ -199,11 +229,12 @@ void ExtraMeshSlidePlugin::mouseReleaseEvent (QAction *,QMouseEvent * e, MeshMo // } } void ExtraMeshSlidePlugin::StartEdit(QAction * , MeshModel &m, GLArea *gla ){ - + gla->update(); if(!first){ dialogsliceobj=new dialogslice(gla->window()); dialogsliceobj->show(); first=true; + this->m=m; QObject::connect(dialogsliceobj, SIGNAL(exportMesh()), this,SLOT(SlotExportButton())); QObject::connect(dialogsliceobj, SIGNAL(Update_glArea()), this, SLOT(upGlA())); @@ -214,20 +245,19 @@ void ExtraMeshSlidePlugin::mouseReleaseEvent (QAction *,QMouseEvent * e, MeshMo gla->update(); - } - + } void ExtraMeshSlidePlugin::DrawPlane(GLArea * gla, MeshModel &m){ b=m.cm.bbox; //Boundig Box Point3f mi=b.min; Point3f ma=b.max; Point3f centre=b.Center() ; - float edgeMax=0; + edgeMax=0; float LX= ma[0]-mi[0]; float LY= ma[1]-mi[1]; float LZ= ma[2]-mi[2]; edgeMax= max(LX, LY); - edgeMax=max(edgeMax, LZ); //edgeMax è il lato maggiore della BBox + edgeMax=max(edgeMax, LZ); //edgeMax: the longest side of BBox dialogsliceobj->setDistanceRange(edgeMax); glPushMatrix(); glPushAttrib(GL_COLOR_BUFFER_BIT|GL_LIGHTING_BIT); diff --git a/src/meshlabplugins/editslice/editslice.h b/src/meshlabplugins/editslice/editslice.h index b5e1a024f..70b3ffdc3 100644 --- a/src/meshlabplugins/editslice/editslice.h +++ b/src/meshlabplugins/editslice/editslice.h @@ -5,7 +5,7 @@ #include #include #include - +#include "svgpro.h" #include "slicedialog.h" #include #include @@ -19,6 +19,8 @@ #include +#include + typedef CMeshO n_Mesh; class n_Face; @@ -31,7 +33,7 @@ class n_EdgeMesh: public vcg::edge::EdgeMesh< vector, vector > typedef vcg::GridStaticPtr TriMeshGrid; typedef vcg::edge::EdgeMesh,vector > Edge_Mesh; - +typedef vcg::edge::io::SVGProperties SVGProperties; @@ -55,11 +57,11 @@ public: virtual void mouseMoveEvent (QAction *,QMouseEvent *event, MeshModel &/*m*/, GLArea * ); virtual void mouseReleaseEvent (QAction *,QMouseEvent *event, MeshModel &/*m*/, GLArea * ); virtual QList actions() const ; - void restoreDefault(); + private: - TriMeshGrid mesh_grid; - n_EdgeMesh edge_mesh; + TriMeshGrid* mesh_grid; + n_EdgeMesh* edge_mesh; n_Mesh trimesh; std::vector intersected_cells; vector point_Vector; @@ -69,10 +71,15 @@ private: MeshModel m; bool first; Box3f b; + SVGPro *svgpro; + float edgeMax; +SVGProperties pr; dialogslice *dialogsliceobj; void DrawPlane(GLArea * gla,MeshModel &m); + void UpdateVal(SVGPro * sv, SVGProperties * pr); bool activeDefaultTrackball; bool disableTransision; + public Q_SLOTS: void RestoreDefault(); void SlotExportButton(); diff --git a/src/meshlabplugins/editslice/slicedialog.cpp b/src/meshlabplugins/editslice/slicedialog.cpp index 70ed0fcf3..70a04477d 100644 --- a/src/meshlabplugins/editslice/slicedialog.cpp +++ b/src/meshlabplugins/editslice/slicedialog.cpp @@ -4,37 +4,20 @@ dialogslice::dialogslice(QWidget *parent) : QDockWidget(parent) { ui.setupUi(this); - numPlane=1; - distance=1; + numPlane=1; //number of plans + distance=1; - defaultTrackball=false; + //defaultTrackball=false; restoreDefalut=false; QPoint p=parent->mapToGlobal(QPoint(0,0)); - this->setGeometry(p.x()+parent->width()-width(),p.y()+30,width(),height() ); + this->setGeometry(p.x()+(parent->width()-width()),p.y()+40,width(),height() ); this->setFloating(true); - multi_sigleExportFile=false; + multi_sigleExportFile=false; //Multi/Single file choose } -dialogslice::~dialogslice() -{ - -} -void dialogslice::on_DefaultTrackball_clicked(bool f) -{ -defaultTrackball=f; - -} - -void dialogslice::on_on_slideTrackBall_clicked(bool f) -{ -defaultTrackball=!f; -} - - -void dialogslice::on_spinBoxPlane_valueChanged(int x) -{emit Update_glArea(); - numPlane=x; +dialogslice::~dialogslice(){ + } void dialogslice::on_DefultButton_clicked() { @@ -44,7 +27,7 @@ void dialogslice::on_DefultButton_clicked() numPlane=1; distance=1; this->ui.SliderPlaneDistance->setValue(1); - this->ui.spinBoxPlane->setValue(1); + } @@ -58,8 +41,28 @@ emit exportMesh(); -void dialogslice::on_Update_Val_clicked() + +void dialogslice::on_SliderPlaneDistance_sliderMoved(int x) { +distanceDefault=false; +distance=x; +QString c; +ui.DistanceEdit->setText(c.setNum(distance*distanceRange)); +emit Update_glArea(); +} +void dialogslice::on_Exporter_singleFile_clicked() +{ + this->multi_sigleExportFile=true; +} + +void dialogslice::on_Exporter_MultiFile_clicked() +{ + this->multi_sigleExportFile=false; +} + +void dialogslice::on_DistanceEdit_returnPressed() +{ +distanceDefault=false; bool ok; float val=this->ui.DistanceEdit->text().toFloat(&ok); if (ok) @@ -74,46 +77,19 @@ float val=this->ui.DistanceEdit->text().toFloat(&ok); emit Update_glArea(); } -void dialogslice::on_SliderPlaneDistance_sliderMoved(int x) -{ - -distance=x; -QString c; -ui.DistanceEdit->setText(c.setNum(distance*distanceRange)); -emit Update_glArea(); -} - - - - - - -void dialogslice::on_Exporter_singleFile_clicked() -{//not implemented yet -//this->multi_sigleExportFile=true; -} - -void dialogslice::on_Exporter_MultiFile_clicked() -{ -this->multi_sigleExportFile=false; -} - -void dialogslice::on_EditDistanceCheck_stateChanged(int i) -{ - if (i==0){ - this->ui.SliderPlaneDistance->setEnabled(false); - ui.Distnace_edit_group->setEnabled(false); - - distanceDefault=true; +void dialogslice::on_spinBox_valueChanged(int x) +{numPlane=x; + if(x>1){ + ui.DistanceEdit->setEnabled(true); + ui.SliderPlaneDistance->setEnabled(true); + ui.SliderPlaneDistance->setValue(defaultdistance/distanceRange); + } + else + { + ui.DistanceEdit->setEnabled(false); + ui.SliderPlaneDistance->setEnabled(false); + } - } -else { - this->ui.SliderPlaneDistance->setEnabled(true); - ui.Distnace_edit_group->setEnabled(true); - this->ui.SliderPlaneDistance->setValue(defaultdistance/distanceRange); - this->distance=defaultdistance/distanceRange; - distanceDefault=false; - } -emit Update_glArea(); + emit Update_glArea(); +} -} \ No newline at end of file diff --git a/src/meshlabplugins/editslice/slicedialog.h b/src/meshlabplugins/editslice/slicedialog.h index e5d45178e..c6a68fcd8 100644 --- a/src/meshlabplugins/editslice/slicedialog.h +++ b/src/meshlabplugins/editslice/slicedialog.h @@ -28,7 +28,7 @@ public: } inline void setDistanceRange(float dRange){ - this->distanceRange=dRange/100; + this->distanceRange=dRange/100; // Scale of values in slider rappresent the value in px of any tick ui.labelDistanceRange->setText(QString("Distance range from 0 to "+ QString::number(dRange))); } @@ -49,26 +49,17 @@ private: bool defaultTrackball; bool restoreDefalut; private slots: - void on_EditDistanceCheck_stateChanged(int); + + void on_spinBox_valueChanged(int); + void on_DistanceEdit_returnPressed(); void on_Exporter_MultiFile_clicked(); void on_Exporter_singleFile_clicked(); void on_SliderPlaneDistance_sliderMoved(int); - void on_Update_Val_clicked(); - + void on_ExportButton_clicked(); void on_DefultButton_clicked(); - void on_spinBoxPlane_valueChanged(int); - - void on_on_slideTrackBall_clicked(bool); - void on_DefaultTrackball_clicked(bool); - - - - - - }; #endif diff --git a/src/meshlabplugins/editslice/slicedialog.ui b/src/meshlabplugins/editslice/slicedialog.ui index bb801b8e3..671b3c871 100644 --- a/src/meshlabplugins/editslice/slicedialog.ui +++ b/src/meshlabplugins/editslice/slicedialog.ui @@ -45,7 +45,7 @@ 20 30 331 - 341 + 330 @@ -94,77 +94,38 @@ Distance between plans + + + + 190 + 30 + 101 + 21 + + + + 1 + + + QLineEdit::Normal + + + 1 + + + Qt::AlignHCenter + + 10 70 - 291 + 241 21 - - - false - - - - 180 - 20 - 121 - 71 - - - - - - 60 - 40 - 51 - 23 - - - - Updade - - - - - - 10 - 10 - 101 - 21 - - - - 1 - - - QLineEdit::Normal - - - 1 - - - Qt::AlignHCenter - - - - - - - 10 - 20 - 141 - 18 - - - - Manualy edit distance - - false @@ -208,36 +169,103 @@ 1 + + + + 20 + 20 + 91 + 30 + + + + Restore Default + + - + - 10 - 280 - 91 - 30 + 120 + 200 + 211 + 51 - - Restore Default + + + 200 + 30 + + + + 300 + 16777215 + + + + + + 10 + 30 + 83 + 18 + + + + Multi file + + + true + + + + + + 110 + 10 + 96 + 30 + + + + Export Polyline... + + + QToolButton::InstantPopup + + + + + + 10 + 10 + 83 + 18 + + + + Single file + + 10 0 - 99 + 321 51 Number of plans - + - 10 + 30 20 50 18 @@ -271,139 +299,12 @@ - - - - 10 - 200 - 100 - 61 - - - - - 0 - 60 - - - - - 100 - 16777215 - - - - Trackball mode - - - - - 10 - 20 - 151 - 18 - - - - only Plane - - - true - - - - - - 10 - 40 - 83 - 18 - - - - Default - - - - - - - 120 - 250 - 211 - 61 - - - - - 200 - 30 - - - - - 300 - 16777215 - - - - - - 110 - 20 - 96 - 30 - - - - Export Polyline... - - - QToolButton::InstantPopup - - - - - - 10 - 30 - 83 - 18 - - - - Multi file - - - true - - - - - - 10 - 10 - 83 - 18 - - - - Single file - - - false - - - - spinBoxPlane SliderPlaneDistance - on_slideTrackBall - DefaultTrackball DefultButton ExportButton diff --git a/src/meshlabplugins/editslice/svgpro.cpp b/src/meshlabplugins/editslice/svgpro.cpp new file mode 100644 index 000000000..9336540ff --- /dev/null +++ b/src/meshlabplugins/editslice/svgpro.cpp @@ -0,0 +1,115 @@ + +#include "svgpro.h" + + +SVGPro::SVGPro(QWidget *parent, int numPlans, bool ExportMode ) + : QDialog(parent) +{ QString c; + ui.setupUi(this); + this->ExportMode=ExportMode; + ui.numPlane->setText(c.setNum(numPlans)); + if(ExportMode){ + numRow=1; + numCol=numPlans; + ui.TitleLabel->setText("Exporting in single file"); + //ui.ImageWidth->setText( + } + else{ + numRow=1; + numCol=1; + ui.TitleLabel->setText("Exporting in Multi file"); + } + + mesureUnit="cm"; +} + +SVGPro::~SVGPro() +{ + +} +void SVGPro::Init(int image_width, int image_height, int viewBox_width, int viewBox_height, float scale){ + QString c; + if( /*ExportMode &&*/((image_width*numCol)!=(image_height*numRow))) + ui.ImageWidth->setText(c.setNum(image_height*numCol)); + else + ui.ImageWidth->setText(c.setNum(image_width)); + + if(/*ExportMode &&*/((viewBox_width*numCol)!=(viewBox_height*numRow))) + ui.viewBox_Width->setText(c.setNum(viewBox_height*numCol)); + else + ui.viewBox_Width->setText(c.setNum(viewBox_width)); + + ui.ImageHeight->setText(c.setNum(image_height)); + + ui.viewBox_Height->setText(c.setNum(viewBox_height)); + +} + + + +void SVGPro::on_ImageWidth_textChanged(const QString c) +{ + bool ok; + QString q; + int num=c.toInt(&ok, 10)/numCol; + + if(ok) ui.WidthLabel->setText(q.setNum(num)+" "+mesureUnit); +} + +void SVGPro::on_ImageHeight_textChanged(const QString c) +{ + bool ok; + QString q; + int num=c.toInt(&ok, 10)/numRow; + if(ok) ui.HeightLabel->setText(q.setNum(num)+" "+mesureUnit); +} + + + +void SVGPro::on_cm_choose_clicked() +{ + mesureUnit="cm"; +} + +void SVGPro::on_pixel_choose_clicked() +{ + mesureUnit="px"; +} + +void SVGPro::on_viewBox_Width_textChanged(const QString c) +{ + bool ok; + QString q; + int num=c.toInt(&ok, 10)/numCol; + if(ok) ui.WidthLabelViewBox->setText(q.setNum(num)+" px"); +} + +void SVGPro::on_viewBox_Height_textChanged(const QString c) +{ + bool ok; + QString q; + int num=c.toInt(&ok, 10)/numRow; + if(ok) ui.HeightLabelViewBox->setText(q.setNum(num)+" px"); +} + +void SVGPro::on_buttonBox_accepted() +{ + accept(); +} + +void SVGPro::on_buttonBox_rejected() +{ + reject (); +} + + + +void SVGPro::on_view_text_stateChanged(int i) +{ + if(i==0){ + showText=false; + } + else{ + showText=true; + } +} \ No newline at end of file diff --git a/src/meshlabplugins/editslice/svgpro.h b/src/meshlabplugins/editslice/svgpro.h new file mode 100644 index 000000000..5f9c133a2 --- /dev/null +++ b/src/meshlabplugins/editslice/svgpro.h @@ -0,0 +1,43 @@ +#ifndef SVGPRO_H +#define SVGPRO_H + +#include +#include "ui_svgpro.h" + +class SVGPro : public QDialog +{ + Q_OBJECT + +public: + SVGPro(QWidget *parent, int numPlans, bool ExportMode); + ~SVGPro(); + void Init(int image_width, int image_height, int viewBox_width, int viewBox_height, float scale); + inline int getImageWidth(){ bool ok; return ui.ImageWidth->text().toInt(&ok, 10);} + inline int getImageHeight(){ bool ok; return ui.ImageHeight->text().toInt(&ok, 10);} + inline int getViewBoxWidth(){ bool ok; return ui.viewBox_Width->text().toInt(&ok, 10);} + inline int getViewBoxHeight(){ bool ok; return ui.viewBox_Height->text().toInt(&ok, 10);} + bool showText; + int numCol; + int numRow; +bool ExportMode; +private: + Ui::SVGProClass ui; + + QString mesureUnit; + +private slots: + void on_view_text_stateChanged(int); + + void on_buttonBox_rejected(); + void on_buttonBox_accepted(); + void on_viewBox_Height_textChanged(const QString c); + void on_viewBox_Width_textChanged(const QString c); + void on_pixel_choose_clicked(); + void on_cm_choose_clicked(); + + void on_ImageHeight_textChanged(const QString c); + void on_ImageWidth_textChanged(const QString c); + +}; + +#endif // SVGPRO_H diff --git a/src/meshlabplugins/editslice/svgpro.ui b/src/meshlabplugins/editslice/svgpro.ui new file mode 100644 index 000000000..0bb7d9a83 --- /dev/null +++ b/src/meshlabplugins/editslice/svgpro.ui @@ -0,0 +1,344 @@ + + SVGProClass + + + + 0 + 0 + 400 + 366 + + + + SVGPro + + + + + 280 + 50 + 120 + 61 + + + + + + 10 + 30 + 83 + 18 + + + + Pixel + + + + + + 10 + 10 + 83 + 18 + + + + Cm + + + true + + + + + + + 10 + 10 + 181 + 21 + + + + + MS Shell Dlg 2 + 13 + 50 + false + false + false + false + + + + + + + 240 + 340 + 156 + 23 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok + + + + + + 40 + 30 + 241 + 131 + + + + Image Size + + + + + 140 + 20 + 46 + 14 + + + + Height + + + + + + 10 + 20 + 46 + 14 + + + + Width + + + + + + 100 + 110 + 46 + 21 + + + + + + + 140 + 40 + 80 + 18 + + + + + + + 10 + 40 + 81 + 20 + + + + + + + 100 + 70 + 46 + 21 + + + + + + + 20 + 70 + 82 + 16 + + + + Number of Item: + + + + + + 20 + 90 + 81 + 16 + + + + Width of Items: + + + + + + 20 + 110 + 81 + 16 + + + + Height of Items: + + + + + + 100 + 90 + 46 + 21 + + + + + + + + 40 + 170 + 241 + 131 + + + + View Box Resolution + + + + + 10 + 20 + 46 + 14 + + + + Width + + + + + + 140 + 20 + 46 + 14 + + + + Height + + + + + + 10 + 40 + 81 + 18 + + + + + + + 140 + 40 + 80 + 18 + + + + + + + 100 + 110 + 46 + 16 + + + + + + + 10 + 110 + 81 + 16 + + + + Height of Items: + + + + + + 10 + 80 + 81 + 16 + + + + Width of Items: + + + + + + 100 + 80 + 46 + 16 + + + + + + + + 300 + 180 + 71 + 18 + + + + view text + + + true + + + + + + +