Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
AxisWidget Class Reference

A custom widget that creates high and low sliders and text boxes, and implements zoom pan on them. More...

#include <AxisWidget.h>

Inheritance diagram for AxisWidget:
Inheritance graph
[legend]
Collaboration diagram for AxisWidget:
Collaboration graph
[legend]

Signals

void highSliderPressed ()
 Emitted when highSlider is pressed. More...
 
void highSliderReleased ()
 Emitted when highSlider is released. More...
 
void highSliderValueChanged (int value)
 Emitted when highSlider's value has changed. More...
 
void highTextReturnPressed ()
 Emitted when highTextBox gets return pressed. More...
 
void lowSliderPressed ()
 Emitted when lowSlider is pressed. More...
 
void lowSliderReleased ()
 Emitted when lowSlider is released. More...
 
void lowSliderValueChanged (int value)
 Emitted when lowSlider's value has changed. More...
 
void lowTextReturnPressed ()
 Emitted when lowTextBox gets return pressed. More...
 
void zoomPanCheckBoxClicked ()
 Emitted when zoomPanCheckBox is clicked. More...
 

Public Member Functions

 acceptDrops () const
 
 adjustSize ()
 
 autoMask () const
 
 AxisWidget (QWidget *parent=0, const char *name=0, Qt::WFlags wflags=0)
 The standard QWidget constructor. More...
 
 backgroundBrush () const
 
 backgroundMode () const
 
 backgroundOrigin () const
 
 baseSize () const
 
 caption () const
 
 childAt (int x, int y, bool includeThis=FALSE) const
 
 childAt (const QPoint &p, bool includeThis=FALSE) const
 
 childrenRect () const
 
 childrenRegion () const
 
 clearFocus ()
 
 clearMask ()
 
 clearWFlags (WFlags f)
 
 clipRegion () const
 
 close (bool alsoDelete)
 
 close ()
 
 closeEvent (QCloseEvent *e)
 
 colorGroup () const
 
 constPolish () const
 
 contextMenuEvent (QContextMenuEvent *e)
 
 create (WId window=0, bool initializeWindow=TRUE, bool destroyOldWindow=TRUE)
 
 cursor () const
 
 customWhatsThis () const
 
 destroy (bool destroyWindow=TRUE, bool destroySubWindows=TRUE)
 
 dragEnterEvent (QDragEnterEvent *)
 
 dragLeaveEvent (QDragLeaveEvent *)
 
 dragMoveEvent (QDragMoveEvent *)
 
 drawText (const QPoint &pos, const QString &str)
 
 drawText (int x, int y, const QString &str)
 
 dropEvent (QDropEvent *)
 
 enabledChange (bool oldEnabled)
 
 enterEvent (QEvent *)
 
 enum {NoFocus=0, TabFocus=0x1, ClickFocus=0x2, StrongFocus=TabFocus|ClickFocus|0x8, WheelFocus=StrongFocus|0x4}
 
 enum {WidgetOrigin, ParentOrigin, WindowOrigin, AncestorOrigin}
 
 erase ()
 
 erase (const QRect &r)
 
 erase (int x, int y, int w, int h)
 
 erase (const QRegion &reg)
 
 eraseColor () const
 
 erasePixmap () const
 
 event (QEvent *e)
 
 find (WId id)
 
 focusData ()
 
 focusInEvent (QFocusEvent *)
 
 focusNextPrevChild (bool next)
 
 focusOutEvent (QFocusEvent *)
 
 focusPolicy () const
 
 focusProxy () const
 
 focusWidget () const
 
 font () const
 
 fontChange (const QFont &oldFont)
 
 fontInfo () const
 
 fontMetrics () const
 
 foregroundColor () const
 
 frameGeometry () const
 
 frameSize () const
 
 geometry () const
 
QScrollBargetHighSlider ()
 Returns the high slider. More...
 
int getHighSliderValue ()
 Get the high slider value. More...
 
QScrollBargetLowSlider ()
 Returns the low slider widget. More...
 
