Isis 3 Programmer Reference
SawtoothStretchType.h
1#ifndef SAWTOOTHSTRETCHTYPE_H
2#define SAWTOOTHSTRETCHTYPE_H
3
4#include "StretchType.h"
5
6class QColor;
7class QLineEdit;
8class QSlider;
9class QString;
10
11namespace Isis {
12 class Stretch;
13 class CubeStretch;
14 class Histogram;
15
34 Q_OBJECT
35
36 public:
37 SawtoothStretchType(const Histogram &, const Stretch &,
38 const QString &name, const QColor &color);
40
41 virtual CubeStretch getStretch();
42 virtual void setStretch(Stretch);
43
44 private slots:
45 void offsetSliderMoved(int);
46 void offsetEditChanged(const QString &);
47 void widthSliderMoved(int);
48 void widthEditChanged(const QString &);
49
50 private:
52 Stretch calculateNewStretch(double, double);
53
54 private:
55 QSlider *p_offsetSlider;
56 QLineEdit *p_offsetEdit;
57 QSlider *p_widthSlider;
58 QLineEdit *p_widthEdit;
59
62 };
63}
64
65#endif
Stores stretch information for a cube.
Definition CubeStretch.h:27
Container of a cube histogram.
Definition Histogram.h:74
This handles the advanced sawtooth stretch.
void widthSliderMoved(int)
This is called when the sawtooth width slider moves.
virtual void setStretch(Stretch)
Given an arbitrary stretch, this will re-interpret it, as best as possible, into a sawtooth stretch.
virtual CubeStretch getStretch()
Gets the CubeStretch for this Sawtooth Stretch.
QLineEdit * p_widthEdit
Width edit.
SawtoothStretchType(const Histogram &, const Stretch &, const QString &name, const QColor &color)
This initializes a sawtooth stretch type.
void offsetEditChanged(const QString &)
This is called when the the sawtooth offset edit changes.
void widthEditChanged(const QString &)
This is called when the the sawtooth width edit changes.
QLineEdit * p_offsetEdit
Offset edit.
Stretch calculateNewStretch()
This calculates a new stretch using the GUI edits.
void offsetSliderMoved(int)
This is called when the sawtooth offset slider moves.
bool p_sliderOverride
This is used to let the edits be changed to where sliders cant go.
QSlider * p_widthSlider
Width slider.
QSlider * p_offsetSlider
Offset slider.
Pixel value mapper.
Definition Stretch.h:58
This is the base class for advanced stretches.
Definition StretchType.h:39
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16