Skip to content

Repository files navigation

Multimedia Library

A complete and modern multimedia library with C++17 backend and Qt 6 frontend, designed to manage books, movies, songs, magazines, and podcasts with an elegant and functional graphical interface.

πŸš€ Main Features

  • 🎯 C++17 Backend: Robust architecture with advanced design patterns
  • 🎨 Qt 6 Frontend: Modern graphical interface with Material UI dark theme
  • πŸ” Advanced Search: Real-time textual search + advanced filters
  • πŸ“± Responsive UI: Adaptive grid that automatically resizes
  • 🎡 Multi-Media Support: 5 media types with specific properties
  • πŸ’Ύ Data Persistence: Save/load in JSON and XML
  • ⌨️ Keyboard Shortcuts: Fast navigation with global shortcuts
  • 🎭 Customizable Theme: Advanced CSS styling with SVG icons

πŸ“ Project Structure

MultimediaLibrary/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Backend/
β”‚   β”‚   β”œβ”€β”€ Elements/              # Base and derived classes
β”‚   β”‚   β”‚   β”œβ”€β”€ Media.h/.cpp       # Abstract base class
β”‚   β”‚   β”‚   β”œβ”€β”€ Book.h/.cpp        # Book management
β”‚   β”‚   β”‚   β”œβ”€β”€ Movie.h/.cpp       # Movie management
β”‚   β”‚   β”‚   β”œβ”€β”€ Song.h/.cpp        # Song management
β”‚   β”‚   β”‚   β”œβ”€β”€ Magazine.h/.cpp    # Magazine management
β”‚   β”‚   β”‚   β”œβ”€β”€ Podcast.h/.cpp     # Podcast management
β”‚   β”‚   β”‚   └── Date.h/.cpp        # Custom date class
β”‚   β”‚   β”œβ”€β”€ Enums/                 # Typed enums for genres and languages
β”‚   β”‚   β”‚   β”œβ”€β”€ Genres.h/.cpp      # Genres for all media types
β”‚   β”‚   β”‚   └── Languages.h/.cpp   # Supported languages
β”‚   β”‚   β”œβ”€β”€ Library/               # Media collection management
β”‚   β”‚   β”‚   └── Library.h/.cpp     # CRUD, search, filters, statistics
β”‚   β”‚   └── Persistence/           # Data save/load
β”‚   β”‚       β”œβ”€β”€ JsonPersistence.h/.cpp
β”‚   β”‚       └── XmlPersistence.h/.cpp
β”‚   β”œβ”€β”€ Frontend/
β”‚   β”‚   β”œβ”€β”€ Windows/               # Main interfaces
β”‚   β”‚   β”‚   β”œβ”€β”€ MainWindow.h/.cpp  # Main window
β”‚   β”‚   β”‚   β”œβ”€β”€ MediaCard.h/.cpp   # Card for each media
β”‚   β”‚   β”‚   β”œβ”€β”€ AddMediaDialog.h/.cpp # Add/edit dialog
β”‚   β”‚   β”‚   └── SearchDialog.h/.cpp   # Advanced search dialog
β”‚   β”‚   └── Resources/             # Graphic resources
β”‚   β”‚       └── icons/             # SVG icons for each media type
β”‚   └── main.cpp                   # Application entry point
β”œβ”€β”€ resources.qrc                   # Qt resources file
β”œβ”€β”€ MultimediaLibrary.pro           # Qt project
β”œβ”€β”€ Frontend_Documentation.md       # Frontend documentation
β”œβ”€β”€ Backend_Documentation.md        # Backend documentation
└── README.md                       # This file

πŸ› οΈ Prerequisites

Backend (Required)

  • MSYS2 with MinGW-w64
  • Make (installed via MSYS2)
  • g++ (C++17 compiler)

Qt Frontend (Required)

  • Qt 6.8.3 installed in D:\qt\6.8.3\mingw_64
  • Qt Creator for development (optional)
  • Module QtSvg (required)

πŸ”§ Installation and Setup

1. Install Make (if not present)

# Add to PATH
$env:PATH += ";C:\msys64\usr\bin"

2. Configure Qt

# Add Qt to PATH
$env:PATH += "path"

πŸ—οΈ Compilation

Option 1: Qt/qmake (Recommended)

# Generate Makefile from Qt project
qmake MultimediaLibrary.pro

# Compile
make

# Clean
make clean

Linux quick setup

# Install build deps (auto-detects distro)
bash scripts/setup-linux.sh

# Build
qmake MultimediaLibrary.pro  # or qmake6
make
./build/bin/MultimediaLibrary

