Hardware Reference
In-Depth Information
Obviously, the fun lies in defining different patterns to send to the matrix in order
to end up with a cool animation. Don't hesitate to share your patterns by proposing
them in the repository.
A quick tour of the code
With this third example, I'd like to introduce you to a different approach for coding.
The starting point is the main where an instance is created. The project is coded
along two different classes:
MyButtonGroup : This is dedicated to the graphical representation of the
matrix (as opposed to the mathematical matrix)
Leds_Matrix_Tools : This contains all the functions related to the matrix,
writing the matrix, files operations, and so on
Adding code for 64 items individually is not viable; the object paradigm is done to
avoid it. Thus, we don't have to create, instantiate, and code an event for each LED
one by one in the graphical matrix. This is why MyButtonGroup was derived from
the original QButtonGroup class.
Then, each item in the matrix has a SIGNAL/SLOT connection:
connect(this,SIGNAL(buttonClicked(QAbstractButton*)),
this, SLOT(buttonClick(QAbstractButton*)));
 
Search WWH ::




Custom Search