source: flair-src/trunk/tools/FlairGCS/src/Scrollbar.h @ 15

Last change on this file since 15 was 15, checked in by Bayard Gildas, 6 years ago

sources reformatted with flair-format-dir script

File size: 1.3 KB
RevLine 
[15]1// %flair:license{
[10]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[15]4// %flair:license}
[9]5#ifndef _SCROLLBAR_H
6#define _SCROLLBAR_H 1
7
8#include <qscrollbar.h>
9
[15]10class ScrollBar : public QScrollBar {
11  Q_OBJECT
[9]12
13public:
[15]14  ScrollBar(QWidget *parent = NULL);
15  ScrollBar(Qt::Orientation, QWidget *parent = NULL);
16  ScrollBar(float minBase, float maxBase, Qt::Orientation o,
17            QWidget *parent = NULL);
[9]18
[15]19  void setInverted(bool);
20  bool isInverted(void) const;
[9]21
[15]22  float minBaseValue(void) const;
23  float maxBaseValue(void) const;
[9]24
[15]25  float minSliderValue(void) const;
26  float maxSliderValue(void) const;
[9]27
[15]28  int extent(void) const;
[9]29
30Q_SIGNALS:
[15]31  void sliderMoved(Qt::Orientation, float, float);
32  void valueChanged(Qt::Orientation, float, float);
[9]33
34public Q_SLOTS:
[15]35  virtual void setBase(float min, float max);
36  virtual void moveSlider(float min, float max);
[9]37
38protected:
[15]39  void sliderRange(int value, float &min, float &max) const;
40  int mapToTick(float) const;
41  float mapFromTick(int) const;
[9]42
43private Q_SLOTS:
[15]44  void catchValueChanged(int value);
45  void catchSliderMoved(int value);
[9]46
47private:
[15]48  void init(void);
[9]49
[15]50  bool d_inverted;
51  float d_minBase;
52  float d_maxBase;
53  int d_baseTicks;
[9]54};
55
56#endif
Note: See TracBrowser for help on using the repository browser.