Nota: il progetto richiede QtSvg. In assenza del modulo, il file .pro fallirΓ  con un messaggio chiaro.

πŸš€ Execution

GUI Mode (Main)

# Launch Qt graphical interface
./build/bin/MultimediaLibrary.exe

🎯 Implemented Features

βœ… Complete Backend

  • Media Base Class: Abstract interface for all types
  • Derived Classes: Book, Movie, Song, Magazine, Podcast
  • Enum System: Typed genres and languages for each media
  • Library Class: Complete CRUD, search, filters, statistics
  • Persistence: Save/load in JSON and XML
  • Validation: Data integrity checks

βœ… Advanced Qt Frontend

  • MainWindow: Main interface with adaptive layout
  • MediaCard: Responsive card for each media with fallback icon
  • Search Bar: Real-time textual search
  • Advanced Search: Complex filters for genre, dates, type
  • Add/Edit Dialog: Media creation and modification with validation
  • Sidebar: Category navigation with SVG icons
  • Responsive Grid: Grid that automatically adapts

βœ… Advanced UX/UI

  • Dark Theme: Material UI with vibrant colors
  • SVG Icons: Scalable and customizable
  • Adaptive Layout: Automatically resizes
  • Keyboard Shortcuts: Ctrl+F (search), Ctrl+N (new), etc.
  • Animations: Smooth transitions between views
  • Responsive Design: Adapts to different window sizes

πŸ“š Architecture and Design Patterns

Backend Patterns

  • Inheritance/Polymorphism: Media hierarchy with derived classes
  • Visitor Pattern: MediaVisitor for type-specific operations
  • Strategy Pattern: Persistence in different formats
  • Factory Pattern: Dynamic creation of media objects
  • Observer Pattern: Change notifications

Frontend Patterns

  • MVC: Separation between logic and presentation
  • Signal/Slot: Asynchronous Qt communication
  • Widget Composition: Modular UI assembly
  • Resource Management: Centralized resource management

🎨 User Interface

Main Components

  • Menu Bar: File, Edit, View, Help with shortcuts
  • Search Bar: Quick search + advanced filters
  • Sidebar: Categories with SVG icons
  • Media Grid: Responsive grid with cards
  • Details Panel: Detailed view with cover and attributes
  • Status Bar: Information and status messages

UI Features

  • Instant Search: Filters in real-time by title/author
  • Sorting: By title or date (ascending/descending)
  • Advanced Filters: By genre, language, availability, dates
  • Drag & Drop: Cover images
  • Responsive Grid: Automatically adapts to window
  • Dark Theme: Material UI colors with vibrant icons

πŸ” Search System

Quick Search (Search Bar)

  • Real-time: Activates with each character typed
  • Case-insensitive: Doesn't distinguish uppercase/lowercase
  • Multi-field: Searches in title AND author
  • Integrated: Works with other filters

Advanced Search (SearchDialog)

  • Multiple Filters: Genre, language, dates, availability
  • Logical Combinations: Logically combinable filters
  • Persistence: Maintains filters between sessions
  • Reset: Button to clear all filters

πŸ’Ύ Data Management

Supported Formats

  • JSON: Main format, readable and compatible
  • XML: Alternative format for interoperability

Operations

  • Import/Export: Data loading and saving
  • Backup: Automatic saving
  • Validation: Data integrity checks
  • Migration: Conversion between formats

🎡 Supported Media Types

Book

  • Properties: Title, author, publisher, pages, ISBN, language, genre
  • Genres: Fiction, Non-Fiction, Mystery, Thriller, Romance, Sci-Fi, Fantasy, Horror, Historical, Biography, Self-Help, Business, Philosophy, Religion, Science, Technology, Cooking, Travel, Poetry, Drama, Children, Young Adult, Academic

Movie

  • Properties: Title, director, duration, rating, language, genre
  • Genres: Action, Adventure, Comedy, Drama, Horror, Thriller, Sci-Fi, Fantasy, Romance, Documentary, Animation, Crime, Mystery, War, Western, Musical, Historical, Biographical, Family, Superhero

Song

  • Properties: Title, artist, album, duration, genre
  • Genres: Pop, Rock, Jazz, Classical, Hip-Hop, Electronic, Country, Blues, Folk, R&B, Metal, Punk, Reggae, World, Alternative, Indie, Gospel, Soul, Funk, Disco

Magazine

  • Properties: Title, publisher, issue, language, genre
  • Genres: News, Fashion, Technology, Science, Health, Business, Politics, Entertainment, Sports, Travel, Food, Home, Art, Literature, Education, Finance, Lifestyle, Automotive, Gaming, Music

