VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
entityAttributeSlider.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
9 
10 #include <qwt_slider.h>
11 
12 #include <boost/signals2.hpp>
13 
14 class QTimer;
15 
16 namespace makVrf
17 {
24 
26  {
27  Q_OBJECT
28 
29  public:
30  explicit DtEntityAttributeSlider(QWidget *parent = NULL);
31  explicit DtEntityAttributeSlider(Qt::Orientation ori, QWidget *parent = NULL);
32 
33  virtual ~DtEntityAttributeSlider();
34 
35  virtual double actualValue();
36  virtual double extraValue();
37  virtual bool extraValueEnabled();
38 
39  virtual void setActualValue(double actualValue);
40  virtual void setExtraValue(double extraValue);
41  virtual void setExtraValueEnabled(bool enabled);
42 
43  virtual void setRequestedValue(double value, bool singleClick = true);
44 
45  virtual void setDisplayActualData(bool display);
46 
47  virtual void setTitle(const QString& title);
48 
49  boost::signals2::signal<void(double value, bool singleClick)> signal_requestedValueChanged;
50  boost::signals2::signal<void(double value)> signal_actualValueChanged;
51 
52  protected slots:
53  void mouseClickTimeout();
54  protected:
55  virtual void paintEvent(QPaintEvent *event);
56  virtual void mousePressEvent(QMouseEvent *event);
57  virtual void mouseReleaseEvent(QMouseEvent *event);
58  virtual void mouseDoubleClickEvent(QMouseEvent *event);
59  virtual void wheelEvent(QWheelEvent* event);
60 
61  virtual void drawHandle(QPainter *painter, const QRect &rect, int pos) const;
62 
63  protected:
64  double myActualValue;
65  double myExtraValue;
66 
72 
73  QString myTitle;
74  };
75 }
double myExtraValue
Definition: entityAttributeSlider.h:65
boost::signals2::signal< void(double value)> signal_actualValueChanged
Definition: entityAttributeSlider.h:50
QTimer * myMouseClickTimer
Definition: entityAttributeSlider.h:68
double myActualValue
Definition: entityAttributeSlider.h:64
boost::signals2::signal< void(double value, bool singleClick)> signal_requestedValueChanged
Definition: entityAttributeSlider.h:49
#define DT_DLL_VRFGUICOMMONQT
Definition: vrfGuiCommonQt.h:22
bool myTimerStopped
Definition: entityAttributeSlider.h:70
QString myTitle
Definition: entityAttributeSlider.h:73
bool mySecondClick
Definition: entityAttributeSlider.h:69
bool myDisplayActualData
Definition: entityAttributeSlider.h:71
A slider that is manipulated with mouse clicks, instead of the handle widget.
Definition: entityAttributeSlider.h:25
bool myExtraValueEnabled
Definition: entityAttributeSlider.h:67

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)