int getLowSliderValue ()
 Get the low slider value. More...
 
 getWFlags () const
 
 grabKeyboard ()
 
 grabMouse (const QCursor &cursor)
 
 grabMouse ()
 
 hasFocus () const
 
 hasMouse () const
 
 hasMouseTracking () const
 
 height () const
 
 heightForWidth (int w) const
 
 hide ()
 
 hideEvent (QHideEvent *)
 
 icon () const
 
 iconText () const
 
 imComposeEvent (QIMEvent *e)
 
 imEndEvent (QIMEvent *e)
 
 imStartEvent (QIMEvent *e)
 
void invalidRangeError (const std::string &bad)
 Throws up a message box when an attempt is made to set an invalid range. More...
 
 isActiveWindow () const
 
 isDesktop () const
 
 isDialog () const
 
 isEnabled () const
 
 isEnabledTo (QWidget *ancestor) const
 
 isFocusEnabled () const
 
 isFullScreen () const
 
 isHidden () const
 
 isInputMethodEnabled () const
 
 isMaximized () const
 
 isMinimized () const
 
 isModal () const
 
 isPopup () const
 
 isShown () const
 
 isTopLevel () const
 
 isUpdatesEnabled () const
 
 isVisible () const
 
 isVisibleTo (QWidget *ancestor) const
 
bool isZoomPanChecked ()
 Returns whether zoomPanCheckBox is checked. More...
 
 keyboardGrabber ()
 
 keyPressEvent (QKeyEvent *e)
 
 keyReleaseEvent (QKeyEvent *e)
 
 layout () const
 
 leaveEvent (QEvent *)
 
 lower ()
 
 macEvent (MSG *)
 
 mapFrom (QWidget *parent, const QPoint &pos) const
 
 mapFromGlobal (const QPoint &pos) const
 
 mapFromParent (const QPoint &pos) const
 
 mapTo (QWidget *parent, const QPoint &pos) const
 
 mapToGlobal (const QPoint &pos) const
 
 mapToParent (const QPoint &pos) const
 
 maximumHeight () const
 
 maximumSize () const
 
 maximumWidth () const
 
 metric (int m) const
 
 microFocusHint () const
 
 minimumHeight () const
 
 minimumSize () const
 
 minimumSizeHint () const
 
 minimumWidth () const
 
 mouseDoubleClickEvent (QMouseEvent *e)
 
 mouseGrabber ()
 
 mouseMoveEvent (QMouseEvent *e)
 
 mousePressEvent (QMouseEvent *e)
 
 mouseReleaseEvent (QMouseEvent *e)
 
 move (int x, int y)
 
 move (const QPoint &)
 
 moveEvent (QMoveEvent *)
 
 ownCursor () const
 
 ownFont () const
 
 ownPalette () const
 
 paintEvent (QPaintEvent *)
 
 palette () const
 
 paletteBackgroundColor () const
 
 paletteBackgroundPixmap () const
 
 paletteChange (const QPalette &oldPalette)
 
 paletteForegroundColor () const
 
 parentWidget (bool sameWindow=FALSE) const
 
 polish ()
 
 pos () const
 
void processHighSliderMoved (int value, Range &currentRange, const Range &fullRange)
 Called by InspectorBase in response to the highSliderMoved signal. More...
 
void processHighSliderReleased (const Range &fullRange)
 Called by InspectorBase in response to the highSliderReleased signal. More...
 
void processLowSliderMoved (int value, Range &currentRange, const Range &fullRange)
 Called by InspectorBase in response to the lowSliderMoved signal. More...
 
void processLowSliderReleased (const Range &fullRange)
 Called by InspectorBase in response to the lowSliderReleased signal. More...
 
void processTextBoxReturnPressed (Range &currentRange, const Range &fullRange)
 Called by InspectorBase in response to the lowTextReturnPressed and highTextReturnPressed signals. More...
 
