15 #ifndef _MAINWINDOW_H_ 16 #define _MAINWINDOW_H_ 18 #include <QMainWindow> 32 enum EventType { EventFullUpdate = QEvent::User, EventGuiShow,
33 EventStepUpdate, EventFinalUpdate, EventInstantKill, EventSet2DCam };
37 bool event(QEvent* e);
38 void keyPressEvent(QKeyEvent* e);
39 void keyReleaseEvent(QKeyEvent* e);
40 inline bool pauseRequest() {
return mRequestPause && !mRequestClose; }
41 inline bool closeRequest() {
return mRequestClose; }
42 void setPauseStatus(
bool v);
43 void stepReset(
bool fullUpdate) {
if (mStep == 1 || (mStep == 2 && fullUpdate)) {mRequestPause =
true; mStep = 0;} }
44 void requestClose() { mRequestClose =
true; }
45 void setStep(
int f,
float time);
46 void setBackground(
Mesh *m) { emit setBackgroundMesh(m); }
53 void addControl(
void* ctrl);
54 void screenshot(QString file);
55 void clickLine(QPoint pos,
float p0,
float p1,
float p2,
float q0,
float q1,
float q2);
62 void nextVec3Display();
63 void nextPartDisplay();
64 void nextMeshDisplay();
65 void toggleHideGrids();
67 void setCamPos(
float x,
float y,
float z);
68 void setCamRot(
float x,
float y,
float z);
69 void windowSize(
int w,
int h);
72 void painterEvent(
int e,
int param=0);
74 void setBackgroundMesh(
Mesh* bgr);
79 bool mPaused, mRequestPause, mRequestClose;
82 QAction *mAcPlay, *mAcPause;
83 std::vector<Painter*> mPainter;
84 std::vector<CustomControl*> mCtrls;
86 QVBoxLayout* mPainterLayout;
90 QGraphicsScene *mKbwScene;
91 QGraphicsView *mKbwView;
92 QGraphicsPixmapItem *mKbwPixmap;
Definition: commonkernels.h:22
Definition: mainwindow.h:28
Triangle mesh class.
Definition: mesh.h:126