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
FourierSpectrumGraph Class Reference

The QGraphicsView to display the fourier spectrum. More...

#include <fourierspectrumgraph.h>

+ Inheritance diagram for FourierSpectrumGraph:
+ Collaboration diagram for FourierSpectrumGraph:

Public Member Functions

 FourierSpectrumGraph (QWidget *parent)
 Constructor to link AutoScaledToKeyboardGraphicsView with the FourierSpectrumGraphDrawer. More...
 
virtual ~FourierSpectrumGraph ()
 Empty destructor. More...
 
- Public Member Functions inherited from AutoScaledToKeyboardGraphicsView
 AutoScaledToKeyboardGraphicsView (QWidget *parent, DrawerBase *drawer)
 Constructor. More...
 
 ~AutoScaledToKeyboardGraphicsView ()
 Destructor. More...
 
void setKeyboard (KeyboardGraphicsView *keyboardgraphicsview)
 Setter function for the keyboard. More...
 
void highlightKey (int key)
 Function that will highlight the given key. More...
 
- Public Member Functions inherited from GraphicsViewAdapterForQt
 GraphicsViewAdapterForQt (QWidget *parent, DrawerBase *drawer, QRectF sceneRect)
 Constructor. More...
 
 ~GraphicsViewAdapterForQt ()
 Destructor, removing all graphics items from the list. More...
 
void setSceneRect (const QRectF &rect)
 Setter function for the scene rectangle. More...
 
QPointF convertRelToAbs (const QPointF &p) const
 Converting from relative to absolute coordinates. More...
 
QSizeF convertRelToAbs (const QSizeF &s) const
 Converting from relative to absolute coordinates. More...
 
QLineF convertRelToAbsLine (qreal x1, qreal y1, qreal x2, qreal y2) const
 Converting of a line from relative to absolute coordinates. More...
 
QPointF convertAbsToRel (const QPointF &p) const
 Converting from absolute to relative coordinates. More...
 
- Public Member Functions inherited from GraphicsViewAdapter
 GraphicsViewAdapter ()
 Empty constructor. More...
 
 ~GraphicsViewAdapter ()
 Destructor clearing the view. More...
 
GraphicItemsListgetGraphicItems ()
 Get the list of the graphic items. More...
 
const GraphicItemsListgetGraphicItems () const
 Get a constant list of the graphic items. More...
 
GraphicsItemgetGraphicItem (int keyIndex, RoleType role)
 Get a single graphics element specified by its index and its role. More...
 
GraphicsItemgetGraphicItemByRole (RoleType role)
 Get the first of all graphics elements with a given role. More...
 
GraphicItemsList getGraphicItems (int keyIndex)
 Get a list of graphic items that match with the keyIndex. More...
 
GraphicItemsList getGraphicItemsByRole (RoleType role)
 Get a list of graphic items that match with the given role. More...
 
GraphicItemsList getGraphicItems (int keyIndex, RoleType role)
 Get the list of all graphics elements of a given key and role. More...
 
- Public Member Functions inherited from FourierSpectrumGraphDrawer
 FourierSpectrumGraphDrawer (GraphicsViewAdapter *graphics)
 Constructor of a FourierSpectrumGraphDrawer. More...
 
 ~FourierSpectrumGraphDrawer ()
 Empty destructor. More...
 
- Public Member Functions inherited from DrawerBase
 DrawerBase (GraphicsViewAdapter *graphics, double intervall=1.0/24.0)
 Constructor of a drawer. More...
 
 ~DrawerBase ()
 
void redraw (bool force=false)
 Function to completely redraw the scene. More...
 
bool requestRedraw (bool force=false)
 Check whether the content has to be redrawn. More...
 
- Public Member Functions inherited from MessageListener
 MessageListener (bool defaultActivation=true)
 
virtual ~MessageListener ()
 
bool isMessageListenerActive () const
 
void activateMessageListener ()
 
void deactivateMessageListener ()
 

Additional Inherited Members

- Public Types inherited from AutoScaledToKeyboardGraphicsView
enum  ItemRoles { ROLE_HIGHLIGHT = 1024 }
 