void processZoomPanCheckBoxClicked (const Range &currentRange, const Range &fullRange)
 Called by InspectorBase in response to the zoomPanCheckBoxClicked signal. More...
 
 prop -whether this widget is minimized(iconified)
 
 prop -the widget's minimum height
 
 prop -the widget's minimum size
 
 prop -the recommended size for the widget
 
 prop -the widget's minimum width
 
 prop -whether the widget uses its own cursor
 
 prop -whether the widget uses its own palette
 
 prop -the background color of the widget
 
 prop -the foreground color of the widget
 
 prop -the internal geometry of the widget excluding any window frame
 
 prop -the widget's icon text
 
 prop -the size of the widget excluding any window frame
 
 prop -the size increment of the widget
 
 prop -whether the widget is under the mouse cursor
 
 prop -whether this widget is maximized
 
 prop -the color role used for painting the background of the widget
 
 prop -the size of the widget including any window frame
 
 prop -the widget's maximum size
 
 prop -the background pixmap of the widget
 
 prop -the combined region occupied by the widget's children
 
 prop -the font currently set for the widget
 
 prop -whether the widget is a dialog widget
 
 prop -the origin of the widget's background
 
 prop -the recommended minimum size for the widget
 
 prop -the level of opacity for the window
 
 prop -the default layout behavior of the widget
 
 prop -whether the widget uses its own font
 
 prop -the widget's palette
 
 prop -whether the widget is visible
 
 prop -whether updates are enabled
 
 prop -the width of the widget excluding any window frame
 
 prop -the x coordinate of the widget relative to its parent including any window frame
 
 prop -whether the widget is enabled
 
 prop -whether mouse tracking is enabled for the widget
 
 prop -whether drop events are enabled for this widget
 
 prop -whether the auto mask feature is enabled for the widget
 
 prop -the widget's background brush
 
 prop -the position of the widget within its parent widget
 
 prop -the geometry of the widget relative to its parent and excluding the window frame
 
 prop -the base size of the widget
 
 prop -the window caption(title)
 
 prop -the bounding rectangle of the widget's children
 
 prop -the current color group of the widget palette
 
 prop -the cursor shape for this widget
 
 prop -whether the widget wants to handle What's This help manually
 
 prop -whether this widget(or its focus proxy) has the keyboard input focus
 
 prop -whether the widget accepts keyboard focus
 
 prop -the way the widget accepts keyboard focus
 
 prop -the y coordinate of the widget relative to its parent and including any window frame
 
 prop -geometry of the widget relative to its parent including any window frame
 
 prop -whether the widget is full screen
 
 prop -whether the widget is shown
 
 prop -the height of the widget excluding any window frame
 
 prop -whether the widget is explicitly hidden
 
 prop -the widget's icon
 
 prop -enables or disables the use of input methods for this widget
 
 prop -the widget's maximum width
 
 prop -the widget's maximum height
 
 prop -whether this widget is the active window
 
 prop -whether the widget is a desktop widget, i.e.represents the desktop
 
 prop -whether the widget is a modal widget
 
 prop -whether the widget is a popup widget
 
 prop -whether the widget is a top-level widget
 
 prop -the currently set micro focus hint for this widget
 
 qwsEvent (QWSEvent *)
 
 raise ()
 
 rect () const
 
 releaseKeyboard ()
 
 releaseMouse ()
 
 repaint ()
 
 repaint (bool erase)
 
 repaint (int x, int y, int w, int h, bool erase=TRUE)
 
 repaint (const QRect &r, bool erase=TRUE)
 
 repaint (const QRegion &reg, bool erase=TRUE)
 
 reparent (QWidget *parent, WFlags f, const QPoint &p, bool showIt=FALSE)
 
 reparent (QWidget *parent, const QPoint &p, bool showIt=FALSE)
 
 resetInputContext ()
 
 resize (int w, int h)
 
 resize (const QSize &)
 
 resizeEvent (QResizeEvent *)
 
 scroll (int dx, int dy)
 
 scroll (int dx, int dy, const QRect &r)
 
 setAcceptDrops (bool on)
 
 setActiveWindow ()
 
void setAllDisabled (bool flag)
 Enable all controls if flag = false, disable if true. More...
 
 setAutoMask (bool)
 
 setBackgroundMode (BackgroundMode)
 
 setBackgroundMode (BackgroundMode m, BackgroundMode visual)
 
 setBackgroundOrigin (BackgroundOrigin)
 
 setBaseSize (int basew, int baseh)
 
 setBaseSize (const QSize &)
 
 setCaption (const QString &)
 
 setCursor (const QCursor &)
 
