22 #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>
89 #define TR(id) OLocalizator::getString("TYModelerFrame", (id))
90 #define IMG(id) OLocalizator::getPicture("TYModelerFrame", (id))
95 static double gridColor[] = {0.59, 0.41, 0.42};
96 static double fontColor[] = {0.1, 0.43, 0.37};
97 static double rendererColor[] = {0.91, 0.91, 0.91};
100 : QWidget(parent, f), _actionManager(10)
104 setAttribute(Qt::WA_DeleteOnClose);
123 setFocusPolicy(StrongFocus);
126 setMouseTracking(
true);
147 void (QComboBox::*_qComboBox_activated)(int) = &QComboBox::activated;
170 QToolButton* pFitBtn =
new QToolButton(
this);
171 pFitBtn->setIcon(QPixmap(
IMG(
"id_icon_fit_btn")));
172 pFitBtn->setText(
TR(
"id_fit_btn"));
173 pFitBtn->setToolTip(
TR(
"id_fit_btn"));
174 pFitBtn->setFixedSize(24, 24);
225 QToolButton* pEditEltBtn =
new QToolButton(
this);
226 pEditEltBtn->setIcon(QPixmap(
IMG(
"id_icon_editeelt_btn")));
227 pEditEltBtn->setText(
TR(
"id_editelt_btn"));
228 pEditEltBtn->setToolTip(
TR(
"id_editelt_btn"));
229 pEditEltBtn->setFixedSize(24, 24);
245 QToolButton* pCopyBtn =
new QToolButton(
this);
246 pCopyBtn->setIcon(QPixmap(
IMG(
"id_icon_copy_btn")));
247 pCopyBtn->setText(
TR(
"id_copy_btn"));
248 pCopyBtn->setToolTip(
TR(
"id_copy_btn"));
249 pCopyBtn->setFixedSize(24, 24);
315 NxReal fromTop[3] = {0, 500, 0};
316 NxReal toTop[3] = {0, 0, 0};
317 NxReal upTop[3] = {0, 0, -1};
320 NxReal fromLeft[3] = {-500, 0, 0};
321 NxReal toLeft[3] = {0, 0, 0};
322 NxReal upLeft[3] = {0, 1, 0};
325 NxReal fromFront[3] = {0, 0, 500};
326 NxReal toFront[3] = {0, 0, 0};
327 NxReal upFront[3] = {0, 1, 0};
330 NxReal fromPersp[3] = {0, 10000, 10000};
331 NxReal toPersp[3] = {0, 0, 0};
332 NxReal upPersp[3] = {0, 1, 0};
335 NxReal fromFree[3] = {0, 0, 0};
336 NxReal toFree[3] = {0, 0, 0.1};
337 NxReal upFree[3] = {0, 1, 0};
358 oColor.
r = fontColor[0];
359 oColor.
g = fontColor[1];
360 oColor.
b = fontColor[2];
490 void (QComboBox::*_qComboBox_activated)(int) = &QComboBox::activated;
552 return QWidget::close();
580 if (pParent ==
getTYApp()->getCurProjet())
615 bool showGridXY =
false;
616 bool showGridXZ =
false;
617 bool showGridZY =
false;
625 labelStr =
TR(
"id_top_view");
630 labelStr =
TR(
"id_left_view");
635 labelStr =
TR(
"id_front_view");
640 labelStr =
TR(
"id_3d_view");
645 labelStr =
TR(
"id_free_view");
668 _pElement->getGraphicObject()->update(
true);
696 glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
700 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
704 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
706 else if (mode ==
Flat)
708 glShadeModel(GL_FLAT);
712 glShadeModel(GL_SMOOTH);
717 if (bUpdateGL ==
true)
813 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
821 _pElement->getGraphicObject()->update(
true);
829 TYApplication::restoreOverrideCursor();
841 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
848 _pElement->getGraphicObject()->update(
true);
856 TYApplication::restoreOverrideCursor();
869 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
876 _pElement->getGraphicObject()->update(
true);
884 TYApplication::restoreOverrideCursor();
897 TYApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
904 _pElement->getGraphicObject()->update(
true);
912 TYApplication::restoreOverrideCursor();
929 double x = NAN, y = NAN, z = NAN;
934 pSetCameraCoordinates->exec();
936 if (pSetCameraCoordinates->result() == QDialog::Accepted)
953 QMenu* pMenu =
new QMenu(NULL);
955 QHash<QAction*, QString> formats;
957 for (
unsigned int i = 0; i < QImageWriter::supportedImageFormats().count(); i++)
959 QString str = QString(QImageWriter::supportedImageFormats().at(i));
960 formats.insert(pMenu->addAction(QString(
"%1...").arg(str)), QString(str));
963 pMenu->setMouseTracking(
true);
968 QString format = formats[
id];
971 QFileDialog::getSaveFileName(
this,
"", QString(), QString(
"*.%1").arg(format.toLower()));
972 if (!filename.isEmpty())
975 if (!filename.endsWith(format.toLower()))
977 filename +=
"." + format.toLower();
983 qApp->processEvents();
986 QImage img =
_pView->grabFrameBuffer();
989 QPixmap pix = QPixmap::fromImage(img);
990 pix.save(filename, format.toLatin1().data(), 80);
1000 QImage img =
_pView->grabFrameBuffer();
1003 QClipboard* clipboard = QApplication::clipboard();
1004 clipboard->setImage(img);
1019 if (pProjet == NULL)
1023 if (pCalcul == NULL)
1044 if (pDialog->exec() == QDialog::Accepted)
1046 QPrinter* printer =
new QPrinter();
1048 QPrintDialog dialog(printer,
this);
1051 QPainter paint(printer);
1053 double w = double(printer->width());
1054 double h = double(printer->height());
1055 double scalew = w / 700;
1056 double scaleh = h / 700;
1059 QImage img =
_pView->grabFrameBuffer();
1060 img = img.scaled(
int(w * 9 / 10),
int(h * 2 / 3), Qt::KeepAspectRatio, Qt::SmoothTransformation);
1061 int x = int(
double(printer->width() - img.width()) / 2);
1062 int y = int(
double(printer->height() - img.height()) * 1 / 3);
1063 QPixmap pm = QPixmap::fromImage(img);
1064 paint.drawPixmap(x, y, pm);
1066 paint.setFont(QFont(
"Times", (
int)(10 * scaleh)));
1068 int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditTete->text()) / 2);
1071 mid = int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditPied->text()) / 2);
1072 paint.drawText(mid, printer->height() - 20, pDialog->
_lineEditPied->text());
1074 paint.setFont(QFont(
"Times", (
int)(15 * scaleh), QFont::Bold));
1076 int(w / 2) - int(paint.fontMetrics().horizontalAdvance(pDialog->
_lineEditTitre->text()) / 2);
1079 x = int(50 * scalew);
1080 int x1 = int(w / 2);
1081 y = int(
double(printer->height()) * 2 / 3 + 20 * scaleh);
1082 int stepy = int(10 * scaleh);
1083 paint.setFont(QFont(
"Times", (
int)(10 * scaleh)));
1089 paint.drawText(x, y,
TR(
"id_print_nom_projet"));
1090 paint.drawText(x1, y, pProjet->
getName());
1095 paint.drawText(x, y,
TR(
"id_print_auteur_projet"));
1096 paint.drawText(x1, y, pProjet->
getAuteur());
1101 paint.drawText(x, y,
TR(
"id_print_date_creation"));
1104 paint.drawText(x, y,
TR(
"id_print_date_modif"));
1110 paint.drawText(x, y,
TR(
"id_print_comment"));
1111 paint.drawText(x1, y, pProjet->
getComment());
1118 y += int(
double(stepy) * 1.5);
1121 paint.drawText(x, y,
TR(
"id_print_nom_calcul"));
1122 paint.drawText(x1, y, pCalcul->
getName());
1127 paint.drawText(x, y,
TR(
"id_print_date_creation"));
1130 paint.drawText(x, y,
TR(
"id_print_date_modif"));
1136 paint.drawText(x, y,
TR(
"id_print_comment"));
1137 paint.drawText(x1, y, pCalcul->
getComment());
1144 y += int(
double(stepy) * 1.5);
1151 paint.drawText(x, y,
TR(
"id_print_nom_batiment"));
1152 paint.drawText(x1, y, pBatiment->
getName());
1160 paint.drawText(x, y,
TR(
"id_print_nom_machine"));
1161 paint.drawText(x1, y, pMachine->
getName());
1166 paint.drawText(x, y,
TR(
"id_print_constr"));
1172 paint.drawText(x, y,
TR(
"id_print_model"));
1173 paint.drawText(x1, y, pMachine->
getModele());
1178 paint.drawText(x, y,
TR(
"id_print_cat"));
1179 paint.drawText(x1, y, QString().setNum(pMachine->
getCategorie()));
1184 paint.drawText(x, y,
TR(
"id_print_comment"));
1191 if (pSite !=
nullptr)
1195 paint.drawText(x, y,
TR(
"id_print_nom_site"));
1196 paint.drawText(x1, y, pSite->
getName());
1211 if (
_pElement->edit(
this) == QDialog::Accepted)
1217 _pElement->getGraphicObject()->update(
true);
1230 if (pTYElementGraphic != NULL)
1233 boundingBox = pTYElementGraphic->
GetBox();
1241 OBox globalBoundingBox;
1246 if (pTYProjet !=
nullptr)
1249 pTYElement = pTYSiteNode;
1254 return globalBoundingBox;
1259 int visibilityStates[9];
1290 float xMin = globalBoundingBox.
_min.
_x;
1291 float xMax = globalBoundingBox.
_max.
_x;
1292 float yMin = globalBoundingBox.
_min.
_y;
1293 float yMax = globalBoundingBox.
_max.
_y;
1294 float zMin = globalBoundingBox.
_min.
_z;
1295 float zMax = globalBoundingBox.
_max.
_z;
1296 float xDist = max(abs(xMin), abs(xMax)) * 2;
1297 float yDist = max(abs(yMin), abs(yMax)) * 2;
1298 float zDist = max(abs(zMin), abs(zMax)) * 2;
1301 NxReal fromTop[3] = {0, 500, 0};
1302 NxReal toTop[3] = {0, 0, 0};
1303 NxReal upTop[3] = {0, 0, -1};
1308 NxReal fromLeft[3] = {-500, 0, 0};
1309 NxReal toLeft[3] = {0, 0, 0};
1310 NxReal upLeft[3] = {0, 1, 0};
1314 NxReal fromFront[3] = {0, 0, 500};
1315 NxReal toFront[3] = {0, 0, 0};
1316 NxReal upFront[3] = {0, 1, 0};
1320 NxReal fromPersp[3] = {0, 1000, 1000};
1321 NxReal toPersp[3] = {0, 0, 0};
1322 NxReal upPersp[3] = {0, 1, 0};
1328 NxReal fromFree[3] = {0, 0, 0};
1329 NxReal toFree[3] = {0, 0, 0.1};
1330 NxReal upFree[3] = {0, 1, 0};
1360 glMatrixMode(GL_MODELVIEW);
1443 extX.
x = org.
x + dist;
1448 extY.
z = org.
z - dist;
1450 extZ.
y = org.
y + dist;
1475 switch (pEvent->key())
1510 case Qt::Key_Control:
1514 if (pEvent->modifiers() == Qt::ControlModifier)
1528 TYApplication::sendEvent(
_pView, pEvent);
1534 switch (pEvent->key())
1536 case Qt::Key_Control:
1540 TYApplication::sendEvent(
_pView, pEvent);
1549 QPoint curPos =
_pView->mapFromGlobal(QCursor::pos());
1552 float* pos =
new float[3];
1563 QString msg(
"pos : (%1, %2, %3)");
1565 msg = msg.arg(pos[0], 0,
'f', 2).arg(-pos[2], 0,
'f', 2).arg(pos[1], 0,
'f', 2);
1573 double x = NAN, y = NAN, z = NAN;
1575 QString msg = QString(
"camera pos : (%1, %2, %3)").arg(x).arg(-z).arg(y);
1630 TYApplication::sendEvent(
_pView, pEvent);
1656 TYPreferenceManager::loadGeometryFromPreferences(metaObject()->className(),
this);
1667 TYPreferenceManager::saveGeometryToPreferences(metaObject()->className(),
this);
1701 int gridXMax =
_pView->width();
1702 int gridYMax =
_pView->height();
1721 if ((pt1.
_x != pt2.
_x) || (pt1.
_y != pt2.
_y) || (pt1.
_z != pt2.
_z))
1733 if ((pt1.
_x != pt2.
_x) || (pt1.
_y != pt2.
_y) || (pt1.
_z != pt2.
_z))
1745 _pElement->getGraphicObject()->update(force);
1787 float r = NAN, g = NAN, b = NAN;
1789 rendererColor[0] = r / 255;
1790 rendererColor[1] = g / 255;
1791 rendererColor[2] = b / 255;
1795 float r = rendererColor[0] * 255;
1796 float g = rendererColor[1] * 255;
1797 float b = rendererColor[2] * 255;
1806 float r = NAN, g = NAN, b = NAN;
1808 gridColor[0] = r / 255;
1809 gridColor[1] = g / 255;
1810 gridColor[2] = b / 255;
1814 float r = gridColor[0] * 255;
1815 float g = gridColor[1] * 255;
1816 float b = gridColor[2] * 255;
1823 float r = NAN, g = NAN, b = NAN;
1825 fontColor[0] = r / 255;
1826 fontColor[1] = g / 255;
1827 fontColor[2] = b / 255;
1831 float r = fontColor[0] * 255;
1832 float g = fontColor[1] * 255;
1833 float b = fontColor[2] * 255;
1843 float intensity = 0.83f;
1853 if (intensity < 0.1f)
1860 float precisPick = 3.0;
1873 float zoomStep = 0.2f;
1900 int mouseLeftButtonFunct2D = 1;
1903 mouseLeftButtonFunct2D =
1912 switch (mouseLeftButtonFunct2D)
1923 int mouseRightButtonFunct2D = 0;
1926 mouseRightButtonFunct2D =
1932 mouseRightButtonFunct2D);
1935 switch (mouseRightButtonFunct2D)
1946 int mouseMiddleButtonFunct2D = 0;
1949 mouseMiddleButtonFunct2D =
1955 mouseMiddleButtonFunct2D);
1958 switch (mouseMiddleButtonFunct2D)
1970 int mouseLeftButtonFunct3D = 3;
1973 mouseLeftButtonFunct3D =
1981 switch (mouseLeftButtonFunct3D)
1998 int mouseRightButtonFunct3D = 0;
2001 mouseRightButtonFunct3D =
2007 mouseRightButtonFunct3D);
2010 switch (mouseRightButtonFunct3D)
2027 int mouseMiddleButtonFunct3D = 2;
2030 mouseMiddleButtonFunct3D =
2036 mouseMiddleButtonFunct3D);
2039 switch (mouseMiddleButtonFunct3D)
2058 int mouseShiftLeftButtonFunct2D = 1;
2061 mouseShiftLeftButtonFunct2D =
2067 mouseShiftLeftButtonFunct2D);
2070 switch (mouseShiftLeftButtonFunct2D)
2081 int mouseShiftRightButtonFunct2D = 0;
2084 mouseShiftRightButtonFunct2D =
2090 mouseShiftRightButtonFunct2D);
2093 switch (mouseShiftRightButtonFunct2D)
2105 int mouseShiftLeftButtonFunct3D = 1;
2108 mouseShiftLeftButtonFunct3D =
2114 mouseShiftLeftButtonFunct3D);
2117 switch (mouseShiftLeftButtonFunct3D)
2134 int mouseShiftRightButtonFunct3D = 2;
2137 mouseShiftRightButtonFunct3D =
2143 mouseShiftRightButtonFunct3D);
2146 switch (mouseShiftRightButtonFunct3D)
2207 double value = vect.
norme();
2209 QString max = QString().setNum(value * 10,
'f', 1);
2210 QString mid = QString().setNum(value * 10 / 2,
'f', 1);
2229 QLocale loc = QLocale(QLocale::English);
2231 dialog.setLocale(loc);
2232 dialog.setWindowTitle(title);
2233 dialog.setLabelText(txt);
2234 dialog.setDoubleRange(
min, max);
2235 dialog.setTextValue(QString::number(val));
2236 dialog.setDoubleValue(val);
2237 dialog.setDoubleDecimals(dec);
2238 dialog.setInputMode(QInputDialog::TextInput);
2240 return dialog.doubleValue();
gestion de l'interaction entre la vue graphique (2D ou 3D) et le clavier et la souris (fichier header...
TYApplication * getTYApp()
Retourne le pointeur sur l'application.
pour l'application Tympan (fichier header)
gestion de l'edition de la camera (fichier header)
gestion de zoom par zone selectionnee (fichier obsolete)(fichier header)
outil de mesure des distances (fichier header)
gestion des elements selectionnes par picking (fichier header)
#define TYDIRPREFERENCEMANAGER
OBox getBoundingBox(TYElement *pElement)
Classe generique pour une fenetre de modeleur (fichier header)
gestion de l'element actionne par picking (fichier header)
gestion de la position selon les modes 'moving', 'rotation', 'edition' (fichier header)
Boite de dialogue des parametres d'impression (fichier header)
Repositionnement de la camera en fonction de coordonnees specifiees (fichier header)
Representation graphique d'une source lineique (fichier header)
Representation graphique d'une surface de source (fichier header)
NxReal distance(const NxVec3 &) const
OPoint3D _min
Minimal coordinates of the OBox.
OPoint3D _max
Maximal coordinates of the OBox.
double _y
y coordinate of OCoord3D
double _z
z coordinate of OCoord3D
double _x
x coordinate of OCoord3D
void setCoords(double x, double y, double z)
Sets the coordinates as an array of double.
static NxVec3 displayToWorld(NxVec3 display)
void getTranslation(double &x, double &y, double &z)
static NxVec3 worldToDisplay(NxVec3 world)
void resetZoom(int w=-1, int h=-1)
void setTranslation(double x, double y, double z)
void setFromToUp(NxReal *_from, NxReal *_to, NxReal *_up)
void setDistanceStep(NxReal _magnitudeStepUp, NxReal _magnitudeStepFront, NxReal _magnitudeStepLeft)
void setVisibility(bool bVisible)
void setDisplayPosition(double displayPositionX, double displayPositionY)
void setShowGridXZ(bool bShow)
void setGridDimX(const float gridDimX)
void setShowGridXY(bool bShow)
void setGridDimY(const float gridDimY)
void setColor(const OColor &oColor)
void setShowGridZY(bool bShow)
void setGridStep(const float gridStep)
void setIntensity(const float intensity)
void init(int index, OPoint3D position, float intensity)
void setPoint1(const OPoint3D &point1)
void setColor(const OColor &oColor)
void setLineWidth(float lineWidth)
void setPoint2(const OPoint3D &point2)
void setSizes(float width, float height)
void setTexts(const std::string &text0, const std::string &text1, const std::string &text2)
void setPosition(const OPoint3D &position)
void setFontColor(const OColor &oFontColor)
void setFont(const QString &qsFontPath)
void setColor(const OColor &oColor)
void setTextToDisplay(const QString &qsText)
void setFont(const QString &qsFontPath)
virtual const char * getClassName() const
double norme() const
Computes the length of this vector.
T * _pObj
The real pointer, must derived IRefCount.
virtual void close()
Appeler apres l'utilisation de l'editor.
static void snapToGrid(float &x, float &y, float &z, float &gridMagnStep)
Methode utilitaire qui adapte les coordonnees d'un point pour que celui-ci soit aligne avec la grille...
virtual void disconnect()
Deconnecte cet editor a l'interactor associe.
virtual void init()
Appeler avant l'utilisation de l'editor.
virtual void connect()
Connecte cet editor a l'interactor associe.
int getHistorySize()
Retourne la taille de l'historique.
void setHistorySize(int size)
Definit la taille de l'historique.
LPTYProjet getCurProjet()
Set/Get du projet courant.
TYCalculManager * getCalculManager()
Get du gestionnaire de calculs.
bool askForResetResultat()
Previent l'utilisateur que le resultat va etre efface, si celui-ci est valide.
QString getDateModif() const
Get modification date.
bool isInSelection(TYUUID id)
Tests if the element is present in the selection of this Calculation.
QString getDateCreation() const
Set/Get of creation date.
QString getComment() const
Get comments.
Gestion de l'edition en mode camera.
void setMiddleButtonFunction3D(void(TYCameraEditor::*function)())
void setRightButtonFunction3D(void(TYCameraEditor::*function)())
void setShiftRightButtonFunction3D(void(TYCameraEditor::*function)())
void setLeftButtonFunction2D(void(TYCameraEditor::*function)())
void setNavigationOnViewType(int view)
Switch auto entre navi 2D ou 3D.
void setMiddleButtonFunction2D(void(TYCameraEditor::*function)())
void setRightButtonFunction2D(void(TYCameraEditor::*function)())
void setShiftRightButtonFunction2D(void(TYCameraEditor::*function)())
void setLeftButtonFunction3D(void(TYCameraEditor::*function)())
void setShiftLeftButtonFunction2D(void(TYCameraEditor::*function)())
void setShiftLeftButtonFunction3D(void(TYCameraEditor::*function)())
void setWheelStep(float step)
gestion de zoom par zone selectionnee (obsolete)
outil de mesure des distances
virtual void computeBoundingBox()
static bool _gDrawNormals
Indique si les normals doivent etre visible.
static bool _gDrawPlafond
Indique si les plafonds doivent etre visible.
gestion des elements selectionnes par picking
TYElement * getParent() const
virtual QString getName() const
QString getModele() const
QString getCommentaire() const
QString getConstructeur() const
virtual void wheelEvent(QWheelEvent *pEvent)
QToolButton * _pSnapGridBtn
Bouton d'activation de la grille magnetique.
void setSnapGridActive(bool state)
virtual void closeEvent(QCloseEvent *pEvent)
void updateElementGraphic(bool force=false)
virtual void leaveEvent(QEvent *pEvent)
int _curViewType
Le type de la vue courante.
QStatusBar * _pStatusBar
Barre d'etat.
virtual bool computeCurPos(int x, int y, float *pos)
TYCameraEditor * _pCameraEditor
Gere la camera.
void showScale(bool show)
bool _editorModeAccepted
Indique si le mode d'edition a ete traite.
OGLScalarBarElement * _pOGLScalarBarElement
Objet graphique pour la representation de l'echelle.
QToolButton * _pShowRaysBtn
Bouton pour l'affichage des rayons calcules par le lance de rayons.
virtual void setRenderModeSlot(int mode)
LPTYElement _pElement
Un pointeur sur l'element a editer.
void showPlafond(bool show)
QToolButton * _pShowScale
Bouton pour l'affichage de l'echelle.
virtual void enterEvent(QEvent *pEvent)
TYPositionEditor * _pPositionEditor
Editor pour deplacer les elements.
void setEditorModeToCamera()
TYCameraZoneEditor * _pCameraZoneEditor
Editor pour definir une zone de zoom pour la camera.
OGLTextElement * _pOGLTextElement
Label 2D pour afficher le type de la vue.
virtual void resizeEvent(QResizeEvent *pEvent)
TYAbstractSceneEditor * _pCurrentEditor
L'editor courant.
virtual ~TYModelerFrame()
void editorModeChanged(int mode)
OGLLineElement * _pOGLLineElementAxeX
La geometrie des Axes.
void setGridLinesActorsVisibility(bool showGridXY, bool showGridXZ, bool showGridZY)
QToolButton * _pShowPlafondBtn
Bouton pour l'affichage des normals.
void viewTypeChanged(int)
virtual void setRenderMode(int mode, bool bUpdateGL)
bool _wireframeOnMovingCamera
Indique si on passe en rendu wireframe lors de deplacement de camera.
QToolButton * _pShowNormalsBtn
Bouton pour l'affichage des normals.
virtual void focusInEvent(QFocusEvent *pEvent)
bool _snapGridActive
Indique si on active ou non la grille magnetique.
void setWireframeOnMovingCamera(bool state)
int _lastRenderMode
Le dernier mode de rendu courant.
TYActionManager _actionManager
Pour la gestion de l'historique.
OGLLightElement * _pLightElement
La lumiere par default.
QBoxLayout * _pCtrlLayout
Le layout ou se trouvent les boutons, etc.
virtual void mouseMoveEvent(QMouseEvent *pEvent)
QGridLayout * _pLayout
Le layout de cette frame.
QToolButton * _pShowSourcesBtn
Bouton pour l'affichage des sources ponctuelles.
OGLTextElement * _pOGLTextElementLabelY
virtual void setViewType(int view)
OGLLineElement * _pOGLLineElementX
Axes X et Y de la grille.
QToolButton * _pGridBtn
Bouton d'activation de la grille.
bool isElementInCurrentProjet()
OGLGridElement * _pOGLGridElement
TYRenderWindowInteractor * _pView
La fenetre graphique.
OBox getGlobalBoundingBox()
bool _showPlafond
Indique si on affiche ou masque les normals.
void stopMovingRenderMode()
void showNormals(bool show)
OGLLineElement * _pOGLLineElementAxeZ
QComboBox * _pRenderModeBox
Combo box pour le mode de rendu.
OGLTextElement * _pOGLTextElementLabelX
bool _showGrid
Indique si on affiche ou non la grille.
TYModelerFrame(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=Qt::SubWindow)
bool _showNormals
Indique si on affiche ou masque les normals.
void setCameraCoordinates()
OGLTextElement * _pOGLTextElementLabelZ
bool isElementInCurrentCalcul()
bool askForResetResultat()
bool _showScale
Indique si on affiche ou pas l'echelle.
void eltModified(LPTYElement pElt)
int _lastEditorMode
Pour conserver le dernier mode d'edition.
QToolButton * _pSetCameraCoordinatesBtn
Bouton de specification des coordonnees de la camera.
int _curRenderMode
Le mode de rendu courant.
OGLLineElement * _pOGLLineElementAxeY
float _gridDimX
Dimension de la grille en X.
float _gridDimY
Dimension de la grille en Y.
void startMovingRenderMode()
TYElementPicker * _pPicker
Pour le picking.
OGLCamera * _pOGLCameras[NbOfViews]
Les cameras pour chaque type de vue.
float _gridStep
Pas de la grille.
virtual void updatePreferences()
bool _showRays
Indique si on affiche ou pas les rayons.
TYPickEditor * _pPickEditor
Gere le menu contextuel.
OGLLineElement * _pOGLLineElementY
float _gridMagnStep
Pas de la grille magnetique.
QToolButton * _pScreenShotBtn
Bouton pour effectuer une capture d'ecran.
TYPickEditor * getPickEditor()
virtual void keyPressEvent(QKeyEvent *pEvent)
TYDistanceEditor * _pDistanceEditor
Outils pour mesurer.
virtual void setEditorMode(int mode)
virtual void updateView(bool clipping=true, bool axesAndGrid=true)
virtual void showEvent(QShowEvent *pEvent)
virtual void keyReleaseEvent(QKeyEvent *pEvent)
static double getDouble(const QString &title, const QString &txt, double min, double max, double val, bool &ok, int dec=2)
TYOpenGLRenderer * getRenderer()
bool _showSources
Indique si on affiche ou pas les sources ponctuelles.
QComboBox * _pViewTypeBox
Combo box pour la selection de la camera courante.
void updateDisplayList(void)
void addLight(OGLLightElement *pOGLElementLight)
void addOGLElement(OGLElement *pOGLElement)
void removeOGLElement(OGLElement *pOGLElement)
void setBackground(double *bgColor)
void setActiveCamera(OGLCamera *pCamera)
void init(int width, int height)
OGLCamera * getActiveCamera()
gestion de l'element actionne par picking
void usePopup(bool state)
void setPickTolerance(float tolerance)
void useHighlight(bool state)
gestion de la position selon les modes 'moving', 'rotation', 'edition'
void setPickPointPrecision(float precision)
void setAngleStep(float step)
classe pour une boite de dialogue des parametres d'impression.
QGroupBox * _groupBoxSite
QCheckBox * _checkBoxCatMachine
QCheckBox * _checkBoxDateProjet
QCheckBox * _checkBoxNomProjet
QCheckBox * _checkBoxNomBatiment
QCheckBox * _checkBoxNomSite
QCheckBox * _checkBoxDateCalcul
QCheckBox * _checkBoxCommentCalcul
QGroupBox * _groupBoxMachine
QCheckBox * _checkBoxNomCalcul
QGroupBox * _groupBoxCalcul
QLineEdit * _lineEditPied
QLineEdit * _lineEditTete
QCheckBox * _checkBoxCommentProjet
QCheckBox * _checkBoxNomMachine
QCheckBox * _checkBoxModelMachine
QGroupBox * _groupBoxProjet
QGroupBox * _groupBoxBatiment
QLineEdit * _lineEditTitre
QCheckBox * _checkBoxAuteurProjet
QCheckBox * _checkBoxConstrMachine
classe de definition d'un projet.
QString getDateModif() const
Get de la date de modification.
QString getAuteur() const
Get du nom de l'auteur.
QString getComment() const
Get des commentaires.
QString getDateCreation() const
Get de la date de creation.
LPTYSiteNode getSite()
Get du site.
LPTYCalcul getCurrentCalcul()
Set/Get du pointeur du Calcul courant.
static bool _gVisible
Indique si toutes les instances sont visibles.
Le role de cette classe est limite a emettre des signaux pouvant etre utilise pour interagir sur le r...
void mouseMoved(int x, int y, Qt::MouseButtons button, Qt::KeyboardModifiers state)
void showInfos(bool state)
TYOpenGLRenderer * getRenderer()
Repositionnement de la camera en fonction de coordonnees specifiees.
void setZCoord(int zCoord)
void setYCoord(int yCoord)
void setXCoord(int xCoord)
static bool _gVisible
Indique si toutes les instances sont visibles.
static bool _gVisible
Indique si toutes les instances sont visibles.