Qontainer
is a C++ application made for my object-oriented programming course at the University of Padua (Università degli studi di Padova).
It consists in a class hierarchy that represents a simple reality of Multimedia Content, which concretises as Videos and Audios, which also derive in Songs, Podcasts, Films and Episodes.
Realised within the Qt framework, the GUI is also completely written in C++. I've used a simplified version of the MVC design pattern, using only the Model and View version.
This comprehends the Multimedia Content hierarchy: the whole hierarchy is handled through a polymorphic template container, inside the class container.h
. This class has the purpose of implementing a whole new container class without using the standard ones, such as std::vector
or std::list
.
Another essential part of this project is the possibility of saving inside a .txt
file through serialization and reading the content of the file and creating the objects inside the model through deserialization. This is made possible through the database
class, which handles the loading and the saving of the/on file, calling the appropriate functions serializza
and deserializza
. The serialization function is virtual, so that it can behave differently according to the dynamic type of the element inside the container
.
Despite working in the Qt framework, the view was not made using Qt Designer, but instead using C++, just like the model.
Since there was the need to have multiple windows opening according to different events, the windows are handled by the qontainer
class, which opens and closes them as it is fit, deleting any garbage that might linger on the window.
On the Main Window you can see all the content you have inside your container
, and you can either search something to see the details (through the Ricerca Avanzata) button, or add some new content (through the Aggiungi contenuto button).
The search can be done through the Title (Titolo), Author (Autore) and Year (Anno di uscita) fields. Is accepts both uppercase and lowercase characters. Once you've searched the content you need to find, you can either edit it (modifica), visualise its details (visualizza), or delete it (elimina). The search also matches partial strings: for example, if you're searching for the Iron Man movies, you can just type in the Title field (titolo) "iron man", "iron", "i", or any letter or partial (but consecutive) string that is contained inside the result string "iron man".
If you need to visualise it (through the Visualizza button), you will see every field that object has:
Or, you can also edit whichever field you need to edit (clicking on Modifica on the Advanced Search window):
If you need to add content to your application, you can do it through the Aggiungi contenuto button on the main window. You will be taken to this window, where you will need to specify the type of the content you need to insert.
Once you've chosen to add a Podcast, for example, the specific fields for podcasts will appear on screen:
Afterwards, the new object gets created once you click on the Aggiungi button. This creates a ContenutoMultimediale*
, with the dynamic type podcast
, and inserts it into the container
.
You will need to have qmake
installed on your computer. The steps to compiling and executing this application are, once you're inside the folder where the project is located, respectively qmake
and then make
.
To Federico Rispo, for your patience and support!