void setCut (bool flag)
 Set the isCut flag. More...
 
 setDisabled (bool disable)
 
 setEnabled (bool)
 
 setEraseColor (const QColor &color)
 
 setErasePixmap (const QPixmap &pixmap)
 
 setFixedHeight (int h)
 
 setFixedSize (int w, int h)
 
 setFixedSize (const QSize &s)
 
 setFixedWidth (int w)
 
 setFocus ()
 
 setFocusPolicy (FocusPolicy)
 
 setFocusProxy (QWidget *w)
 
 setFont (const QFont &)
 
 setGeometry (const QRect &)
 
 setGeometry (int x, int y, int w, int h)
 
 setHidden (bool hide)
 
void setHighSliderValue (int value)
 Set the high slider value. More...
 
void setHighText (const QString &s, bool readonly=false)
 Set the text in the highTextBox. More...
 
 setIcon (const QPixmap &)
 
 setIconText (const QString &)
 
 setInputMethodEnabled (bool b)
 
 setKeyCompression (bool compress)
 
void setLowSliderValue (int value)
 Set the low slider value. More...
 
void setLowText (const QString &s, bool readonly=false)
 Set the text in the lowTextBox. More...
 
 setMask (const QRegion &region)
 
 setMask (const QBitmap &bitmap)
 
 setMaximumHeight (int maxh)
 
 setMaximumSize (const QSize &)
 
 setMaximumSize (int maxw, int maxh)
 
 setMaximumWidth (int maxw)
 
 setMicroFocusHint (int x, int y, int width, int height, bool text=TRUE, QFont *f=0)
 
 setMinimumHeight (int minh)
 
 setMinimumSize (const QSize &)
 
 setMinimumSize (int minw, int minh)
 
 setMinimumWidth (int minw)
 
 setMouseTracking (bool enable)
 
 setPalette (const QPalette &)
 
 setPaletteBackgroundColor (const QColor &)
 
 setPaletteBackgroundPixmap (const QPixmap &)
 
 setPaletteForegroundColor (const QColor &)
 
 setShown (bool show)
 
 setSizeIncrement (const QSize &)
 
 setSizeIncrement (int w, int h)
 
 setSizePolicy (QSizePolicy::SizeType hor, QSizePolicy::SizeType ver, bool hfw=FALSE)
 
 setSizePolicy (QSizePolicy)
 
 setStyle (QStyle *style)
 
 setStyle (const QString &style)
 
 setTabOrder (QWidget *first, QWidget *second)
 
 setUpdatesEnabled (bool enable)
 
 setWFlags (WFlags f)
 
 setWindowOpacity (double level)
 
 setWindowState (uint windowState)
 
void setZoomPan (bool check, bool disables=false)
 Checks zoomPanCheckBox if check is true, else un-checks it. More...
 
 show ()
 
 showEvent (QShowEvent *)
 
 showFullScreen ()
 
 showMaximized ()
 
 showMinimized ()
 
 showNormal ()
 
 size () const
 
 sizeHint () const
 
 sizeIncrement () const
 
 sizePolicy () const
 
 stackUnder (QWidget *w)
 
 style () const
 
 styleChange (QStyle &oldStyle)
 
 tabletEvent (QTabletEvent *e)
 
 testWFlags (WFlags f) const
 
 topLevelWidget () const
 
 unsetCursor ()
 
 unsetFont ()
 
 unsetPalette ()
 
 update ()
 
 update (const QRect &r)
 
 update (int x, int y, int w, int h)
 
void updateCutControlValues (const Range &currentRange, const Range &fullRange)
 
Set the textboxes and sliders to the values given by the

arguments. More...

 
 updateGeometry ()
 
 updateMask ()
 
 wheelEvent (QWheelEvent *e)
 
 width () const
 
 windowActivationChange (bool oldActive)
 
 windowOpacity () const
 
 windowState () const
 
 winEvent (MSG *)
 
 winId () const
 
 x () const
 
 x11Event (XEvent *)
 
 y () const
 
virtual ~AxisWidget ()
 The required virtual destructor. More...
 

Private Member Functions

double getHighFromSlider (const Range &fullRange)
 Converts the slider position to High. More...
 
double getLowFromSlider (const Range &fullRange)
 Converts the slider position to Low. More...
 
double getPositionFromSlider (const Range &fullRange)
 Converts the slider position to Position. More...
 
double getWidthFromSlider (const Range &fullRange)
 Converts the slider position to Width. More...
 
void setSlider (QScrollBar *s, double value, const Range &fullRange)
 Sets the slider s to the value value. More...
 
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. More...
 

