The main concepts of this projectThis whole project will include a designer to create leds gures (AKA patterns) + a player to animate these patterns + a client to send patterns to a distant target board connected to a matrix. The Player will have 2 versions: as client of the Sender for the network version and as pattern reader who can import saved patterns from a le.Here is my question defined from a top-down approach analysis:Model from requirementsThis software will be used in different ways. You can use it from your PC as from any board that can handle binary executables.Let's list what is needed:Requirement listThe previous sections get you introduced to concepts and intentions of the global project. Now let's have an exhaustive features list of what we are waiting from this project.What we want is to:Design: a pattern or some sequences: computer Play: a recorded pattern or some sequences: anywhere Target: Able to play with any board that can run C++ or PythonNetwork data format: Able to evolve to any protocol, not only TCP. 1Unity: Both the designer and the player have to be in the same environment. No one stands to have different tools in in different places.Openness: The le format exported by the designer GUI can be easily used from another code/software.Flexibility: This is the master word in the project. For example, we want to be able to create patterns and sequences for different model of led matricesCreativity: Like openness, creativity is required to be able to implement any matrix model from the available models.Colors: Nowadays, there are so many displays that with different colors. The designer can handle all colors a matrix can provide.Division into objectsAfter generating a set of candidate classes and objects using the classical approach and behavior analysis, the next step was to identify a relationship between these objects and classes. BehaviorsUser design a pattern from the design modeUser design a sequence from the design modeUser run a pattern from the play modeUser run a sequence from the play modeDesigner write a pattern from the design modeDesigner write a sequence from the design modeplayer read a pattern from the play modeEvents analysisPlayer reads a sequence from the play modePlayer executes a pattern/sequence from the play modeSender sends a data packetTarget board executes playerTarget board sends commands to the LEDs in the matrixHere are some classes I have defined but I don't believe the global design is optimum. The main goal is to define according this Activity:Identifying scenariiThe objects are now identied so the next step in the analysis that come in mind is: How do these objects will interact together? 2 modes have been identied: DESIGN MODE and PLAY MODE. According to the previous list switching from a mode to another lets a user create patterns and test the creations directly by visualizing the animations on the computer screen.Design docsI've designed these classes, and I think that it could be improved, mostly the Mathmatrix class with better objects design and C++11. What do you think?Thus, according to these I've implemented a global class named ProjectMAtrix which instantiates the other classes.Here it is in a short example:projectmatrix.cpp:#include projectmatrix.hProjectMatrix::ProjectMatrix(const QString M_Name, const quint16 M_Cols, const quint16 M_Rows, const quint32 M_Colors){    MathMatrix ProjMatrix(M_Name,M_Cols,M_Rows,M_Colors);    ProjMatrix.SetLine(1,0xFF000001) ;    ProjMatrix.LineShift( 1);    ReadMatrix(ProjMatrix );   // ProjMatrix.TestMatrix();    SequenceManager Sequencer();}void ProjectMatrix::ReadMatrix(MathMatrix ImgToRead){    QVector<QRgb> MatrixToRead;    ImgToRead.GetTableVector( MatrixToRead );    for (auto it: MatrixToRead )        qDebug() <<  QString::number( it , 16 ) ;}projectmatrix.h:#ifndef PROJECTMATRIX_H#define PROJECTMATRIX_H#include matrix.h#include configurationmanager.h#include sequencemanager.hclass ProjectMatrix{private:    MathMatrix ProjMatrix ;public:    ProjectMatrix(const QString M_Name, const quint16 M_Cols, const quint16 M_Rows, const quint32 M_Colors);    void ReadMatrix(MathMatrix ImgToRead);};#endif // PROJECTMATRIX_Hmatrix.h:#include <QFile>#include <QImage>class MathMatrix{private:    QString Name ;    quint16 Cols;    quint16 Rows ;    quint32 Colors ;    QImage *WorkMatrix;public:    MathMatrix(const QString MName=Matrix Name, const quint16 MCols=8 , const quint16 MRows=8, const quint32 MColors=3);    ~MathMatrix();    QString getName()   { return Name   ;}    quint16 getCols()   { return Cols   ;}    quint16 getRows()   { return Rows   ;}    quint32 getColors() { return Colors ;}        void GetTableVector(QVector<QRgb> &MatrixVector );    bool SetPoint(int Col, int Row, quint32 Color);};#endif // MATRIX_Hmatrix.cpp:#include matrix.hMathMatrix::MathMatrix(const QString MName, const quint16 MCols, const quint16 MRows, const quint32 MColors):    Name(MName),Cols(MCols),Rows(MRows),Colors( MColors){     WorkMatrix = new QImage(Cols,Rows,QImage::Format_RGB32);     Name = MName;     Cols= MCols ;     Rows = MRows;     Colors  = MColors;     Reset();}MathMatrix::~MathMatrix(){}bool MathMatrix::SetPoint(int Col, int Row, quint32 Color){    if (! CheckRanges( Col, Row))        return false;    WorkMatrix->setPixel( Col, Row, Color );    return true ;}void MathMatrix::GetTableVector(  QVector<QRgb> &MatrixVector ){    for ( int row = 0; row < WorkMatrix->height() ; ++row )        for ( int col = 0; col < WorkMatrix->width(); ++col )        {            MatrixVector.push_back( GetPoint(row,col) );        }}
Matrix Project: defining a matrix CAD through objects design
c++;object oriented;c++11;qt