Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AxisWidget Class Reference

#include <AxisWidget.h>

Inheritance diagram for AxisWidget:

Inheritance graph
[legend]
Collaboration diagram for AxisWidget:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Author:
Sanket Biren Malde <sanket@stanford.edu>

Definition at line 39 of file AxisWidget.h.

Signals

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

Public Member Functions

 acceptDrops () const
 adjustSize ()
 autoMask () const
 AxisWidget (QWidget *parent=0, const char *name=0, Qt::WFlags wflags=0)
 The standard QWidget constructor.
 backgroundBrush () const
 backgroundMode () const
 backgroundOrigin () const
 baseSize () const
 caption () const
 childAt (const QPoint &p, bool includeThis=FALSE) const
 childAt (int x, int y, bool includeThis=FALSE) const
 childrenRect () const
 childrenRegion () const
 clearFocus ()
 clearMask ()
 clearWFlags (WFlags f)
 clipRegion () const
 close ()
 close (bool alsoDelete)
 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 {WidgetOrigin, ParentOrigin, WindowOrigin, AncestorOrigin}
 enum {NoFocus=0, TabFocus=0x1, ClickFocus=0x2, StrongFocus=TabFocus|ClickFocus|0x8, WheelFocus=StrongFocus|0x4}
 erase (const QRegion &reg)
 erase (const QRect &r)
 erase (int x, int y, int w, int h)
 erase ()
 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.
int getHighSliderValue ()
 Get the high slider value.
QScrollBargetLowSlider ()
 Returns the low slider widget.
int getLowSliderValue ()
 Get the low slider value.
 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.
 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.
 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 (const QPoint &)
 move (int x, int y)
 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.
void processHighSliderReleased (const Range &fullRange)
 Called by InspectorBase in response to the highSliderReleased signal.
void processLowSliderMoved (int value, Range &currentRange, const Range &fullRange)
 Called by InspectorBase in response to the lowSliderMoved signal.
void processLowSliderReleased (const Range &fullRange)
 Called by InspectorBase in response to the lowSliderReleased signal.
void processTextBoxReturnPressed (Range &currentRange, const Range &fullRange)
 Called by InspectorBase in response to the lowTextReturnPressed and highTextReturnPressed signals.
void processZoomPanCheckBoxClicked (const Range &currentRange, const Range &fullRange)
 Called by InspectorBase in response to the zoomPanCheckBoxClicked signal.
 prop -the y coordinate of the widget relative to its parent and including any window frame
 prop -the x coordinate of the widget relative to its parent including any window frame
 prop -the level of opacity for the window
 prop -the width of the widget excluding any window frame
 prop -whether the widget is visible
 prop -whether updates are enabled
 prop -whether the widget is under the mouse cursor
 prop -the default layout behavior of the widget
 prop -the size increment of the widget
 prop -the recommended size for the widget
 prop -the size of the widget excluding any window frame
 prop -whether the widget is shown
 prop -the internal geometry of the widget excluding any window frame
 prop -the position of the widget within its parent widget
 prop -the foreground color of the widget
 prop -the background pixmap of the widget
 prop -the background color of the widget
 prop -the widget's palette
 prop -whether the widget uses its own palette
 prop -whether the widget uses its own font
 prop -whether the widget uses its own cursor
 prop -whether mouse tracking is enabled for the widget
 prop -the widget's minimum width
 prop -the recommended minimum size for the widget
 prop -the widget's minimum size
 prop -the widget's minimum height
 prop -whether this widget is minimized(iconified)
 prop -the currently set micro focus hint for this widget
 prop -the widget's maximum width
 prop -the widget's maximum size
 prop -the widget's maximum height
 prop -whether this widget is maximized
 prop -whether the widget is a top-level widget
 prop -whether the widget is a popup widget
 prop -whether the widget is a modal widget
 prop -whether the widget is a dialog widget
 prop -whether the widget is a desktop widget, i.e.represents the desktop
 prop -whether this widget is the active window
 prop -enables or disables the use of input methods for this widget
 prop -the widget's icon text
 prop -the widget's icon
 prop -whether the widget is explicitly hidden
 prop -the height of the widget excluding any window frame
 prop -the geometry of the widget relative to its parent and excluding the window frame
 prop -whether the widget is full screen
 prop -the size of the widget including any window frame
 prop -geometry of the widget relative to its parent including any window frame
 prop -the font currently set for the widget
 prop -the way the widget accepts keyboard focus
 prop -whether the widget accepts keyboard focus
 prop -whether this widget(or its focus proxy) has the keyboard input focus
 prop -whether the widget is enabled
 prop -whether the widget wants to handle What's This help manually
 prop -the cursor shape for this widget
 prop -the current color group of the widget palette
 prop -the combined region occupied by the widget's children
 prop -the bounding rectangle of the widget's children
 prop -the window caption(title)
 prop -the base size of the widget
 prop -the origin of the widget's background
 prop -the color role used for painting the background of the widget
 prop -the widget's background brush
 prop -whether the auto mask feature is enabled for the widget
 prop -whether drop events are enabled for this widget
 qwsEvent (QWSEvent *)
 raise ()
 rect () const
 releaseKeyboard ()
 releaseMouse ()
 repaint (const QRegion &reg, bool erase=TRUE)
 repaint (const QRect &r, bool erase=TRUE)
 repaint (int x, int y, int w, int h, bool erase=TRUE)
 repaint (bool erase)
 repaint ()
 reparent (QWidget *parent, const QPoint &p, bool showIt=FALSE)
 reparent (QWidget *parent, WFlags f, const QPoint &p, bool showIt=FALSE)
 resetInputContext ()
 resize (const QSize &)
 resize (int w, int h)
 resizeEvent (QResizeEvent *)
 scroll (int dx, int dy, const QRect &r)
 scroll (int dx, int dy)
 setAcceptDrops (bool on)
 setActiveWindow ()
