Skip to content

Latest commit

 

History

History
56 lines (47 loc) · 4.43 KB

README.md

File metadata and controls

56 lines (47 loc) · 4.43 KB

Table of contents

  1. Qontainer
  2. Model
  3. View
    1. Advanced search
    2. Adding content
  4. Compiling and Executing
  5. Special Thanks

Qontainer

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.

Model

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::vectoror 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.

View

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.

The Main Window

The Main 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).

Advanced Search

Advanced Search

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". research result

If you need to visualise it (through the Visualizza button), you will see every field that object has: visualising the object

Or, you can also edit whichever field you need to edit (clicking on Modifica on the Advanced Search window): Modifying the contents

Adding content

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. Adding content

Once you've chosen to add a Podcast, for example, the specific fields for podcasts will appear on screen: Adding a podcast

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.

Compiling and executing

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.

Special thanks:

To Federico Rispo, for your patience and support!