Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Thomas Pitiot
CGoGN
Commits
03925b74
Commit
03925b74
authored
Feb 03, 2012
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snapshot function is back !!
parent
dd2af627
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
include/Utils/Qt/qtSimple.h
include/Utils/Qt/qtSimple.h
+2
-0
src/Utils/Qt/qtSimple.cpp
src/Utils/Qt/qtSimple.cpp
+7
-0
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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