18 #include <QMainWindow>
23 #include <QFileDialog>
24 #include "../Model/ModelPart.h"
25 #include "../Model/ModelPartList.h"
26 #include "../OptionDialog/optiondialog.h"
27 #include "vtkRenderer.h"
28 #include "vtkGenericOpenGLRenderWindow.h"
29 #include "vtkCamera.h"
30 #include "vtkPolyDataMapper.h"
31 #include "vtkCylinderSource.h"
32 #include "vtkProperty.h"
33 #include "../VR/VRRenderThread.h"
34 #include "../Help_Dialog/help.h"
35 #include <vtkPNGReader.h>
36 #include <vtkImageActor.h>
37 #include <vtkRenderWindowInteractor.h>
38 #include <vtkTexture.h>
39 #include <vtkImageData.h>
41 #include "QtPrintSupport/qprinter.h"
42 #include "QtPrintSupport/qprintdialog.h"
46 #include <vtkShrinkFilter.h>
47 #include <vtkClipDataSet.h>
48 #include <vtkDataSetMapper.h>
49 #include <QColorDialog>
CAD viewer class.
Definition: mainwindow.h:67
vtkSmartPointer< vtkRenderer > renderer
renderer is the vtk renderer
Definition: mainwindow.h:330
void handleRotation_x1()
handles clockwise rotation buttons in the x axis for VR
Definition: mainwindow.cpp:712
void handleRotation_y2()
handles stop rotation buttons in the y axis for VR
Definition: mainwindow.cpp:752
void handleRotation_x2()
handles stop rotation buttons in the x axis for VR
Definition: mainwindow.cpp:722
void rotateModelZ()
this function is used to rotate the model in the vtk viewer in the z axis
Definition: mainwindow.cpp:439
void handleButton()
This function is used to handle a button being pressed.
Definition: mainwindow.cpp:99
void handleTreeClicked()
This function is used to handle a the tree being clicked.
Definition: mainwindow.cpp:149
QString StoredFileName
StoredFileName is the name of the file.
Definition: mainwindow.h:336
void on_actionAdd_New_Item_triggered()
this function is used to add a new child to the tree
Definition: mainwindow.cpp:244
void handleRotation_y3()
handles anti clockwise rotation buttons in the y axis for VR
Definition: mainwindow.cpp:762
void on_actionPrint_triggered()
print image
Definition: mainwindow.cpp:697
double red
Definition: mainwindow.h:341
void ModifyLighting()
change lighting of the render
Definition: mainwindow.cpp:358
void rotateModelX()
this function is used to rotate the model in the vtk viewer in the x axis
Definition: mainwindow.cpp:497
void handleRotation_z3()
handles anti clockwise rotation buttons in the z axis for VR
Definition: mainwindow.cpp:792
Ui::MainWindow * ui
ui is the user interface
Definition: mainwindow.h:326
VRRenderThread * VR_Render
VR_Render is the VR render thread.
Definition: mainwindow.h:334
void on_actionOpen_File_triggered()
This function is used to handle the open file button being pressed.
Definition: mainwindow.cpp:158
int VR_RotationZ
VR_RotationZ is the VR rotation in the z axis.
Definition: mainwindow.h:348
void updateRenderFromTree(const QModelIndex &index)
This function is used to Update the render from the tree.
Definition: mainwindow.cpp:207
vtkSmartPointer< vtkLight > light
light is the vtk light
Definition: mainwindow.h:332
ModelPartList * partList
partList is the list of parts
Definition: mainwindow.h:327
void on_action180Rotate_triggered()
this function is used to flip the objects by 180 degrees
Definition: mainwindow.cpp:608
void changeRotationSpeed()
handles the rotation speed slider
Definition: mainwindow.cpp:802
void on_actionHelp_triggered()
this function opens the help dialog
Definition: mainwindow.cpp:257
double blue
red, green, blue are the rgb values for the colour picker
Definition: mainwindow.h:341
double green
Definition: mainwindow.h:341
void handleRotation_y1()
handles clockwise rotation buttons in the y axis for VR
Definition: mainwindow.cpp:742
void on_actionResetColours_triggered()
this function is used to reset the objects colours
Definition: mainwindow.cpp:573
void ShrinkFilter()
this function is used to apply the shrink filter.
Definition: mainwindow.cpp:633
vtkSmartPointer< vtkGenericOpenGLRenderWindow > renderWindow
renderWindow is the vtk render window
Definition: mainwindow.h:331
double RotationSpeedValue
RotationSpeedValue is the rotation speed value.
Definition: mainwindow.h:343
void on_actionBackground_triggered()
change background colour of the render
Definition: mainwindow.cpp:333
int VR_RotationX
VR_RotationX is the VR rotation in the x axis.
Definition: mainwindow.h:346
void statusUpdateMessage(const QString &message, int timeout)
This function is used to send a message to the status bar.
void on_actionStart_VR_triggered()
start the VR session
Definition: mainwindow.cpp:274
int k
k is a counter for the VR rotation
Definition: mainwindow.h:339
void clipFilterSlider()
handles clip filter
Definition: mainwindow.cpp:841
MainWindow(QWidget *parent=nullptr)
Constructor for the CAD viewer.
Definition: mainwindow.cpp:24
void on_actionReset_triggered()
this function is used to reset the viewer
Definition: mainwindow.cpp:383
void updateRender()
This function is used to Update the render.
Definition: mainwindow.cpp:236
void rotateModelY()
this function is used to rotate the model in the vtk viewer in the y axis
Definition: mainwindow.cpp:468
void on_actionSaveRender_triggered()
Save image of the render.
Definition: mainwindow.cpp:686
int previous_value
previous_value is the previous value of the slider
Definition: mainwindow.h:340
void on_actionStop_VR_triggered()
stop the VR session
Definition: mainwindow.cpp:307
void ClipFilter()
this function is used to apply the clip filter.
Definition: mainwindow.cpp:659
void handleRotation_z1()
handles clockwise rotation buttons in the z axis for VR
Definition: mainwindow.cpp:772
void on_actionResetPosition_triggered()
this function is used to reset the objects position
Definition: mainwindow.cpp:534
void handleButton2()
This function is used to handle a button being pressed.
Definition: mainwindow.cpp:106
void on_actionItem_Options_triggered()
This function is used to handle item options.
Definition: mainwindow.cpp:193
int VR_RotationY
VR_RotationY is the VR rotation in the y axis.
Definition: mainwindow.h:347
void ResetCamera()
This function is used to Reset the camera.
Definition: mainwindow.cpp:199
void FullRotation()
This function is used to set the model part list.
Definition: mainwindow.cpp:620
void handleRotation_x3()
handles anti clockwise rotation buttons in the x axis for VR
Definition: mainwindow.cpp:732
~MainWindow()
Deconstructor for the CAD viewer.
Definition: mainwindow.cpp:93
void handleRotation_z2()
handles stop rotation buttons in the z axis for VR
Definition: mainwindow.cpp:782
bool VR_Running
VR_Running is a bool to check if VR is running.
Definition: mainwindow.h:338
void ColourPicker()
handles the colour picker
Definition: mainwindow.cpp:815
void resetSliders()
this function is used to reset Sliders
Definition: mainwindow.cpp:526
Definition: ModelPartList.h:26
Definition: VRRenderThread.h:34