Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0d1c6d1
Created a new file for each media type in the Backend directory and m…
DavideColabove Apr 23, 2025
8a51580
Created a new file src/Backend/Date.cpp, Created a new file src/Backe…
DavideColabove Apr 23, 2025
525f069
Updated Media.cpp with some implementations
DavideColabove Apr 23, 2025
2c56ce6
Added .gitignore and .gitattributes
DavideColabove Apr 23, 2025
a1e36fe
Edited src/Backend/Date.cpp, src/Backend/Date.h, src/Backend/Media.cp…
DavideColabove Apr 23, 2025
b836acb
Update .gitattributes
DavideColabove Apr 23, 2025
0637b16
Update .gitattributes
DavideColabove Apr 23, 2025
1e82b25
Update .gitattributes
DavideColabove Apr 23, 2025
fb93948
Merge branch 'Develop' of https://github.com/DavideColabove/Multimedi…
DavideColabove Apr 23, 2025
cc7e657
Edited Media.cpp
DavideColabove Aug 5, 2025
32108a7
Fixed Media.h and Media.cpp files to ensure proper functionality and …
DavideColabove Aug 5, 2025
3173780
Media.cpp and Media
DavideColabove Aug 5, 2025
2f5fee4
Added new methods in Media.cpp and Media.h
DavideColabove Aug 5, 2025
ffdef60
Added Movie.h and Movie.cpp
DavideColabove Aug 5, 2025
8737042
- Modified abstract Media base class with virtual destructor
m4hd1-exe Aug 6, 2025
76ad4e3
- Merged
m4hd1-exe Aug 6, 2025
1cd32dc
Refactor: Implement enum-based genres and languages, add custom Date …
m4hd1-exe Aug 6, 2025
95a83f8
Merge remote changes with local refactoring
m4hd1-exe Aug 6, 2025
2f7942d
feat: implement Library class and Qt GUI integration
m4hd1-exe Aug 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.cpp linguist-language=C++
*.h linguist-language=C++
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# IDE files
.vscode/
.idea/

# Qt build files
*.pro.user
*.pro.user.*
.qmake.stash
Makefile.Debug
Makefile.Release
release/
debug/
.qtc_clangd/

# Build directories
build/
*.o
*.exe
moc_*.cpp
moc_*.h
ui_*.h
qrc_*.cpp

# Temporary files
nul
*.tmp
*.log

# OS files
.DS_Store
Thumbs.db
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/MultimediaLibrary.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

580 changes: 580 additions & 0 deletions .idea/editor.xml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

840 changes: 840 additions & 0 deletions Makefile

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions MultimediaLibrary.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
QT += core widgets

CONFIG += c++17

TARGET = MultimediaLibrary
TEMPLATE = app

# Backend sources
SOURCES += \
src/main.cpp \
src/Backend/Elements/Date.cpp \
src/Backend/Elements/Media.cpp \
src/Backend/Elements/Book.cpp \
src/Backend/Elements/Movie.cpp \
src/Backend/Elements/Song.cpp \
src/Backend/Elements/Magazine.cpp \
src/Backend/Elements/Podcast.cpp \
src/Backend/Enums/Genres.cpp \
src/Backend/Enums/Languages.cpp \
src/Backend/Library/Library.cpp \
src/Frontend/Windows/MainWindow.cpp

# Backend headers
HEADERS += \
src/Backend/Elements/Date.h \
src/Backend/Elements/Media.h \
src/Backend/Elements/Book.h \
src/Backend/Elements/Movie.h \
src/Backend/Elements/Song.h \
src/Backend/Elements/Magazine.h \
src/Backend/Elements/Podcast.h \
src/Backend/Enums/Genres.h \
src/Backend/Enums/Languages.h \
src/Backend/Library/Library.h \
src/Frontend/Windows/MainWindow.h

# Include paths
INCLUDEPATH += \
src/Backend/Elements \
src/Backend/Enums \
src/Backend/Library \
src/Frontend/Windows

# Compiler flags
QMAKE_CXXFLAGS += -std=c++17 -Wall -Wextra

# Output directory
DESTDIR = build/bin
219 changes: 203 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,214 @@
# 📦 OOP Project – Academic Year 2024/2025
# Multimedia Library