void setAllDisabled (bool flag)
 Enable all controls if flag = false, disable if true.
 setAutoMask (bool)
 setBackgroundMode (BackgroundMode m, BackgroundMode visual)
 setBackgroundMode (BackgroundMode)
 setBackgroundOrigin (BackgroundOrigin)
 setBaseSize (int basew, int baseh)
 setBaseSize (const QSize &)
 setCaption (const QString &)
 setCursor (const QCursor &)
void setCut (bool flag)
 Set the isCut flag.
 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.
void setHighText (const QString &s, bool readonly=false)
 Set the text in the highTextBox.
 setIcon (const QPixmap &)
 setIconText (const QString &)
 setInputMethodEnabled (bool b)
 setKeyCompression (bool compress)
void setLowSliderValue (int value)
 Set the low slider value.
void setLowText (const QString &s, bool readonly=false)
 Set the text in the lowTextBox.
 setMask (const QRegion &region)
 setMask (const QBitmap &bitmap)
 setMaximumHeight (int maxh)
 setMaximumSize (int maxw, int maxh)
 setMaximumSize (const QSize &)
 setMaximumWidth (int maxw)
 setMicroFocusHint (int x, int y, int width, int height, bool text=TRUE, QFont *f=0)
 setMinimumHeight (int minh)
 setMinimumSize (int minw, int minh)
 setMinimumSize (const QSize &)
 setMinimumWidth (int minw)
 setMouseTracking (bool enable)
 setPalette (const QPalette &)
 setPaletteBackgroundColor (const QColor &)
 setPaletteBackgroundPixmap (const QPixmap &)
 setPaletteForegroundColor (const QColor &)
 setShown (bool show)
 setSizeIncrement (int w, int h)
 setSizeIncrement (const QSize &)
 setSizePolicy (QSizePolicy::SizeType hor, QSizePolicy::SizeType ver, bool hfw=FALSE)
 setSizePolicy (QSizePolicy)
 setStyle (const QString &style)
 setStyle (QStyle *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.
 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 (const QRect &r)
 update (int x, int y, int w, int h)
 update ()
void updateCutControlValues (const Range &currentRange, const Range &fullRange)
 Set the textboxes and sliders to the values given by the arguments.
 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.

Private Member Functions

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

Private Attributes

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


Constructor & Destructor Documentation

AxisWidget::AxisWidget QWidget parent = 0,
const char *  name = 0,
Qt::WFlags  wflags = 0