Private Attributes

QScrollBarhighSlider
 The high slider. More...
 
QLineEdithighTextBox
 The text box that shows the high value. More...
 
QLabelhighTextLabel
 The "High" text label. More...
 
QScrollBarlowSlider
 The low slider. More...
 
QLineEditlowTextBox
 The text box that shows the low value. More...
 
QLabellowTextLabel
 The "Low" text label. More...
 
bool m_isCut
 A boolean that is true if the AxisWidget controls a cut. More...
 
QCheckBoxzoomPanCheckBox
 The zoom pan check box. More...
 

Detailed Description

A custom widget that creates high and low sliders and text boxes, and implements zoom pan on them.

Author
Sanket Biren Malde sanke.nosp@m.t@st.nosp@m.anfor.nosp@m.d.ed.nosp@m.u

Definition at line 41 of file AxisWidget.h.

Constructor & Destructor Documentation

AxisWidget ( QWidget parent = 0,
const char *  name = 0,
Qt::WFlags  wflags = 0 
)
~AxisWidget ( )
virtual

Member Function Documentation

double getHighFromSlider ( const Range fullRange)
private

Converts the slider position to High.

Definition at line 611 of file AxisWidget.cxx.

References AxisWidget::highSlider, Range::length(), Range::low(), QScrollBar::maxValue(), QScrollBar::minValue(), and QScrollBar::value().

Referenced by AxisWidget::processHighSliderMoved().

QScrollBar * getHighSlider ( )

Returns the high slider.

Definition at line 509 of file AxisWidget.cxx.

References AxisWidget::highSlider.

int getHighSliderValue ( )

Get the high slider value.

Definition at line 514 of file AxisWidget.cxx.

References AxisWidget::highSlider, and QScrollBar::value().

Referenced by Inspector::highRangeDrag().

double getLowFromSlider ( const Range fullRange)
private

Converts the slider position to Low.

Definition at line 595 of file AxisWidget.cxx.

References Range::length(), Range::low(), AxisWidget::lowSlider, QScrollBar::maxValue(), QScrollBar::minValue(), and QScrollBar::value().

Referenced by AxisWidget::processLowSliderMoved().

QScrollBar * getLowSlider ( )

Returns the low slider widget.

Definition at line 492 of file AxisWidget.cxx.

References AxisWidget::lowSlider.

int getLowSliderValue ( )

Get the low slider value.

Definition at line 497 of file AxisWidget.cxx.

References AxisWidget::lowSlider, and QScrollBar::value().

Referenced by Inspector::lowRangeDrag().

double getPositionFromSlider ( const Range fullRange)
private
double getWidthFromSlider ( const Range fullRange)
private
void highSliderPressed ( )
signal

Emitted when highSlider is pressed.

Referenced by AxisWidget::AxisWidget().

void highSliderReleased ( )
signal

Emitted when highSlider is released.

Referenced by AxisWidget::AxisWidget().

void highSliderValueChanged ( int  value)
signal

Emitted when highSlider's value has changed.

Referenced by AxisWidget::AxisWidget().

void highTextReturnPressed ( )
signal

Emitted when highTextBox gets return pressed.

Referenced by AxisWidget::AxisWidget().

void invalidRangeError ( const std::string &  bad)

Throws up a message box when an attempt is made to set an invalid range.

Definition at line 461 of file AxisWidget.cxx.

References QMessageBox::critical().

Referenced by AxisWidget::processTextBoxReturnPressed().

bool isZoomPanChecked ( )

Returns whether zoomPanCheckBox is checked.

Definition at line 553 of file AxisWidget.cxx.

References QCheckBox::isChecked(), and AxisWidget::zoomPanCheckBox.

Referenced by Inspector::axisZoomPanCheckBox_clicked(), Inspector::setDragOn(), Inspector::setHighRange(), and Inspector::setLowRange().

void lowSliderPressed ( )
signal

Emitted when lowSlider is pressed.

Referenced by AxisWidget::AxisWidget().

void lowSliderReleased ( )
signal

Emitted when lowSlider is released.

Referenced by AxisWidget::AxisWidget().

void lowSliderValueChanged ( int  value)
signal

Emitted when lowSlider's value has changed.

Referenced by AxisWidget::AxisWidget().