- Public Types inherited from GraphicsViewAdapter
enum  PenType {
  PEN_THIN_BLACK, PEN_MEDIUM_BLACK, PEN_THIN_VERY_LIGHT_GRAY, PEN_THIN_LIGHT_GRAY,
  PEN_THIN_DARK_GRAY, PEN_MEDIUM_LIGHT_GRAY, PEN_MEDIUM_DARK_GRAY, PEN_MEDIUM_GRAY,
  PEN_THIN_CYAN, PEN_MEDIUM_CYAN, PEN_MEDIUM_ORANGE, PEN_MEDIUM_MAGENTA,
  PEN_THIN_MAGENTA, PEN_THIN_RED, PEN_MEDIUM_RED, PEN_THIN_BLUE,
  PEN_THIN_TRANSPARENT, PEN_MEDIUM_DARK_GREEN
}
 Available pen types for drawing. More...
 
enum  FillTypes {
  FILL_TRANSPARENT, FILL_LIGHT_GRAY, FILL_RED, FILL_ORANGE,
  FILL_GREEN, FILL_LIGHT_GREEN, FILL_BLUE
}
 Available filling colors (e.g. to fill rectangles) More...
 
using RoleType = GraphicsItem::RoleType
 
using ComplexVector = std::vector< std::complex< double >>
 Abstract function: Draw stroboscope. More...
 
- Public Types inherited from FourierSpectrumGraphDrawer
enum  RoleType { ROLE_GLOBAL = 1, ROLE_CHART = 2, ROLE_PEAK = 4 }
 < Roles of the items used here More...
 
- Public Attributes inherited from FourierSpectrumGraphDrawer
const double updateInterval = 1.0
 Update interval at least 1 sec. More...
 
- Protected Member Functions inherited from AutoScaledToKeyboardGraphicsView
void showEvent (QShowEvent *event) override
 Reimplemented to keep the visible view with the KeyboardGraphicsView. More...
 
void resizeEvent (QResizeEvent *event) override
 Reimplemented to keep the visible view with the KeyboardGraphicsView. More...
 
- Protected Member Functions inherited from GraphicsViewAdapterForQt
void showEvent (QShowEvent *event) override
 Show the scene (reimplemented show event). More...
 
void resizeEvent (QResizeEvent *event) override
 Resize the scene (reimplemented resize event). More...
 
virtual void clear () override
 Clear the scene. More...
 
virtual GraphicsItemdrawLine (double x1, double y1, double x2, double y2, PenType pen) override
 Abstract function: Draw a line. More...
 
virtual GraphicsItemdrawChart (const std::vector< Point > &points, PenType pen) override
 Abstract function: Draw a chart (polygon). More...
 
virtual GraphicsItemdrawFilledRect (double x, double y, double w, double h, PenType pen, FillTypes fill) override
 Abstract function: Draw a filled rectangle. More...
 
virtual void drawStroboscope (const ComplexVector &data) override
 
- Protected Member Functions inherited from FourierSpectrumGraphDrawer
virtual void draw () overridefinal
 Draw the spectrum. More...
 
virtual void clear () overridefinal
 Clear the spectrum. More...
 
virtual void handleMessage (MessagePtr m) override
 Message dispatcher for FourierSpectrumGraphDrawer. More...
 
void updateSpectrum ()
 Function for updating the red curve showing the spectrum. More...
 
- Protected Attributes inherited from AutoScaledToKeyboardGraphicsView
KeyboardGraphicsViewmKeyboardGraphicsView
 Pointer to the KeyboardGraphicsView. More...
 
- Protected Attributes inherited from GraphicsViewAdapterForQt
DrawerBasemDrawer
 The drawer of this GraphicsViewAdapterForQt. More...
 
QGraphicsScene mScene
 The QGraphicsScene. More...
 
QRectF mSceneRect
 The scene rect. More...
 
- Protected Attributes inherited from DrawerBase
GraphicsViewAdaptermGraphics
 Pointer to the graphics view adapter. More...
 

Detailed Description

The QGraphicsView to display the fourier spectrum.

It will displayed the drawings of FourierSpectrumGraphDrawer to a AutoScaledToKeyboardGraphicsView.

Definition at line 32 of file fourierspectrumgraph.h.

Constructor & Destructor Documentation

FourierSpectrumGraph::FourierSpectrumGraph ( QWidget *  parent)

Constructor to link AutoScaledToKeyboardGraphicsView with the FourierSpectrumGraphDrawer.

Parameters
parent: Parent widget

Definition at line 22 of file fourierspectrumgraph.cpp.

FourierSpectrumGraph::~FourierSpectrumGraph ( )
virtual

Empty destructor.

Definition at line 27 of file fourierspectrumgraph.cpp.


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