Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CGoGN
CGoGN
Commits
03925b74
Commit
03925b74
authored
Feb 03, 2012
by
Sylvain Thery
Browse files
snapshot function is back !!
parent
dd2af627
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/Utils/Qt/qtSimple.h
View file @
03925b74
...
...
@@ -396,6 +396,8 @@ public:
*/
std
::
string
selectFileSave
(
const
std
::
string
&
title
=
"open file"
,
const
std
::
string
&
dir
=
"."
,
const
std
::
string
&
filters
=
"all (*.*)"
);
void
snapshot
(
const
QString
&
filename
);
public
slots
:
virtual
void
cb_New
()
{
std
::
cerr
<<
"callback not implemented"
<<
std
::
endl
;
}
virtual
void
cb_Open
()
{
std
::
cerr
<<
"callback not implemented"
<<
std
::
endl
;
}
...
...
src/Utils/Qt/qtSimple.cpp
View file @
03925b74
...
...
@@ -30,6 +30,7 @@
#include
"glm/gtc/type_ptr.hpp"
#include
<QtGui/QTextEdit>
#include
<QImage>
namespace
CGoGN
{
...
...
@@ -513,6 +514,12 @@ void SimpleQT::cb_about()
QMessageBox
::
about
(
this
,
tr
(
"About App"
),
m_helpString
.
c_str
());
}
void
SimpleQT
::
snapshot
(
const
QString
&
filename
)
{
QImage
im
=
m_glWidget
->
grabFrameBuffer
(
false
);
im
.
save
(
filename
);
}
}
// namespace QT
}
// namespace Utils
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment