Mercurial > octave-nkf
comparison libgui/graphics/GLCanvas.cc @ 19650:709f3a77685d gui-release
avoid shadowed variable warnings in libgui sources
* BaseControl.cc, BaseControl.h, Container.cc, ContextMenu.cc,
Figure.cc, FigureWindow.cc, GLCanvas.cc, GenericEventNotify.h,
Menu.cc, MouseModeActionGroup.cc, Panel.cc, TextEdit.cc, TextEdit.h,
ToolBar.cc: Rename local variables to avoid shadowing class members or
functions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 23 Jan 2015 14:53:10 -0500 |
parents | 523878f76518 |
children | 6b2d7a5dc62a |
comparison
equal
deleted
inserted
replaced
19649:4c1f638a381e | 19650:709f3a77685d |
---|---|
35 #include "gl-select.h" | 35 #include "gl-select.h" |
36 | 36 |
37 namespace QtHandles | 37 namespace QtHandles |
38 { | 38 { |
39 | 39 |
40 GLCanvas::GLCanvas (QWidget* parent, const graphics_handle& handle) | 40 GLCanvas::GLCanvas (QWidget* xparent, const graphics_handle& gh) |
41 : QGLWidget (parent), Canvas (handle) | 41 : QGLWidget (xparent), Canvas (gh) |
42 { | 42 { |
43 setFocusPolicy (Qt::ClickFocus); | 43 setFocusPolicy (Qt::ClickFocus); |
44 } | 44 } |
45 | 45 |
46 GLCanvas::~GLCanvas (void) | 46 GLCanvas::~GLCanvas (void) |
47 { | 47 { |
48 } | 48 } |
49 | 49 |
50 void GLCanvas::draw (const graphics_handle& handle) | 50 void GLCanvas::draw (const graphics_handle& gh) |
51 { | 51 { |
52 graphics_object go = gh_manager::get_object (handle); | 52 graphics_object go = gh_manager::get_object (gh); |
53 | 53 |
54 if (go) | 54 if (go) |
55 { | 55 { |
56 opengl_renderer r; | 56 opengl_renderer r; |
57 | 57 |
117 void GLCanvas::paintGL (void) | 117 void GLCanvas::paintGL (void) |
118 { | 118 { |
119 canvasPaintEvent (); | 119 canvasPaintEvent (); |
120 } | 120 } |
121 | 121 |
122 void GLCanvas::mouseMoveEvent (QMouseEvent* event) | 122 void GLCanvas::mouseMoveEvent (QMouseEvent* ev) |
123 { | 123 { |
124 canvasMouseMoveEvent (event); | 124 canvasMouseMoveEvent (ev); |
125 } | 125 } |
126 | 126 |
127 void GLCanvas::mousePressEvent (QMouseEvent* event) | 127 void GLCanvas::mousePressEvent (QMouseEvent* ev) |
128 { | 128 { |
129 canvasMousePressEvent (event); | 129 canvasMousePressEvent (ev); |
130 } | 130 } |
131 | 131 |
132 void GLCanvas::mouseReleaseEvent (QMouseEvent* event) | 132 void GLCanvas::mouseReleaseEvent (QMouseEvent* ev) |
133 { | 133 { |
134 canvasMouseReleaseEvent (event); | 134 canvasMouseReleaseEvent (ev); |
135 } | 135 } |
136 | 136 |
137 void GLCanvas::keyPressEvent (QKeyEvent* event) | 137 void GLCanvas::keyPressEvent (QKeyEvent* ev) |
138 { | 138 { |
139 if (! canvasKeyPressEvent (event)) | 139 if (! canvasKeyPressEvent (ev)) |
140 QGLWidget::keyPressEvent (event); | 140 QGLWidget::keyPressEvent (ev); |
141 } | 141 } |
142 | 142 |
143 void GLCanvas::keyReleaseEvent (QKeyEvent* event) | 143 void GLCanvas::keyReleaseEvent (QKeyEvent* ev) |
144 { | 144 { |
145 if (! canvasKeyReleaseEvent (event)) | 145 if (! canvasKeyReleaseEvent (ev)) |
146 QGLWidget::keyReleaseEvent (event); | 146 QGLWidget::keyReleaseEvent (ev); |
147 } | 147 } |
148 | 148 |
149 }; // namespace QtHandles | 149 }; // namespace QtHandles |