3
// Copyright (c) 2010 by The VoxBo Development Team
5
// This file is part of VoxBo
7
// VoxBo is free software: you can redistribute it and/or modify it
8
// under the terms of the GNU General Public License as published by
9
// the Free Software Foundation, either version 3 of the License, or
10
// (at your option) any later version.
12
// VoxBo is distributed in the hope that it will be useful, but
13
// WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
// General Public License for more details.
17
// You should have received a copy of the GNU General Public License
18
// along with VoxBo. If not, see <http://www.gnu.org/licenses/>.
20
// For general information on VoxBo, including the latest complete
21
// source code and binary distributions, manual, and associated files,
22
// see the VoxBo home page at: http://www.voxbo.org/
24
// original version written by Dan Kimberg
28
#include <QMouseEvent>
32
class VBScalewidget : public QFrame {
35
VBScalewidget(QWidget *parent=0);
36
void drawContents(QPainter *);
38
void setscale(float low,float high,QColor negcolor1,QColor negcolor2,
39
QColor poscolor1,QColor poscolor2);
40
void setscale(float low,float high,QColor poscolor1,QColor poscolor2);
42
// void drawContents(QPainter *p,int clipx,int clipy,int clipw,int cliph);
45
void newcolors(QColor,QColor,QColor,QColor);
48
void drawcolorbars(QPainter *,QRect,int);
49
void mousePressEvent(QMouseEvent *);
50
void mouseDoubleClickEvent(QMouseEvent *);
51
void paintEvent(QPaintEvent *pe);
52
void shaderect(QPainter *paint,QRect &r,QColor &c1,QColor &c2);
54
QColor q_negcolor1,q_negcolor2,q_poscolor1,q_poscolor2;
57
QRect posrect,negrect;