## 📚 Multimedia Library
Una libreria multimediale completa con backend C++ e frontend Qt.

This repository contains the Object-Oriented Programming (OOP) project developed during the 2024/2025 academic year for the course taught by Professor Francesco Ranzato (SC1167 - Computer Science @UniPD).
## 🚀 **Caratteristiche**

The project demonstrates core OOP principles such as encapsulation, inheritance, polymorphism, and abstraction. It is designed following best practices in software design and aims to provide a clean, modular, and maintainable codebase.
- **Backend C++**: Gestione completa di libri, film, canzoni, riviste e podcast
- **Frontend Qt**: Interfaccia grafica moderna e intuitiva
- **Sistema di Enum**: Generi e lingue tipizzati per ogni tipo di media
- **Classe Date Personalizzata**: Gestione date con validazione
- **Build System Unificato**: Makefile per backend e frontend

## 🛠️ Technologies & Tools
## 📁 **Struttura del Progetto**

- Language: C++, Qt
- IDE: VS Code
```
MultimediaLibrary/
├── src/
│ ├── Backend/
│ │ ├── Elements/ # Classi base e derivate
│ │ │ ├── Media.h/.cpp # Classe base astratta
│ │ │ ├── Book.h/.cpp # Gestione libri
│ │ │ ├── Movie.h/.cpp # Gestione film
│ │ │ ├── Song.h/.cpp # Gestione canzoni
│ │ │ ├── Magazine.h/.cpp # Gestione riviste
│ │ │ ├── Podcast.h/.cpp # Gestione podcast
│ │ │ └── Date.h/.cpp # Classe data personalizzata
│ │ ├── Enums/ # Enum per generi e lingue
│ │ │ ├── Genres.h/.cpp
│ │ │ └── Languages.h/.cpp
│ │ └── Library/ # Gestione collezione media
│ │ └── Library.h/.cpp
│ ├── Frontend/
│ │ └── Windows/
│ │ └── MainWindow.h/.cpp # Interfaccia Qt
│ └── main.cpp # Entry point unificato
├── build/bin/ # Eseguibili compilati
├── Makefile # Build system per backend
├── MultimediaLibrary.pro # Progetto Qt
└── README.md # Questo file
```

## 📁 Structure
## 🛠️ **Prerequisiti**

- `src/`: Source code of the application
- `test/`: Unit tests
- `docs/`: Documentation and UML diagrams (if applicable)
### Per il Backend (Obbligatorio)
- **MSYS2** con MinGW-w64
- **Make** (installato tramite MSYS2)
- **g++** (compilatore C++17)

## ✅ Features
### Per il Frontend Qt (Opzionale)
- **Qt 6.8.3** installato in `D:\qt\6.8.3\mingw_64`
- **Qt Creator** per sviluppo

- [List here the main functionalities your project implements]
## 🔧 **Installazione e Setup**

## 🤝 Contributors
### 1. Installare Make (se non presente)
```bash
# Aggiungere al PATH
$env:PATH += ";C:\msys64\usr\bin"
```

