-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Added Nef_S2 Qt5 visualization #3511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cedricpradalier
wants to merge
3
commits into
CGAL:master
Choose a base branch
from
cedricpradalier:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+805
−8
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#include "CGAL/Nef_S2/Qt_widget_Nef_S2.h" | ||
|
||
namespace CGAL { | ||
Qt_widget_Nef_S2::~Qt_widget_Nef_S2() { | ||
for (size_t i=0;i<object_.size();i++) { | ||
delete object_[i]; | ||
} | ||
object_.clear(); | ||
} | ||
|
||
Qt_widget_Nef_S2::Qt_widget_Nef_S2() : | ||
Qt_widget_OpenGL(300,300,1.5) { | ||
|
||
resize(window_width, window_height); | ||
// this->setContextMenuPolicy(Qt::ActionsContextMenu); | ||
|
||
main = new QMenu; | ||
sub1 = main->addMenu("&Control"); | ||
sub2 = main->addMenu("&Render"); | ||
sub3 = main->addMenu("&Options"); | ||
|
||
QAction * qa; | ||
qa = sub1->addAction("Reset"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotControlMenuReset())); | ||
qa = sub1->addAction("Rotate"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotControlMenuRotate())); | ||
qa = sub1->addAction("Scale"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotControlMenuScale())); | ||
qa = sub1->addAction("Translate in XY"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotControlMenuTranslate())); | ||
|
||
qa = sub2->addAction("Faces"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotRenderMenuFaces())); | ||
qa = sub2->addAction("Skeleton"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotRenderMenuSkeleton())); | ||
qa = sub2->addAction("Triangulation"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotRenderMenuTriangulation())); | ||
|
||
qa = sub3->addAction("Toggle Axes"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotOptionsMenuAxes())); | ||
qa = sub3->addAction("Toggle Unity Cube"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotOptionsMenuUnityCube())); | ||
|
||
qa = main->addAction("&Next"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotNextObject())); | ||
qa = main->addAction("&Previous"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotPrevObject())); | ||
qa = main->addAction("&Toggle Fullscreen"); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotFullscreen())); | ||
qa = main->addAction("&Quit"); | ||
QObject::connect(qa, SIGNAL(triggered()), qApp, SLOT(quit())); | ||
|
||
qa = new QAction("Reset",this); | ||
qa->setShortcut(Qt::Key_R); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotControlMenuReset())); | ||
this->addAction(qa); | ||
|
||
qa = new QAction("Toggle Axes",this); | ||
qa->setShortcut(Qt::Key_A); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotOptionsMenuAxes())); | ||
this->addAction(qa); | ||
|
||
qa = new QAction("Toggle Unity Cube",this); | ||
qa->setShortcut(Qt::Key_C); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotOptionsMenuUnityCube())); | ||
this->addAction(qa); | ||
|
||
qa = new QAction("Next",this); | ||
qa->setShortcut(Qt::Key_Right); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotNextObject())); | ||
this->addAction(qa); | ||
|
||
qa = new QAction("Previous",this); | ||
qa->setShortcut(Qt::Key_Left); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotPrevObject())); | ||
this->addAction(qa); | ||
|
||
qa = new QAction("Toggle Fullscreen",this); | ||
qa->setShortcut(Qt::Key_F); | ||
QObject::connect(qa, SIGNAL(triggered()), this, SLOT(slotFullscreen())); | ||
this->addAction(qa); | ||
|
||
qa = new QAction("Quit",this); | ||
qa->setShortcut(Qt::Key_Q); | ||
QObject::connect(qa, SIGNAL(triggered()), qApp, SLOT(quit())); | ||
this->addAction(qa); | ||
} | ||
|
||
|
||
} //namespace CGAL | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably do not need
glut
andGLU
. And if you use the Qt5 OpenGL module,GL
is not required either.