Podcast

  • Properties: Title, host, episodes, duration, genre
  • Genres: News, Technology, Business, Education, Entertainment, Comedy, True Crime, History, Science, Health, Politics, Sports, Music, Arts, Literature, Philosophy, Religion, Travel, Food, Lifestyle

Supported Languages

"Italian", "English", "Spanish", "French", "German", "Portuguese", "Russian", "Chinese", "Japanese", "Korean", "Arabic", "Hindi", "Dutch", "Swedish", "Norwegian", "Danish", "Finnish", "Polish", "Czech", "Hungarian", "Romanian", "Bulgarian", "Greek", "Turkish", "Hebrew", "Persian", "Thai", "Vietnamese", "Indonesian", "Malay", "Filipino", "Latin", "Ancient Greek", "Sanskrit", "Old English", "Middle English", "Old French", "Old German", "Old Italian", "Old Spanish", "Old Portuguese", "Old Russian", "Old Chinese", "Old Japanese", "Old Korean", "Old Arabic", "Old Hindi", "Old Dutch", "Old Swedish", "Old Norwegian", "Old Danish", "Old Finnish", "Old Polish", "Old Czech", "Old Hungarian", "Old Romanian", "Old Bulgarian", "Old Greek", "Old Turkish", "Old Hebrew", "Old Persian", "Old Thai", "Old Vietnamese", "Old Indonesian", "Old Malay", "Old Filipino", "Old Latin", "Old Ancient Greek", "Old Sanskrit", "Other"

πŸ”§ Debug and Development

Debug Compilation

make debug

Qt Verification

qmake --version

Make Verification

make --version

Logging and Debug

  • Error Handling: Robust error management
  • Performance Monitoring: Performance metrics
  • Memory Management: Optimized memory management

πŸ“ Development Notes

To Open in Qt Creator

  1. Open MultimediaLibrary.pro in Qt Creator
  2. Configure MinGW kit
  3. Compile and run directly from Qt Creator

For Terminal Development

  1. Use qmake && make to compile GUI
  2. Use ./build/bin/MultimediaLibrary.exe to run
  3. Use make clean to clean build files

Code Structure

  • Backend: Pure C++17, no Qt dependencies
  • Frontend: Qt 6, complete graphical interface
  • Separation: Business logic separated from UI
  • Modularity: Reusable and testable components

🎯 Next Steps and Roadmap

Phase 1: Stabilization (Completed βœ…)

  • βœ… Robust backend architecture
  • βœ… Complete Qt interface
  • βœ… Advanced search system
  • βœ… JSON/XML data persistence

Phase 2: UX Improvements (In Progress πŸ”„)

  • πŸ”„ Grid performance optimization
  • πŸ”„ Responsive design improvement
  • πŸ”„ Smooth animations addition
  • πŸ”„ User theme customization

βœ… Current Project Status

Backend (100% βœ…)

  • βœ… Architecture: Design patterns implemented
  • βœ… Media Classes: Complete and functional hierarchy
  • βœ… Enum System: Typed genres and languages
  • βœ… Library Class: CRUD, search, filters, statistics
  • βœ… Persistence: JSON and XML working
  • βœ… Validation: Complete integrity checks

Frontend (95% βœ…)

  • βœ… MainWindow: Complete main interface
  • βœ… MediaCard: Responsive card with fallback
  • βœ… Search System: Quick + advanced search
  • βœ… Add/Edit Dialog: Media creation and modification
  • βœ… Sidebar: Category navigation
  • βœ… Grid System: Adaptive and responsive grid
  • βœ… Theme System: Complete Material UI dark theme
  • βœ… Shortcuts: Keyboard shortcuts
  • πŸ”„ Performance: Optimizations in progress

Documentation (90% βœ…)

  • βœ… README: Complete project guide
  • βœ… Frontend Documentation: Frontend documentation
  • βœ… Backend Documentation: Backend documentation
  • πŸ”„ Code Comments: Comments in code

Testing and Quality (90% βœ…)

  • βœ… Compilation: Working build system
  • βœ… Runtime: Stable and performant application
  • βœ… Error Handling: Robust error management
  • πŸ”„ Integration Tests: Integration tests planned

Developed with ❀️ using C++17, Qt 6.8.3 and Make πŸš€

About

This repository contains the OOP project for the 2025 course taught by Professor Francesco Ranzato. It showcases key object oriented principles such as encapsulation, inheritance, and polymorphism, with a focus on clean and modular design.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages