Grip-Reloaded
Grip version visualizaiton interface for DART (DynamicAnimationandRoboticsToolkits)
|
00001 /* 00002 * Copyright (c) 2014, Georgia Tech Research Corporation 00003 * All rights reserved. 00004 * 00005 * Author: Sungmoon Joo <sungmoon.joo@gmail.com> 00006 * Date: Feb 2014 00007 * 00008 * Humanoid Robotics Lab Georgia Institute of Technology 00009 * Director: Mike Stilman http://www.golems.org 00010 * 00011 * 00012 * This file is provided under the following "BSD-style" License: 00013 * Redistribution and use in source and binary forms, with or 00014 * without modification, are permitted provided that the following 00015 * conditions are met: 00016 * 00017 * * Redistributions of source code must retain the above copyright 00018 * notice, this list of conditions and the following disclaimer. 00019 * 00020 * * Redistributions in binary form must reproduce the above 00021 * copyright notice, this list of conditions and the following 00022 * disclaimer in the documentation and/or other materials provided 00023 * with the distribution. 00024 * 00025 * * Neither the name of the Humanoid Robotics Lab nor the names of 00026 * its contributors may be used to endorse or promote products 00027 * derived from this software without specific prior written 00028 * permission 00029 * 00030 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 00031 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 00032 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00033 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00034 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 00035 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00036 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00037 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 00038 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 00039 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00040 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00041 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00042 * POSSIBILITY OF SUCH DAMAGE. 00043 */ 00044 00050 #ifndef DOUBLESPINBOX_H 00051 #define DOUBLESPINBOX_H 00052 00053 #include <QSlider> 00054 00059 class DoubleSlider : public QSlider 00060 { 00062 Q_OBJECT 00063 00064 public: 00065 DoubleSlider(QWidget *parent = 0); 00066 double changeTOdouble(int intvalue); 00067 int changeTOinteger(double doublevalue); 00068 double getdsValue(); //get doubleslider value 00069 void setMinMaxDecimalValue(double minvalue, double maxvalue, int decimalvalue); 00070 double getMinValue(); 00071 double getMaxValue(); 00072 int getDecimalPoint(); 00073 private: 00074 double dsvalue; //doubleslider value 00075 double max_value; //max value of the doubeslider 00076 double min_value; //min value of the doubleslider 00077 int decimal_point; //decimal poit of the doublevalue: ex. decimal point = 1 --> x.x 00078 00079 public slots: 00080 void setdsValue(double valueindouble); //set doubleslider value 00081 void setValueAndEmit(int slidervalue); 00082 void getValueAndEmit(double spinboxvalue); 00083 00084 signals: 00085 void dsvalueChanged(double newdsvalue); //emit signal "doubleslider value changed" 00086 00087 }; // end DoubleSlider class 00088 00089 #endif // DOUBLESPINBOX_H