CFEL - ASG Software Suite  2.5.0
CASS
Public Types | Public Slots | Public Member Functions | Private Slots | Private Attributes | List of all members
jocassview::StatusLED Class Reference

a LED that should display the status More...

#include <status_led.h>

+ Inheritance diagram for jocassview::StatusLED:
+ Collaboration diagram for jocassview::StatusLED:

Public Types

enum  { fail, ok, off, busy }
 enum describing the possible states of the LED More...
 

Public Slots

void setStatus (int status)
 set the status More...
 
- Public Slots inherited from LED
void setState (bool state)
 
void toggleState ()
 
void setFlashing (bool flashing)
 
void setFlashRate (int rate)
 
void startFlashing ()
 
void stopFlashing ()
 

Public Member Functions

 StatusLED (QWidget *parent=0)
 constructor More...
 
- Public Member Functions inherited from LED
 LED (QWidget *parent=0)
 
 ~LED ()
 
double diameter () const
 
void setDiameter (double diameter)
 
QColor color () const
 
void setColor (const QColor &color)
 
Qt::Alignment alignment () const
 
void setAlignment (Qt::Alignment alignment)
 
bool state () const
 
bool isFlashing () const
 
int flashRate () const
 
int heightForWidth (int width) const
 
QSize sizeHint () const
 
QSize minimumSizeHint () const
 
