Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
ee7fa32d
Commit
ee7fa32d
authored
May 11, 2011
by
CGoGN GIT Supervisor
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of /home/kraemer/CGoGN
* 'master' of /home/kraemer/CGoGN: ajout cb_wheelEvent
parents
eb4c4e01
ceb16a9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
include/Utils/qtSimple.h
include/Utils/qtSimple.h
+5
-1
src/Utils/qtgl.cpp
src/Utils/qtgl.cpp
+5
-2
No files found.
include/Utils/qtSimple.h
View file @
ee7fa32d
...
...
@@ -291,6 +291,11 @@ public:
*/
virtual
void
cb_mouseMove
(
int
button
,
int
x
,
int
y
)
{}
/**
* the mouse has been move (with button still pressed)
*/
virtual
void
cb_wheelEvent
(
int
delta
,
int
x
,
int
y
)
{}
/**
* key press CB (context is ok)
*/
...
...
@@ -365,7 +370,6 @@ public:
*/
std
::
string
selectFileSave
(
const
std
::
string
&
title
=
"open file"
,
const
std
::
string
&
dir
=
"."
,
const
std
::
string
&
filters
=
"all (*.*)"
);
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/qtgl.cpp
View file @
ee7fa32d
...
...
@@ -292,7 +292,7 @@ void GLWidget::mouseMoveEvent(QMouseEvent* event)
m_cbs
->
cb_mouseMove
(
event
->
button
(),
event
->
x
(),
getHeight
()
-
event
->
y
());
}
void
GLWidget
::
wheelEvent
(
QWheelEvent
*
event
)
void
GLWidget
::
wheelEvent
(
QWheelEvent
*
event
)
{
float
wl
=
-
0.05
f
*
FAR_PLANE
/
foc
;
...
...
@@ -303,9 +303,12 @@ void GLWidget::wheelEvent ( QWheelEvent * event )
newModel
=
1
;
updateGL
();
if
(
m_cbs
)
m_cbs
->
cb_wheelEvent
(
event
->
delta
(),
event
->
x
(),
getHeight
()
-
event
->
y
());
}
void
GLWidget
::
keyPressEvent
(
QKeyEvent
*
event
)
void
GLWidget
::
keyPressEvent
(
QKeyEvent
*
event
)
{
if
(
event
->
key
()
==
Qt
::
Key_Escape
)
close
();
...
...
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