void lowTextReturnPressed ( )
signal

Emitted when lowTextBox gets return pressed.

Referenced by AxisWidget::AxisWidget().

void processHighSliderMoved ( int  value,
Range currentRange,
const Range fullRange 
)
void processHighSliderReleased ( const Range fullRange)

Called by InspectorBase in response to the highSliderReleased signal.

Definition at line 248 of file AxisWidget.cxx.

References AxisWidget::highSlider, AxisWidget::highTextBox, AxisWidget::setSlider(), and QLineEdit::text().

Referenced by Inspector::cutHighSlider_sliderReleased().

void processLowSliderMoved ( int  value,
Range currentRange,
const Range fullRange 
)
void processLowSliderReleased ( const Range fullRange)
void processTextBoxReturnPressed ( Range currentRange,
const Range fullRange 
)
void processZoomPanCheckBoxClicked ( const Range currentRange,
const Range fullRange 
)
void setAllDisabled ( bool  flag)

Enable all controls if flag = false, disable if true.

Definition at line 524 of file AxisWidget.cxx.

References AxisWidget::highSlider, AxisWidget::highTextBox, AxisWidget::lowSlider, AxisWidget::lowTextBox, and AxisWidget::zoomPanCheckBox.

Referenced by Inspector::disableCutControls(), and Inspector::updateAxisTab().

void setCut ( bool  flag)

Set the isCut flag.

Definition at line 454 of file AxisWidget.cxx.

References AxisWidget::m_isCut.

void setHighSliderValue ( int  value)

Set the high slider value.

Definition at line 519 of file AxisWidget.cxx.

References AxisWidget::highSlider, and QScrollBar::setValue().

Referenced by Inspector::highRangeDrag(), and Inspector::setHighRange().

void setHighText ( const QString s,
bool  readonly = false 
)

Set the text in the highTextBox.

If readonly is true, then set the text to be read only.

Definition at line 484 of file AxisWidget.cxx.

References AxisWidget::highTextBox, QLineEdit::setReadOnly(), and QLineEdit::setText().

void setLowSliderValue ( int  value)

Set the low slider value.

Definition at line 502 of file AxisWidget.cxx.

References AxisWidget::lowSlider, and QScrollBar::setValue().

Referenced by Inspector::lowRangeDrag(), and Inspector::setLowRange().

void setLowText ( const QString s,
bool  readonly = false 
)

Set the text in the lowTextBox.

If readonly is true, then set the text to be read only.

Definition at line 478 of file AxisWidget.cxx.

References AxisWidget::lowTextBox, QLineEdit::setReadOnly(), and QLineEdit::setText().

void setSlider ( QScrollBar s,
double  value,
const Range fullRange 
)
private
void setSliderZero ( QScrollBar s,
double  value,
const Range fullRange 
)
private

Sets the slider s to the value value, where the slider zero corresponds to data zero.

Eg: width

Definition at line 640 of file AxisWidget.cxx.

References Range::length(), QScrollBar::maxValue(), QScrollBar::minValue(), and QScrollBar::setValue().

Referenced by AxisWidget::processLowSliderReleased(), AxisWidget::processTextBoxReturnPressed(), and AxisWidget::processZoomPanCheckBoxClicked().

void setZoomPan ( bool  check,
bool  disables = false 
)

Checks zoomPanCheckBox if check is true, else un-checks it.

The second argument can be used to set it to be disabled (i.e. frozen)

Definition at line 558 of file AxisWidget.cxx.

References QCheckBox::setChecked(), and AxisWidget::zoomPanCheckBox.

Referenced by Inspector::updateAxisTab().

void updateCutControlValues ( const Range currentRange,
const Range fullRange 
)
void zoomPanCheckBoxClicked ( )
signal

Emitted when zoomPanCheckBox is clicked.

Referenced by AxisWidget::AxisWidget().

Member Data Documentation

QScrollBar* highSlider
private
QLineEdit* highTextBox
private
QLabel* highTextLabel
private
QScrollBar* lowSlider
private
QLineEdit* lowTextBox
private
QLabel* lowTextLabel
private
bool m_isCut
private
QCheckBox* zoomPanCheckBox
private

The documentation for this class was generated from the following files:

Generated for HippoDraw Class Library by doxygen