- Public Member Functions inherited from QWidget
 ContextMenuPolicy
 
 FocusPolicy
 
 InputMethodHints
 
 LayoutDirection
 
 WindowFlags
 
 WindowModality
 
 QWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 
 actionEvent (QActionEvent *event)
 
 actions ()
 
 activateWindow ()
 
 addAction (QAction *action)
 
 addActions (QList< QAction * > actions)
 
 adjustSize ()
 
 ColorRole QWidget::backgroundRole()
 
 changeEvent (QEvent *event)
 
 childAt (int x, int y)
 
 childAt (const QPoint &p)
 
 clearFocus ()
 
 clearMask ()
 
 close ()
 
 closeEvent (QCloseEvent *event)
 
 contentsMargins ()
 
 contentsRect ()
 
 contextMenuEvent (QContextMenuEvent *event)
 
 create (WId window=0, bool initializeWindow=true, bool destroyOldWindow=true)
 
 customContextMenuRequested (const QPoint &pos)
 
 destroy (bool destroyWindow=true, bool destroySubWindows=true)
 
 dragEnterEvent (QDragEnterEvent *event)
 
 dragLeaveEvent (QDragLeaveEvent *event)
 
 dragMoveEvent (QDragMoveEvent *event)
 
 dropEvent (QDropEvent *event)
 
 effectiveWinId ()
 
 ensurePolished ()
 
 enterEvent (QEvent *event)
 
 event (QEvent *event)
 
 find (WId id)
 
 focusInEvent (QFocusEvent *event)
 
 focusNextChild ()
 
 focusNextPrevChild (bool next)
 
 focusOutEvent (QFocusEvent *event)
 
 focusPreviousChild ()
 
 focusProxy ()
 
 focusWidget ()
 
 fontInfo ()
 
 fontMetrics ()
 
 ColorRole QWidget::foregroundRole()
 
 getContentsMargins (int *left, int *top, int *right, int *bottom)
 
 getDC ()
 
 grabGesture (Qt::GestureType gesture, Qt::GestureFlags flags=Qt::GestureFlags()
 
 grabKeyboard ()
 
 grabMouse ()
 
 grabMouse (const QCursor &cursor)
 
 grabShortcut (const QKeySequence &key, Qt::ShortcutContext context=Qt::WindowShortcut)
 
 graphicsEffect ()
 
 graphicsProxyWidget ()
 
 hasEditFocus ()
 
 heightForWidth (int w)
 
 hide ()
 
 hideEvent (QHideEvent *event)
 
 inputContext ()
 
 inputMethodEvent (QInputMethodEvent *event)
 
 inputMethodQuery (Qt::InputMethodQuery query)
 
 insertAction (QAction *before, QAction *action)
 
 insertActions (QAction *before, QList< QAction * > actions)
 
 isAncestorOf (const QWidget *child)
 
 isEnabledTo (QWidget *ancestor)
 
 isHidden ()
 
 isVisibleTo (QWidget *ancestor)
 
 isWindow ()
 
 keyPressEvent (QKeyEvent *event)
 
 keyReleaseEvent (QKeyEvent *event)
 
 keyboardGrabber ()
 
 layout ()
 
 leaveEvent (QEvent *event)
 
 lower ()
 
 HANDLE QWidget::macCGHandle()
 
 macEvent (EventHandlerCallRef caller, EventRef event)
 
 HANDLE QWidget::macQDHandle()
 
 mapFrom (QWidget *parent, const QPoint &pos)
 
 mapFromGlobal (const QPoint &pos)
 
 mapFromParent (const QPoint &pos)
 
 mapTo (QWidget *parent, const QPoint &pos)
 
 mapToGlobal (const QPoint &pos)
 
 mapToParent (const QPoint &pos)
 
 mask ()
 
 metric (PaintDeviceMetric m)
 
 mouseDoubleClickEvent (QMouseEvent *event)
 
 mouseGrabber ()
 
 mouseMoveEvent (QMouseEvent *event)
 
 mousePressEvent (QMouseEvent *event)
 
 mouseReleaseEvent (QMouseEvent *event)
 
 moveEvent (QMoveEvent *event)
 
 nativeParentWidget ()
 
 nextInFocusChain ()
 
 overrideWindowFlags (Qt::WindowFlags flags)
 
 paintEngine ()
 
 paintEvent (QPaintEvent *event)
 
 parentWidget ()
 
 previousInFocusChain ()
 
 qwsEvent (QWSEvent *event)
 
 raise ()
 
 releaseDC (HDC hdc)
 
 releaseKeyboard ()
 
 releaseMouse ()
 
 releaseShortcut (int id)
 
 removeAction (QAction *action)
 
 render (QPaintDevice *target, const QPoint &targetOffset=QPoint()
 
 render (QPainter *painter, const QPoint &targetOffset=QPoint()
 
 repaint ()
 
 repaint (int x, int y, int w, int h)
 
 repaint (const QRect &rect)
 
 repaint (const QRegion &rgn)
 
 resizeEvent (QResizeEvent *event)
 
 restoreGeometry (const QByteArray &geometry)
 
 saveGeometry ()
 
 scroll (int dx, int dy)
 
 scroll (int dx, int dy, const QRect &r)
 
 setAttribute (Qt::WidgetAttribute attribute, bool on=true)
 
 setBackgroundRole (QPalette::ColorRole role)
 
 setContentsMargins (int left, int top, int right, int bottom)
 
 setContentsMargins (const QMargins &margins)
 
 setDisabled (bool disable)
 
 setEditFocus (bool enable)
 
 setFixedHeight (int h)
 
 setFixedSize (const QSize &s)
 
 setFixedSize (int w, int h)
 
 setFixedWidth (int w)
 
 setFocus (Qt::FocusReason reason)
 
 setFocus ()
 
 setFocusProxy (QWidget *w)
 
 setForegroundRole (QPalette::ColorRole role)
 
 setGraphicsEffect (QGraphicsEffect *effect)
 
 setHidden (bool hidden)
 
 setInputContext (QInputContext *context)
 
 setLayout (QLayout *layout)
 
 setMask (const QBitmap &bitmap)
 
 setMask (const QRegion &region)
 
 setParent (QWidget *parent)
 
 setParent (QWidget *parent, Qt::WindowFlags f)
 
 setShortcutAutoRepeat (int id, bool enable=true)
 
 setShortcutEnabled (int id, bool enable=true)
 
 setStyle (QStyle *style)
 
 setTabOrder (QWidget *first, QWidget *second)
 
 setWindowRole (const QString &role)
 
 setWindowState (Qt::WindowStates windowState)
 
 setWindowSurface (QWindowSurface *surface)
 
 setupUi (QWidget *widget)
 
 show ()
 
 showEvent (QShowEvent *event)
 
 showFullScreen ()
 
 showMaximized ()
 
 showMinimized ()
 
 showNormal ()
 
 stackUnder (QWidget *w)
 
 style ()
 
 tabletEvent (QTabletEvent *event)
 
 testAttribute (Qt::WidgetAttribute attribute)
 
 underMouse ()
 
 ungrabGesture (Qt::GestureType gesture)
 
 update ()
 
 update (int x, int y, int w, int h)
 
 update (const QRect &rect)
 
 update (const QRegion &rgn)
 
 updateGeometry ()
 
 updateMicroFocus ()
 
 visibleRegion ()
 
 wheelEvent (QWheelEvent *event)
 
 winEvent (MSG *message, long *result)
 
 winId ()
 
 window ()
 
 windowRole ()
 
 WindowStates QWidget::windowState()
 
 windowSurface ()
 
 WindowType QWidget::windowType()
 
 x11Event (XEvent *event)
 
 x11Info ()
 
 HANDLE QWidget::x11PictureHandle()
 

Private Slots

void turnOff ()
 turn the led of More...
 

Private Attributes

QTimer _offTimer
 the turn off timer More...
 

Additional Inherited Members

- Protected Member Functions inherited from LED
void paintEvent (QPaintEvent *event)
 
- Properties inherited from LED
double diameter
 
QColor color
 
Qt::Alignment alignment
 
bool state
 
bool flashing
 
int flashRate
 

Detailed Description

a LED that should display the status

Author
unknown
Lutz Foucar

Definition at line 22 of file status_led.h.

Member Enumeration Documentation

anonymous enum

enum describing the possible states of the LED

Enumerator
fail 
ok 
off 
busy 

Definition at line 28 of file status_led.h.

Constructor & Destructor Documentation

StatusLED::StatusLED ( QWidget parent = 0)

constructor

Parameters
parentthe parent of this widget

Definition at line 32 of file status_led.cpp.

References _offTimer, LED::setDiameter(), and turnOff().

Member Function Documentation

void StatusLED::setStatus ( int  status)
slot

set the status

Parameters
statusthe status that should be reflected by this

Definition at line 41 of file status_led.cpp.

References _offTimer, busy, QMessageBox::critical(), fail, off, ok, LED::setColor(), LED::setState(), and QTimer::start().

Referenced by jocassview::JoCASSViewer::JoCASSViewer(), turnOff(), and jocassview::JoCASSViewer::updateViewers().

void StatusLED::turnOff ( )
privateslot

turn the led of

Definition at line 74 of file status_led.cpp.

References off, and setStatus().

Referenced by StatusLED().

Member Data Documentation

QTimer jocassview::StatusLED::_offTimer
private

the turn off timer

Definition at line 49 of file status_led.h.

Referenced by setStatus(), and StatusLED().


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