23 #pragma warning(disable: 4503) 29 #include <qcombobox.h> 30 #include <qcheckbox.h> 31 #include <qlineedit.h> 32 #include <qstatusbar.h> 36 #include <qfiledialog.h> 41 #include <qgroupbox.h> 42 #include <qclipboard.h> 43 #include <qmessagebox.h> 44 #include <qtoolbutton.h> 46 #include <QResizeEvent> 47 #include <QWheelEvent> 48 #include <QFocusEvent> 49 #include <QMouseEvent> 50 #include <QCloseEvent> 51 #include <QGridLayout> 54 #include <QHBoxLayout> 56 #include <QImageWriter> 57 #include <QPrintDialog> 87 #define TR(id) OLocalizator::getString("TYModelerFrame", (id)) 88 #define IMG(id) OLocalizator::getPicture("TYModelerFrame", (id)) 93 static double gridColor[] = { 0.59, 0.41, 0.42 };
94 static double fontColor[] = { 0.1, 0.43, 0.37 };
95 static double rendererColor[] = { 0.91, 0.91, 0.91 };
99 : QWidget(parent, f), _actionManager(10)
103 setAttribute(Qt::WA_DeleteOnClose);
122 setFocusPolicy(StrongFocus);
125 setMouseTracking(
true);
143 void (QComboBox:: * _qComboBox_activated)(int) = &QComboBox::activated;
166 QToolButton* pFitBtn =
new QToolButton(
this);
167 pFitBtn->setIcon(QPixmap(
IMG(
"id_icon_fit_btn")));
168 pFitBtn->setText(
TR(
"id_fit_btn"));
169 pFitBtn->setToolTip(
TR(
"id_fit_btn"));
170 pFitBtn->setFixedSize(24, 24);
221 QToolButton* pEditEltBtn =
new QToolButton(
this);
222 pEditEltBtn->setIcon(QPixmap(
IMG(
"id_icon_editeelt_btn")));
223 pEditEltBtn->setText(
TR(
"id_editelt_btn"));
224 pEditEltBtn->setToolTip(
TR(
"id_editelt_btn"));
225 pEditEltBtn->setFixedSize(24, 24);
241 QToolButton* pCopyBtn =
new QToolButton(
this);
242 pCopyBtn->setIcon(QPixmap(
IMG(
"id_icon_copy_btn")));
243 pCopyBtn->setText(
TR(
"id_copy_btn"));
244 pCopyBtn->setToolTip(
TR(
"id_copy_btn"));
245 pCopyBtn->setFixedSize(24, 24);
265 _pShowNormalsBtn->setIcon(QPixmap(
IMG(
"id_icon_normals")));
266 _pShowNormalsBtn->setText(
TR(
"id_show_normals_btn"));
267 _pShowNormalsBtn->setToolTip(
TR(
"id_show_normals_btn"));
268 _pShowNormalsBtn->setCheckable(
true);
269 _pShowNormalsBtn->setChecked(
false);
270 _pShowNormalsBtn->setFixedSize(24, 24);
277 _pShowPlafondBtn->setIcon(QPixmap(
IMG(
"id_icon_plafond")));
278 _pShowPlafondBtn->setText(
TR(
"id_show_plafond_btn"));
279 _pShowPlafondBtn->setToolTip(
TR(
"id_show_plafond_btn"));
280 _pShowPlafondBtn->setCheckable(
true);
281 _pShowPlafondBtn->setChecked(
false);
282 _pShowPlafondBtn->setFixedSize(24, 24);
289 _pShowRaysBtn->setIcon(QPixmap(
IMG(
"id_icon_rays")));
290 _pShowRaysBtn->setText(
TR(
"id_show_rays_btn"));
291 _pShowRaysBtn->setToolTip(
TR(
"id_show_rays_btn"));
293 _pShowRaysBtn->setCheckable(
true);
294 _pShowRaysBtn->setChecked(
false);
295 _pShowRaysBtn->setFixedSize(24, 24);
298 showRays(_pShowRaysBtn->isChecked());
311 NxReal fromTop[3] = { 0, 500, 0 };
312 NxReal toTop[3] = { 0, 0, 0 };
313 NxReal upTop[3] = { 0, 0, -1 };
316 NxReal fromLeft[3] = { -500, 0, 0 };
317 NxReal toLeft[3] = { 0, 0, 0 };
318 NxReal upLeft[3] = { 0, 1, 0 };
321 NxReal fromFront[3] = { 0, 0, 500 };
322 NxReal toFront[3] = { 0, 0, 0 };
323 NxReal upFront[3] = { 0, 1, 0 };
326 NxReal fromPersp[3] = { 0, 10000, 10000 };
327 NxReal toPersp[3] = { 0, 0, 0 };
328 NxReal upPersp[3] = { 0, 1, 0 };
331 NxReal fromFree[3] = { 0, 0, 0 };
332 NxReal toFree[3] = { 0, 0, 0.1 };
333 NxReal upFree[3] = { 0, 1, 0 };
354 oColor.
r = fontColor[0];
355 oColor.
g = fontColor[1];
356 oColor.
b = fontColor[2];
487 void (QComboBox:: * _qComboBox_activated)(int) = &QComboBox::activated;
549 return QWidget::close();
577 if (pParent ==
getTYApp()->getCurProjet())
609 bool showGridXY =
false;
610 bool showGridXZ =
false;
611 bool showGridZY =
false;
619 labelStr =
TR(
"id_top_view");
624 labelStr =
TR(
"id_left_view");
629 labelStr =
TR(
"id_front_view");
634 labelStr =
TR(
"id_3d_view");
639 labelStr =
TR(
"id_free_view");
661 _pElement->getGraphicObject()->update(
true);
687 glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
691 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
695 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
697 else if (mode ==
Flat)
699 glShadeModel(GL_FLAT);
703 glShadeModel(GL_SMOOTH);
708 if (bUpdateGL ==
true)
801 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
809 _pElement->getGraphicObject()->update(
true);
818 TYApplication::restoreOverrideCursor();
830 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
837 _pElement->getGraphicObject()->update(
true);
845 TYApplication::restoreOverrideCursor();
858 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
865 _pElement->getGraphicObject()->update(
true);
873 TYApplication::restoreOverrideCursor();
887 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
894 _pElement->getGraphicObject()->update(
true);
902 TYApplication::restoreOverrideCursor();
927 pSetCameraCoordinates->exec();
929 if (pSetCameraCoordinates->result() == QDialog::Accepted)
944 QMenu* pMenu =
new QMenu(NULL);
946 QHash<QAction*, QString> formats;
948 for (
unsigned int i = 0; i < QImageWriter::supportedImageFormats().count(); i++)
950 QString str = QString(QImageWriter::supportedImageFormats().at(i));
951 formats.insert(pMenu->addAction(QString(
"%1...").arg(str)), QString(str));
954 pMenu->setMouseTracking(
true);
959 QString format = formats[
id];
961 QString filename = QFileDialog::getSaveFileName(
this,
"", QString::null, QString(
"*.%1").arg(format.toLower()));
962 if (!filename.isEmpty())
965 if (!filename.endsWith(format.toLower()))
967 filename +=
"." + format.toLower();
972 if (qApp->hasPendingEvents())
974 qApp->processEvents();
978 QImage img =
_pView->grabFrameBuffer();
981 QPixmap pix = QPixmap::fromImage(img);
982 pix.save(filename, format.toLatin1().data(), 80);
992 QImage img =
_pView->grabFrameBuffer();
995 QClipboard* clipboard = QApplication::clipboard();
996 clipboard->setImage(img);
1008 if (pProjet == NULL)
1012 if (pCalcul == NULL)
1033 if (pDialog->exec() == QDialog::Accepted)
1035 QPrinter* printer =
new QPrinter();
1037 QPrintDialog dialog(printer,
this);
1040 QPainter paint(printer);
1042 double w = double(printer->width());
1043 double h = double(printer->height());
1044 double scalew = w / 700;
1045 double scaleh = h / 700;
1048 QImage img =
_pView->grabFrameBuffer();
1049 img = img.scaled(
int(w * 9 / 10),
int(h * 2 / 3), Qt::KeepAspectRatio, Qt::SmoothTransformation);
1050 int x = int(
double(printer->width() - img.width()) / 2);
1051 int y = int(
double(printer->height() - img.height()) * 1 / 3);
1052 QPixmap pm = QPixmap::fromImage(img);
1053 paint.drawPixmap(x, y, pm);
1055 paint.setFont(QFont(
"Times", (
int)(10 * scaleh)));
1056 int mid = int(w / 2) - int(paint.fontMetrics().width(pDialog->
_lineEditTete->text()) / 2);
1059 mid = int(w / 2) - int(paint.fontMetrics().width(pDialog->
_lineEditPied->text()) / 2);
1060 paint.drawText(mid, printer->height() - 20, pDialog->
_lineEditPied->text());
1062 paint.setFont(QFont(
"Times", (
int)(15 * scaleh), QFont::Bold));
1063 mid = int(w / 2) - int(paint.fontMetrics().width(pDialog->
_lineEditTitre->text()) / 2);
1066 x = int(50 * scalew);
1067 int x1 = int(w / 2);
1068 y = int(
double(printer->height()) * 2 / 3 + 20 * scaleh);
1069 int stepy = int(10 * scaleh);
1070 paint.setFont(QFont(
"Times", (
int)(10 * scaleh)));
1076 paint.drawText(x, y,
TR(
"id_print_nom_projet"));
1077 paint.drawText(x1, y, pProjet->
getName());
1082 paint.drawText(x, y,
TR(
"id_print_auteur_projet"));
1083 paint.drawText(x1, y, pProjet->
getAuteur());
1088 paint.drawText(x, y,
TR(
"id_print_date_creation"));
1091 paint.drawText(x, y,
TR(
"id_print_date_modif"));
1097 paint.drawText(x, y,
TR(
"id_print_comment"));
1098 paint.drawText(x1, y, pProjet->
getComment());
1105 y += int(
double(stepy) * 1.5);
1108 paint.drawText(x, y,
TR(
"id_print_nom_calcul"));
1109 paint.drawText(x1, y, pCalcul->
getName());
1114 paint.drawText(x, y,
TR(
"id_print_date_creation"));
1117 paint.drawText(x, y,
TR(
"id_print_date_modif"));
1123 paint.drawText(x, y,
TR(
"id_print_comment"));
1124 paint.drawText(x1, y, pCalcul->
getComment());
1131 y += int(
double(stepy) * 1.5);
1138 paint.drawText(x, y,
TR(
"id_print_nom_batiment"));
1139 paint.drawText(x1, y, pBatiment->
getName());
1147 paint.drawText(x, y,
TR(
"id_print_nom_machine"));
1148 paint.drawText(x1, y, pMachine->
getName());
1153 paint.drawText(x, y,
TR(
"id_print_constr"));
1159 paint.drawText(x, y,
TR(
"id_print_model"));
1160 paint.drawText(x1, y, pMachine->
getModele());
1165 paint.drawText(x, y,
TR(
"id_print_cat"));
1166 paint.drawText(x1, y, QString().setNum(pMachine->
getCategorie()));
1171 paint.drawText(x, y,
TR(
"id_print_comment"));
1178 if (pSite !=
nullptr)
1182 paint.drawText(x, y,
TR(
"id_print_nom_site"));
1183 paint.drawText(x1, y, pSite->
getName());
1198 if (
_pElement->edit(
this) == QDialog::Accepted)
1204 _pElement->getGraphicObject()->update(
true);
1217 if (pTYElementGraphic != NULL)
1220 boundingBox = pTYElementGraphic->
GetBox();
1228 OBox globalBoundingBox;
1233 if (pTYProjet !=
nullptr)
1236 pTYElement = pTYSiteNode;
1241 return globalBoundingBox;
1246 int visibilityStates[9];
1277 float xMin = globalBoundingBox.
_min.
_x;
1278 float xMax = globalBoundingBox.
_max.
_x;
1279 float yMin = globalBoundingBox.
_min.
_y;
1280 float yMax = globalBoundingBox.
_max.
_y;
1281 float zMin = globalBoundingBox.
_min.
_z;
1282 float zMax = globalBoundingBox.
_max.
_z;
1283 float xDist = max(abs(xMin), abs(xMax)) * 2;
1284 float yDist = max(abs(yMin), abs(yMax)) * 2;
1285 float zDist = max(abs(zMin), abs(zMax)) * 2;
1288 NxReal fromTop[3] = { 0, 500, 0 };
1289 NxReal toTop[3] = { 0, 0, 0 };
1290 NxReal upTop[3] = { 0, 0, -1 };
1295 NxReal fromLeft[3] = { -500, 0, 0 };
1296 NxReal toLeft[3] = { 0, 0, 0 };
1297 NxReal upLeft[3] = { 0, 1, 0 };
1301 NxReal fromFront[3] = { 0, 0, 500 };
1302 NxReal toFront[3] = { 0, 0, 0 };
1303 NxReal upFront[3] = { 0, 1, 0 };
1307 NxReal fromPersp[3] = { 0, 1000, 1000 };
1308 NxReal toPersp[3] = { 0, 0, 0 };
1309 NxReal upPersp[3] = { 0, 1, 0 };
1315 NxReal fromFree[3] = { 0, 0, 0 };
1316 NxReal toFree[3] = { 0, 0, 0.1 };
1317 NxReal upFree[3] = { 0, 1, 0 };
1348 glMatrixMode(GL_MODELVIEW);
1431 extX.
x = org.
x + dist;
1436 extY.
z = org.
z - dist;
1438 extZ.
y = org.
y + dist;
1463 switch (pEvent->key())
1477 case Qt::Key_C:
if (pEvent->modifiers() == Qt::ControlModifier) {
copy(); }
1481 case Qt::Key_F5:
fit();
break;
1482 default: TYApplication::sendEvent(
_pView, pEvent);
1488 switch (pEvent->key())
1491 default: TYApplication::sendEvent(
_pView, pEvent);
1502 QPoint curPos =
_pView->mapFromGlobal(QCursor::pos());
1505 float* pos =
new float[3];
1516 QString msg(
"pos : (%1, %2, %3)");
1518 msg = msg.arg(pos[0], 0,
'f', 2).arg(-pos[2], 0,
'f', 2).arg(pos[1], 0,
'f', 2);
1528 QString msg = QString(
"camera pos : (%1, %2, %3)").arg(x).arg(-z).arg(y);
1554 case TopView: ret[1] = 0.0;
break;
1555 case LeftView: ret[0] = 0.0;
break;
1577 TYApplication::sendEvent(
_pView, pEvent);
1603 TYPreferenceManager::loadGeometryFromPreferences(metaObject()->className(),
this);
1614 TYPreferenceManager::saveGeometryToPreferences(metaObject()->className(),
this);
1649 int gridXMax =
_pView->width();
1650 int gridYMax =
_pView->height();
1651 if (gridXMax == 0) { gridXMax = 100; }
1652 if (gridYMax == 0) { gridYMax = 100; }
1663 if ((pt1.
_x != pt2.
_x) || (pt1.
_y != pt2.
_y) || (pt1.
_z != pt2.
_z))
1675 if ((pt1.
_x != pt2.
_x) || (pt1.
_y != pt2.
_y) || (pt1.
_z != pt2.
_z))
1687 _pElement->getGraphicObject()->update(force);
1730 rendererColor[0] = r / 255;
1731 rendererColor[1] = g / 255;
1732 rendererColor[2] = b / 255;
1736 float r = rendererColor[0] * 255;
1737 float g = rendererColor[1] * 255;
1738 float b = rendererColor[2] * 255;
1749 gridColor[0] = r / 255;
1750 gridColor[1] = g / 255;
1751 gridColor[2] = b / 255;
1755 float r = gridColor[0] * 255;
1756 float g = gridColor[1] * 255;
1757 float b = gridColor[2] * 255;
1766 fontColor[0] = r / 255;
1767 fontColor[1] = g / 255;
1768 fontColor[2] = b / 255;
1772 float r = fontColor[0] * 255;
1773 float g = fontColor[1] * 255;
1774 float b = fontColor[2] * 255;
1784 float intensity = 0.83f;
1794 if (intensity < 0.1f) { intensity = 0.1f; }
1798 float precisPick = 3.0;
1811 float zoomStep = 0.2f;
1838 int mouseLeftButtonFunct2D = 1;
1849 switch (mouseLeftButtonFunct2D)
1856 int mouseRightButtonFunct2D = 0;
1859 mouseRightButtonFunct2D = TYPreferenceManager::getInt(
TYDIRPREFERENCEMANAGER,
"MouseRightButtonFunct2D");
1866 switch (mouseRightButtonFunct2D)
1874 int mouseMiddleButtonFunct2D = 0;
1877 mouseMiddleButtonFunct2D = TYPreferenceManager::getInt(
TYDIRPREFERENCEMANAGER,
"MouseMiddleButtonFunct2D");
1881 TYPreferenceManager::setInt(
TYDIRPREFERENCEMANAGER,
"MouseMiddleButtonFunct2D", mouseMiddleButtonFunct2D);
1884 switch (mouseMiddleButtonFunct2D)
1893 int mouseLeftButtonFunct3D = 3;
1903 switch (mouseLeftButtonFunct3D)
1913 int mouseRightButtonFunct3D = 0;
1916 mouseRightButtonFunct3D = TYPreferenceManager::getInt(
TYDIRPREFERENCEMANAGER,
"MouseRightButtonFunct3D");
1923 switch (mouseRightButtonFunct3D)
1933 int mouseMiddleButtonFunct3D = 2;
1936 mouseMiddleButtonFunct3D = TYPreferenceManager::getInt(
TYDIRPREFERENCEMANAGER,
"MouseMiddleButtonFunct3D");
1940 TYPreferenceManager::setInt(
TYDIRPREFERENCEMANAGER,
"MouseMiddleButtonFunct3D", mouseMiddleButtonFunct3D);
1943 switch (mouseMiddleButtonFunct3D)
1954 int mouseShiftLeftButtonFunct2D = 1;
1957 mouseShiftLeftButtonFunct2D = TYPreferenceManager::getInt(
TYDIRPREFERENCEMANAGER,
"MouseShiftLeftButtonFunct2D");
1961 TYPreferenceManager::setInt(
TYDIRPREFERENCEMANAGER,
"MouseShiftLeftButtonFunct2D", mouseShiftLeftButtonFunct2D);
1964 switch (mouseShiftLeftButtonFunct2D)
1972 int mouseShiftRightButtonFunct2D = 0;
1975 mouseShiftRightButtonFunct2D = TYPreferenceManager::getInt(
TYDIRPREFERENCEMANAGER,
"MouseShiftRightButtonFunct2D");
1979 TYPreferenceManager::setInt(
TYDIRPREFERENCEMANAGER,
"MouseShiftRightButtonFunct2D", mouseShiftRightButtonFunct2D);
1982 switch (mouseShiftRightButtonFunct2D)
1991 int mouseShiftLeftButtonFunct3D = 1;
1994 mouseShiftLeftButtonFunct3D = TYPreferenceManager::getInt(
TYDIRPREFERENCEMANAGER,
"MouseShiftLeftButtonFunct3D");
1998 TYPreferenceManager::setInt(
TYDIRPREFERENCEMANAGER,
"MouseShiftLeftButtonFunct3D", mouseShiftLeftButtonFunct3D);
2001 switch (mouseShiftLeftButtonFunct3D)
2011 int mouseShiftRightButtonFunct3D = 2;
2014 mouseShiftRightButtonFunct3D = TYPreferenceManager::getInt(
TYDIRPREFERENCEMANAGER,
"MouseShiftRightButtonFunct3D");
2018 TYPreferenceManager::setInt(
TYDIRPREFERENCEMANAGER,
"MouseShiftRightButtonFunct3D", mouseShiftRightButtonFunct3D);
2021 switch (mouseShiftRightButtonFunct3D)
2074 double value = vect.
norme();
2076 QString max = QString().setNum(value * 10,
'f', 1);
2077 QString mid = QString().setNum(value * 10 / 2,
'f', 1);
void setMiddleButtonFunction3D(void(TYCameraEditor::*function)())
virtual void focusInEvent(QFocusEvent *pEvent)
QGroupBox * _groupBoxProjet
void setXCoord(int xCoord)
TYCameraEditor * _pCameraEditor
Gere la camera.
QCheckBox * _checkBoxAuteurProjet
QToolButton * _pSetCameraCoordinatesBtn
Bouton de specification des coordonnees de la camera.
void setGridDimY(const float gridDimY)
QToolButton * _pShowSourcesBtn
Bouton pour l'affichage des sources ponctuelles.
outil de mesure des distances
virtual void enterEvent(QEvent *pEvent)
void setYCoord(int yCoord)
QString getComment() const
Get des commentaires.
gestion de la position selon les modes 'moving', 'rotation', 'edition'
void getTranslation(double &x, double &y, double &z)
OPoint3D _max
Maximal coordinates of the OBox.
gestion des elements selectionnes par picking (fichier header)
static bool _gDrawNormals
Indique si les normals doivent etre visible.
static bool _gVisible
Indique si toutes les instances sont visibles.
void showNormals(bool show)
void setSnapGridActive(bool state)
int _curViewType
Le type de la vue courante.
void setTexts(const std::string &text0, const std::string &text1, const std::string &text2)
TYRenderWindowInteractor * _pView
La fenetre graphique.
Gestion de l'edition en mode camera.
bool isElementInCurrentProjet()
void setCameraCoordinates()
virtual void init()
Appeler avant l'utilisation de l'editor.
void init(int width, int height)
void showPlafond(bool show)
void eltModified(LPTYElement pElt)
void setTranslation(double x, double y, double z)
QCheckBox * _checkBoxNomBatiment
OGLLineElement * _pOGLLineElementY
Representation graphique d'une source lineique (fichier header)
QToolButton * _pScreenShotBtn
Bouton pour effectuer une capture d'ecran.
QComboBox * _pRenderModeBox
Combo box pour le mode de rendu.
virtual void updateView(bool clipping=true, bool axesAndGrid=true)
QCheckBox * _checkBoxNomProjet
QCheckBox * _checkBoxCommentCalcul
QLineEdit * _lineEditTitre
void setPoint2(const OPoint3D &point2)
static bool _gVisible
Indique si toutes les instances sont visibles.
Boite de dialogue des parametres d'impression (fichier header)
void setWheelStep(float step)
virtual void setViewType(int view)
bool _showScale
Indique si on affiche ou pas l'echelle.
bool _showSources
Indique si on affiche ou pas les sources ponctuelles.
bool _showRays
Indique si on affiche ou pas les rayons.
#define TYDIRPREFERENCEMANAGER
gestion de l'element actionne par picking (fichier header)
TYPositionEditor * _pPositionEditor
Editor pour deplacer les elements.
void setFont(const QString &qsFontPath)
void setGridStep(const float gridStep)
Repositionnement de la camera en fonction de coordonnees specifiees.
virtual ~TYModelerFrame()
classe de definition d'un projet.
virtual void keyPressEvent(QKeyEvent *pEvent)
bool _showPlafond
Indique si on affiche ou masque les normals.
static NxVec3 worldToDisplay(NxVec3 world)
bool askForResetResultat()
Previent l'utilisateur que le resultat va etre efface, si celui-ci est valide.
QToolButton * _pGridBtn
Bouton d'activation de la grille.
virtual void setEditorMode(int mode)
pour l'application Tympan (fichier header)
Le role de cette classe est limite a emettre des signaux pouvant etre utilise pour interagir sur le r...
OGLCamera * getActiveCamera()
void setLeftButtonFunction2D(void(TYCameraEditor::*function)())
OGLLineElement * _pOGLLineElementX
Axes X et Y de la grille.
virtual void close()
Appeler apres l'utilisation de l'editor.
void setBackground(double *bgColor)
void setShowGridXY(bool bShow)
double norme() const
Computes the length of this vector.
void updateDisplayList(void)
void setTextToDisplay(const QString &qsText)
static NxVec3 displayToWorld(NxVec3 display)
QComboBox * _pViewTypeBox
Combo box pour la selection de la camera courante.
void setFromToUp(NxReal *_from, NxReal *_to, NxReal *_up)
void useHighlight(bool state)
QString getDateModif() const
Get de la date de modification.
virtual void keyReleaseEvent(QKeyEvent *pEvent)
virtual void showEvent(QShowEvent *pEvent)
OGLLineElement * _pOGLLineElementAxeX
La geometrie des Axes.
float _gridStep
Pas de la grille.
QCheckBox * _checkBoxCommentProjet
void setGridDimX(const float gridDimX)
void setLeftButtonFunction3D(void(TYCameraEditor::*function)())
virtual void leaveEvent(QEvent *pEvent)
void setRightButtonFunction3D(void(TYCameraEditor::*function)())
bool _editorModeAccepted
Indique si le mode d'edition a ete traite.
void setPickPointPrecision(float precision)
QStatusBar * _pStatusBar
Barre d'etat.
Classe generique pour une fenetre de modeleur (fichier header)
float _gridDimY
Dimension de la grille en Y.
QCheckBox * _checkBoxCatMachine
void setCoords(double x, double y, double z)
Sets the coordinates as an array of double.
TYActionManager _actionManager
Pour la gestion de l'historique.
OGLTextElement * _pOGLTextElement
Label 2D pour afficher le type de la vue.
TYPickEditor * _pPickEditor
Gere le menu contextuel.
virtual void disconnect()
Deconnecte cet editor a l'interactor associe.
OGLGridElement * _pOGLGridElement
QGroupBox * _groupBoxMachine
void setFontColor(const OColor &oFontColor)
OGLTextElement * _pOGLTextElementLabelX
void setWireframeOnMovingCamera(bool state)
void setPickTolerance(float tolerance)
TYModelerFrame(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=0)
void init(int index, OPoint3D position, float intensity)
TYElement * getParent() const
virtual void closeEvent(QCloseEvent *pEvent)
QToolButton * _pShowRaysBtn
Bouton pour l'affichage des rayons calcules par le lance de rayons.
void showInfos(bool state)
OBox getGlobalBoundingBox()
void setPosition(const OPoint3D &position)
gestion de l'element actionne par picking
void setMiddleButtonFunction2D(void(TYCameraEditor::*function)())
QToolButton * _pShowScale
Bouton pour l'affichage de l'echelle.
TYPickEditor * getPickEditor()
TYOpenGLRenderer * getRenderer()
void updateElementGraphic(bool force=false)
double _y
y coordinate of OCoord3D
void setActiveCamera(OGLCamera *pCamera)
double _x
x coordinate of OCoord3D
gestion de la position selon les modes 'moving', 'rotation', 'edition' (fichier header) ...
OGLCamera * _pOGLCameras[NbOfViews]
Les cameras pour chaque type de vue.
QString getDateCreation() const
Set/Get de la date de creation.
int _lastRenderMode
Le dernier mode de rendu courant.
void setHistorySize(int size)
Definit la taille de l'historique.
QString getCommentaire() const
void stopMovingRenderMode()
void resetZoom(int w=-1, int h=-1)
OPoint3D _min
Minimal coordinates of the OBox.
QToolButton * _pSnapGridBtn
Bouton d'activation de la grille magnetique.
TYOpenGLRenderer * getRenderer()
OGLLineElement * _pOGLLineElementAxeY
QToolButton * _pShowPlafondBtn
Bouton pour l'affichage des normals.
void setFont(const QString &qsFontPath)
bool _showGrid
Indique si on affiche ou non la grille.
OGLLineElement * _pOGLLineElementAxeZ
LPTYProjet getCurProjet()
Set/Get du projet courant.
QString getComment() const
Get des commentaires.
virtual void connect()
Connecte cet editor a l'interactor associe.
gestion de l'edition de la camera (fichier header)
virtual void setRenderMode(int mode, bool bUpdateGL)
bool _showNormals
Indique si on affiche ou masque les normals.
OGLTextElement * _pOGLTextElementLabelZ
virtual const char * getClassName() const
void setColor(const OColor &oColor)
void setIntensity(const float intensity)
OGLScalarBarElement * _pOGLScalarBarElement
Objet graphique pour la representation de l'echelle.
void editorModeChanged(int mode)
T * _pObj
The real pointer, must derived IRefCount.
gestion des elements selectionnes par picking
bool _snapGridActive
Indique si on active ou non la grille magnetique.
int getHistorySize()
Retourne la taille de l'historique.
Repositionnement de la camera en fonction de coordonnees specifiees (fichier header) ...
void setLineWidth(float lineWidth)
QCheckBox * _checkBoxNomCalcul
QString getAuteur() const
Get du nom de l'auteur.
void setColor(const OColor &oColor)
int _curRenderMode
Le mode de rendu courant.
void startMovingRenderMode()
virtual void setRenderModeSlot(int mode)
void setShiftLeftButtonFunction3D(void(TYCameraEditor::*function)())
void setSizes(float width, float height)
QCheckBox * _checkBoxDateCalcul
void showScale(bool show)
QLineEdit * _lineEditPied
void setShowGridXZ(bool bShow)
LPTYCalcul getCurrentCalcul()
Set/Get du pointeur du Calcul courant.
QCheckBox * _checkBoxModelMachine
LPTYElement _pElement
Un pointeur sur l'element a editer.
virtual void mouseMoveEvent(QMouseEvent *pEvent)
static bool _gVisible
Indique si toutes les instances sont visibles.
QGridLayout * _pLayout
Le layout de cette frame.
void removeOGLElement(OGLElement *pOGLElement)
OBox getBoundingBox(TYElement *pElement)
void setDisplayPosition(double displayPositionX, double displayPositionY)
static void snapToGrid(float &x, float &y, float &z)
Methode utilitaire qui adapte les coordonnees d'un point pour que celui-ci soit aligne avec la grille...
void setZCoord(int zCoord)
void setEditorModeToCamera()
classe graphique pour un element de base
void setGridLinesActorsVisibility(bool showGridXY, bool showGridXZ, bool showGridZY)
static bool _gDrawPlafond
Indique si les plafonds doivent etre visible.
void viewTypeChanged(int)
void mouseMoved(int x, int y, Qt::MouseButtons button, Qt::KeyboardModifiers state)
QGroupBox * _groupBoxSite
QBoxLayout * _pCtrlLayout
Le layout ou se trouvent les boutons, etc.
virtual bool computeCurPos(int x, int y, float *pos)
LPTYSiteNode getSite()
Get du site.
virtual void computeBoundingBox()
void setAngleStep(float step)
void setShiftRightButtonFunction2D(void(TYCameraEditor::*function)())
QString getModele() const
QLineEdit * _lineEditTete
virtual void resizeEvent(QResizeEvent *pEvent)
OGLLightElement * _pLightElement
La lumiere par default.
void setDistanceStep(NxReal _magnitudeStepUp, NxReal _magnitudeStepFront, NxReal _magnitudeStepLeft)
double _z
z coordinate of OCoord3D
Representation graphique d'une surface de source (fichier header)
void setPoint1(const OPoint3D &point1)
void setShiftLeftButtonFunction2D(void(TYCameraEditor::*function)())
virtual QString getName() const
bool askForResetResultat()
virtual void updatePreferences()
bool _wireframeOnMovingCamera
Indique si on passe en rendu wireframe lors de deplacement de camera.
int _lastEditorMode
Pour conserver le dernier mode d'edition.
void setShowGridZY(bool bShow)
void setNavigationOnViewType(int view)
Switch auto entre navi 2D ou 3D.
QString getDateModif() const
Get de la date de modification.
QString getConstructeur() const
bool isInSelection(TYUUID id)
Test si l'element est present dans la selection de ce Calcul.
TYApplication * getTYApp()
Retourne le pointeur sur l'application.
void setColor(const OColor &oColor)
QCheckBox * _checkBoxConstrMachine
void usePopup(bool state)
void showSources(bool show)
bool isElementInCurrentCalcul()
QString getDateCreation() const
Get de la date de creation.
NxReal distance(const NxVec3 &) const
gestion de l'interaction entre la vue graphique (2D ou 3D) et le clavier et la souris (fichier header...
QGroupBox * _groupBoxCalcul
TYCalculManager * getCalculManager()
Get du gestionnaire de calculs.
QCheckBox * _checkBoxNomMachine
void setShiftRightButtonFunction3D(void(TYCameraEditor::*function)())
void setRightButtonFunction2D(void(TYCameraEditor::*function)())
outil de mesure des distances (fichier header)
virtual void wheelEvent(QWheelEvent *pEvent)
TYElementPicker * _pPicker
Pour le picking.
TYDistanceEditor * _pDistanceEditor
Outils pour mesurer.
QCheckBox * _checkBoxNomSite
QToolButton * _pShowNormalsBtn
Bouton pour l'affichage des normals.
TYAbstractSceneEditor * _pCurrentEditor
L'editor courant.
QGroupBox * _groupBoxBatiment
classe pour une boite de dialogue des parametres d'impression.
void setVisibility(bool bVisible)
QCheckBox * _checkBoxDateProjet
OGLTextElement * _pOGLTextElementLabelY
float _gridDimX
Dimension de la grille en X.