MorphoGraphX
2.0-1-227
src
ResetableSlider.hpp
Go to the documentation of this file.
1
//
2
// This file is part of MorphoGraphX - http://www.MorphoGraphX.org
3
// Copyright (C) 2012-2015 Richard S. Smith and collaborators.
4
//
5
// If you use MorphoGraphX in your work, please cite:
6
// http://dx.doi.org/10.7554/eLife.05864
7
//
8
// MorphoGraphX is free software, and is licensed under under the terms of the
9
// GNU General (GPL) Public License version 2.0, http://www.gnu.org/licenses.
10
//
11
#ifndef RESETABLESLIDER_H
12
#define RESETABLESLIDER_H
13
14
#include <Config.hpp>
15
16
#include <QSlider>
17
18
class
QMouseEvent;
19
20
class
ResetableSlider
:
public
QSlider
21
{
22
Q_OBJECT
23
public
:
24
ResetableSlider
(QWidget* parent = 0);
25
ResetableSlider
(Qt::Orientation orientation, QWidget* parent = 0);
26
27
int
defaultValue
() {
28
return
default_value;
29
}
30
31
public
slots:
32
void
setValueAsDefault
();
33
void
setDefaultValue
(
int
val);
34
void
resetValue
();
35
36
protected
slots:
37
void
checkDefaultValue
(
int
min
,
int
max
);
38
39
signals:
40
void
reset
();
41
42
protected
:
43
void
init
();
44
void
mouseDoubleClickEvent
(QMouseEvent* e);
45
46
private
:
47
int
default_value;
48
};
49
50
#endif
ResetableSlider::setValueAsDefault
void setValueAsDefault()
ResetableSlider::resetValue
void resetValue()
ResetableSlider::init
void init()
mgx::max
T CU_HOST_DEVICE max(const T a, const T b)
Definition:
Util.hpp:34
ResetableSlider::ResetableSlider
ResetableSlider(QWidget *parent=0)
ResetableSlider
Definition:
ResetableSlider.hpp:20
mgx::min
CU_HOST_DEVICE T min(const T a, const T b)
Definition:
Util.hpp:26
ResetableSlider::reset
void reset()
ResetableSlider::setDefaultValue
void setDefaultValue(int val)
ResetableSlider::mouseDoubleClickEvent
void mouseDoubleClickEvent(QMouseEvent *e)
ResetableSlider::defaultValue
int defaultValue()
Definition:
ResetableSlider.hpp:27
ResetableSlider::checkDefaultValue
void checkDefaultValue(int min, int max)
Generated on Fri Jul 9 2021 18:34:54 for MorphoGraphX by
1.8.17