14 #ifndef _AxisWidget_H_
15 #define _AxisWidget_H_
18 #if QT_VERSION < 0x040000
21 #include <QtGui/QLabel>
96 const char * name = 0,
97 Qt::WFlags wflags = 0 );
107 const Range & fullRange );
116 Range & currentRange,
117 const Range & fullRange );
126 Range & currentRange,
127 const Range & fullRange );
132 const Range & fullRange );
135 void setCut (
bool flag );
177 const Range & fullRange );
184 void setZoomPan (
bool check,
bool disables =
false );
219 #endif // _AxisWidget_H_
double getLowFromSlider(const Range &fullRange)
Converts the slider position to Low.
double getHighFromSlider(const Range &fullRange)
Converts the slider position to High.
QScrollBar * getHighSlider()
Returns the high slider.
void processZoomPanCheckBoxClicked(const Range ¤tRange, const Range &fullRange)
Called by InspectorBase in response to the zoomPanCheckBoxClicked signal.
void processLowSliderMoved(int value, Range ¤tRange, const Range &fullRange)
Called by InspectorBase in response to the lowSliderMoved signal.
QLineEdit * lowTextBox
The text box that shows the low value.
void highSliderPressed()
Emitted when highSlider is pressed.
void setZoomPan(bool check, bool disables=false)
Checks zoomPanCheckBox if check is true, else un-checks it.
double getPositionFromSlider(const Range &fullRange)
Converts the slider position to Position.
QLineEdit * highTextBox
The text box that shows the high value.
void highSliderValueChanged(int value)
Emitted when highSlider's value has changed.
void setSlider(QScrollBar *s, double value, const Range &fullRange)
Sets the slider s to the value value.
bool m_isCut
A boolean that is true if the AxisWidget controls a cut.
void setCut(bool flag)
Set the isCut flag.
void updateCutControlValues(const Range ¤tRange, const Range &fullRange)
Set the textboxes and sliders to the values given by the arguments.
void lowSliderValueChanged(int value)
Emitted when lowSlider's value has changed.
QScrollBar * highSlider
The high slider.
A custom widget that creates high and low sliders and text boxes, and implements zoom pan on them...
bool isZoomPanChecked()
Returns whether zoomPanCheckBox is checked.
void processHighSliderReleased(const Range &fullRange)
Called by InspectorBase in response to the highSliderReleased signal.
void processTextBoxReturnPressed(Range ¤tRange, const Range &fullRange)
Called by InspectorBase in response to the lowTextReturnPressed and highTextReturnPressed signals...
void setSliderZero(QScrollBar *s, double value, const Range &fullRange)
Sets the slider s to the value value, where the slider zero corresponds to data zero.
int getHighSliderValue()
Get the high slider value.
QCheckBox * zoomPanCheckBox
The zoom pan check box.
void zoomPanCheckBoxClicked()
Emitted when zoomPanCheckBox is clicked.
void lowSliderReleased()
Emitted when lowSlider is released.
void setHighText(const QString &s, bool readonly=false)
Set the text in the highTextBox.
void lowSliderPressed()
Emitted when lowSlider is pressed.
QScrollBar * lowSlider
The low slider.
QScrollBar * getLowSlider()
Returns the low slider widget.
double getWidthFromSlider(const Range &fullRange)
Converts the slider position to Width.
void invalidRangeError(const std::string &bad)
Throws up a message box when an attempt is made to set an invalid range.
void highSliderReleased()
Emitted when highSlider is released.
void setLowText(const QString &s, bool readonly=false)
Set the text in the lowTextBox.
void setLowSliderValue(int value)
Set the low slider value.
Expresses a range of values.
void processHighSliderMoved(int value, Range ¤tRange, const Range &fullRange)
Called by InspectorBase in response to the highSliderMoved signal.
void highTextReturnPressed()
Emitted when highTextBox gets return pressed.
virtual ~AxisWidget()
The required virtual destructor.
void processLowSliderReleased(const Range &fullRange)
Called by InspectorBase in response to the lowSliderReleased signal.
void setHighSliderValue(int value)
Set the high slider value.
QLabel * highTextLabel
The "High" text label.
int getLowSliderValue()
Get the low slider value.
void setAllDisabled(bool flag)
Enable all controls if flag = false, disable if true.
QLabel * lowTextLabel
The "Low" text label.
AxisWidget(QWidget *parent=0, const char *name=0, Qt::WFlags wflags=0)
The standard QWidget constructor.
void lowTextReturnPressed()
Emitted when lowTextBox gets return pressed.