Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RecordingStatusGraphicsView Class Reference

The QGraphicsView that will display the current recording status. More...

#include <recordingstatusgraphicsview.h>

+ Inheritance diagram for RecordingStatusGraphicsView:
+ Collaboration diagram for RecordingStatusGraphicsView:

Public Member Functions

 RecordingStatusGraphicsView (QWidget *parent)
 Default constructor. More...
 
virtual ~RecordingStatusGraphicsView ()
 Emptry virtual destructor. More...
 
virtual QSize minimumSizeHint () const overridefinal
 

Protected Member Functions

virtual QSize sizeHint () const overridefinal
 
void showEvent (QShowEvent *event) override
 Reimplemented show event that will fit the SCENE_RECT into the view. More...
 
void resizeEvent (QResizeEvent *event) override
 Reimplemented resize event that will fit the SCENE_RECT into the view. More...
 
void handleMessage (MessagePtr m) overridefinal
 Message handling. More...
 
- Protected Member Functions inherited from MessageListener
 MessageListener (bool defaultActivation=true)
 
virtual ~MessageListener ()
 
bool isMessageListenerActive () const
 
void activateMessageListener ()
 
void deactivateMessageListener ()
 

Private Slots

void onProcess ()
 Called by the timer to rotate the blue circle. More...
 

Private Member Functions

void setItemVisible (const std::vector< QGraphicsItem * > &items, bool visible)
 Function to show or hide a group of items. More...
 

Private Attributes

QGraphicsScene mScene
 The graphics scene. More...
 
std::vector< QGraphicsItem * > mRecordItems
 Items that are used to draw the recording state. More...
 
std::vector< QGraphicsItem * > mPauseItems
 Items that are used to draw the pause state. More...
 
std::vector< QGraphicsItem * > mProgressItems
 Items that are used to draw the analysing state. More...
 
QTimer mProgressTimer
 Timer to shoot a onProgress() at a fixed time intervall. More...
 

Static Private Attributes

static const QRectF SCENE_RECT
 The scene rect of the QGraphicsScene. More...
 

Detailed Description

The QGraphicsView that will display the current recording status.

It will draw a red circle if recording is active. A blue rotating circle is drawn if the signal is analiysed. A green pause symbol is shown if the recorder is inactive and ready for a new keystroke.

Definition at line 37 of file recordingstatusgraphicsview.h.

Constructor & Destructor Documentation

RecordingStatusGraphicsView::RecordingStatusGraphicsView ( QWidget *  parent)

Default constructor.

Parameters
parent: The parent widget

Definition at line 28 of file recordingstatusgraphicsview.cpp.

+ Here is the call graph for this function:

RecordingStatusGraphicsView::~RecordingStatusGraphicsView ( )
virtual

Emptry virtual destructor.

Definition at line 76 of file recordingstatusgraphicsview.cpp.

Member Function Documentation

void RecordingStatusGraphicsView::handleMessage ( MessagePtr  m)
finaloverrideprotectedvirtual

Message handling.

Parameters
m: The message

It will listen to the messages for recording and signal analysis and set the displayed graphic.

Implements MessageListener.

Definition at line 97 of file recordingstatusgraphicsview.cpp.

+ Here is the call graph for this function:

virtual QSize RecordingStatusGraphicsView::minimumSizeHint ( ) const
inlinefinaloverridevirtual

Definition at line 58 of file recordingstatusgraphicsview.h.

void RecordingStatusGraphicsView::onProcess ( )
privateslot

Called by the timer to rotate the blue circle.

Definition at line 131 of file recordingstatusgraphicsview.cpp.

void RecordingStatusGraphicsView::resizeEvent ( QResizeEvent *  event)
overrideprotected

Reimplemented resize event that will fit the SCENE_RECT into the view.

Parameters
event: The QResizeEvent

Definition at line 91 of file recordingstatusgraphicsview.cpp.

void RecordingStatusGraphicsView::setItemVisible ( const std::vector< QGraphicsItem * > &  items,
bool  visible 
)
private

Function to show or hide a group of items.

Parameters
items: The item group
visible: Hide or show

Definition at line 125 of file recordingstatusgraphicsview.cpp.

void RecordingStatusGraphicsView::showEvent ( QShowEvent *  event)
overrideprotected

Reimplemented show event that will fit the SCENE_RECT into the view.

Parameters
event: The QShowEvent

Definition at line 86 of file recordingstatusgraphicsview.cpp.

QSize RecordingStatusGraphicsView::sizeHint ( ) const
finaloverrideprotectedvirtual

Definition at line 81 of file recordingstatusgraphicsview.cpp.

Member Data Documentation

std::vector<QGraphicsItem* > RecordingStatusGraphicsView::mPauseItems
private

Items that are used to draw the pause state.

Definition at line 108 of file recordingstatusgraphicsview.h.

std::vector<QGraphicsItem* > RecordingStatusGraphicsView::mProgressItems
private

Items that are used to draw the analysing state.

Definition at line 111 of file recordingstatusgraphicsview.h.

QTimer RecordingStatusGraphicsView::mProgressTimer
private

Timer to shoot a onProgress() at a fixed time intervall.

Definition at line 114 of file recordingstatusgraphicsview.h.

std::vector<QGraphicsItem* > RecordingStatusGraphicsView::mRecordItems
private

Items that are used to draw the recording state.

Definition at line 105 of file recordingstatusgraphicsview.h.

QGraphicsScene RecordingStatusGraphicsView::mScene
private

The graphics scene.

Definition at line 102 of file recordingstatusgraphicsview.h.

const QRectF RecordingStatusGraphicsView::SCENE_RECT
staticprivate

The scene rect of the QGraphicsScene.

Definition at line 42 of file recordingstatusgraphicsview.h.


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