SliderTool Documentation

This class provides a Slider for the OpenGL rendering Widget class (QGLWidget) from Qt.
The SliderTool looks like this:

In the current state the tool position is the upper right corner of the widget. It is calculated with the widgets size, and is free adjustable to the top and to the right with the corresponding Margin.
By adapting the Margin on every QGLWidget-resize-event, it is in principle possible to have the Slider painted at the desired postion. The Margins are as follows:

1 - ScreenMargin_Top
... controlls the distance to the top edge of the parent QGL widget
2 - ScreenMargin_Right
... controlls the distance to the right edge of the parent QGL widget
3 - ScreenMargin_Button2Rail
... controlls the distance between the Buttons and the rail, on that the slider moves. So the distance between Slider and Button is always greater or equal to this margin

The SliderTool painted by writing its pixels directly into the Frame Buffer. This happens in two steps:
  1. The Tool, consisting of buttons and rail, is generated (see left picture).
  2. The Slider, as movable part, is painted on top of the Tool, regarding the current status of the SliderTool. (see right picture)
The buttons as like as the slider are given as pictures, which can be found in the './images' folder. Both can easily be adapted by changing the corresponding pictures, resp. the filepath in the sourcecode.
  • The Button-pictures have to be squared.
  • The Button-pictures have to be from the same size.
  • The width of picture for the Slider have to be the same as the width of the Button-pictures
  • The Slider-picture should not have any transparency, as this is not supported. (all other Pictures can have transparency)
The position of the following main parts can be requested:
1. BtSliderUp
2. BtSliderDown
3. SliderRailArea
4. SliderRail
•  Slider
The positon is given as point in the parent QGL widget. Either the top left or the bottom right pixel can be requested for the desired part.
 All Classes Files Functions Variables
Generated on Sun May 29 19:36:43 2011 for GM_sliderTool by  doxygen 1.6.3