- **Davide** - [GitHub](https://github.com/DavideColabove)
- **Oussama** - [GitHub](https://github.com/m4hd1-exe)
### 2. Configurare Qt (se installato)
```bash
# Aggiungere Qt al PATH
$env:PATH += ";D:\qt\6.8.3\mingw_64\bin"
```

## 🏗️ **Compilazione**

### Opzione 1: Usando il Makefile Personalizzato
```bash
# Compila solo il backend test
make test

# Compila la GUI Qt (se Qt disponibile)
make gui

# Compila tutto
make all

# Pulisci i file di build
make clean

# Mostra aiuto
make help
```

### Opzione 2: Usando Qt/qmake (Raccomandato per GUI)
```bash
# Genera Makefile da progetto Qt
qmake MultimediaLibrary.pro

# Compila
make

# Pulisci
make clean
```

## 🚀 **Esecuzione**

### Modalità Test (Backend)
```bash
# Esegue test del backend in console
./build/bin/MultimediaLibraryTest
# oppure
./build/bin/MultimediaLibraryTest --test
```

### Modalità GUI
```bash
# Avvia l'interfaccia grafica Qt
./build/bin/MultimediaLibrary.exe
# oppure
./build/bin/MultimediaLibrary.exe --gui
```

### Aiuto
```bash
./build/bin/MultimediaLibraryTest --help
./build/bin/MultimediaLibrary.exe --help
```

## 📚 **Classi e Funzionalità**

### Classe Base: `Media`
- **Attributi**: title, author, releaseDate, id, kbSize, isAvailable, imagePath
- **Metodi**: getters/setters, `isValid()` (virtuale puro)

### Classi Derivate
- **`Book`**: publisher, pages, isbn, language, genre (BookGenre)
- **`Movie`**: director, duration, rating, language, genre (MovieGenre)
- **`Song`**: artist, album, duration, genre (MusicGenre)
- **`Magazine`**: publisher, issue, language, genre (MagazineGenre)
- **`Podcast`**: host, episodes, duration, genre (PodcastGenre)

### Classe `Library` (Gestione Collezione)
- **CRUD Operations**: `addMedia()`, `removeMedia()`, `findMediaById()`, `getAllMedia()`
- **Search & Filter**: `searchByTitle()`, `searchByAuthor()`, `filterByType()`, `filterByAvailability()`
- **File Operations**: `saveToFile()`, `loadFromFile()` (formato CSV)
- **Statistics**: `getTotalCount()`, `getAvailableCount()`, `getMediaTypeStats()`
- **Utility**: `getNextId()`, `clear()`, `isEmpty()`

### Sistema Enum
- **Generi**: `BookGenre`, `MovieGenre`, `MusicGenre`, `MagazineGenre`, `PodcastGenre`
- **Lingue**: `Language`
- **Conversioni**: `enumToString()`, `stringToEnum()`

## 🎨 **Interfaccia Qt**

### Componenti Principali
- **Menu Bar**: File, Edit, Search, Help
- **Tool Bar**: Azioni rapide (Add, Edit, Delete, Search, Export)
- **Table Widget**: Visualizzazione tabellare dei media
- **Status Bar**: Messaggi di stato

### Funzionalità (da implementare)
- ✅ **Struttura base** completata
- 🔄 **AddMediaDialog** - Dialog per aggiungere media
- 🔄 **EditMediaDialog** - Dialog per modificare media
- 🔄 **SearchDialog** - Dialog per cercare e filtrare
- 🔄 **Import/Export** - Salvataggio e caricamento dati

## 🔍 **Debug e Sviluppo**

### Compilazione con Debug
```bash
make debug
```

### Verifica Qt
```bash
qmake --version
```

### Verifica Make
```bash
make --version
```

## 📝 **Note di Sviluppo**

### Per Aprire in Qt Creator
1. Apri `MultimediaLibrary.pro` in Qt Creator
2. Configura il kit MinGW
3. Compila ed esegui direttamente da Qt Creator

### Per Sviluppo da Terminale
1. Usa `make test` per testare il backend
2. Usa `qmake && make` per compilare la GUI
3. Usa `./build/bin/MultimediaLibrary.exe` per eseguire

## 🎯 **Prossimi Passi**

1. **Implementare AddMediaDialog** con ComboBox per generi e lingue
2. **Implementare EditMediaDialog** per modificare media esistenti
3. **Implementare SearchDialog** per cercare e filtrare
4. **Aggiungere validazione input** con QValidator
5. **Implementare salvataggio/caricamento** dati
6. **Aggiungere stili CSS** per migliorare l'aspetto

## ✅ **Stato Attuale**

- ✅ **Backend**: Completamente funzionante
- ✅ **Classi derivate**: Implementate con enum
- ✅ **Classe Library**: Gestione completa della collezione
- ✅ **Sistema build**: Makefile e qmake funzionanti
- ✅ **GUI base**: MainWindow con menu e toolbar
- ✅ **Qt integration**: Compilazione e linking corretti
- 🔄 **Dialog**: In sviluppo
- 🔄 **Funzionalità avanzate**: Da implementare

---

**Sviluppato con C++17, Qt 6.8.3 e Make** 🚀
Loading