A desktop application built with C++ and Qt for managing cinema operations, including movie schedules, seat reservations, and ticket bookings. This system supports both customer and administrative roles with a complete booking workflow and management interface.
Note: This is a school project developed for educational purposes.
The Cinema Ticket Booking System is a comprehensive solution designed to simplify every aspect of the movie-going experience—from securing tickets online to managing movie data and theater operations. The application features two main interfaces: one for end-users (moviegoers) and one for administrators. Each interface is tailored to deliver a seamless, secure, and engaging experience.
- Registration:
- Users must provide a username (min. 3 characters), strong password (min. 8 characters), valid email, first name (min. 2 characters), and last name.
- The system checks for empty fields and matching passwords before allowing registration, ensuring data integrity and security.
- Login:
- Confirms that the username and email match stored details, protecting against unauthorized access.
-
Home Screen:
Central hub for browsing available movies, booking tickets, and managing a personalized watchlist. -
Now Showing:
Dedicated section highlighting movies currently in theaters, with instant booking options. -
Book Now Module:
- Displays detailed movie information (title, director, genre, etc.).
- Enables users to choose a cinema, specify cinema type, select date/time, and reserve seats based on live availability.
- After seat selection, users securely finalize the booking.
-
Price Details & Discounts:
- Tickets offer varied pricing (Regular, Student, Senior) with automatic discount calculation.
- Multiple payment methods supported for flexibility at checkout.
-
Order Confirmation & Receipt:
- Generates a detailed receipt upon booking, confirming all details and total price.
-
Coming Soon & Watchlist:
- Users can mark upcoming movies and manage a personalized watchlist for easy tracking.
-
My Bookings:
- View and manage past bookings, download receipts, and cancel bookings if necessary.
The admin interface is a powerful backend toolset for operational management and data integrity, divided into several key components:
-
Movie Management:
- Add, update, or delete movies (with poster upload).
- Admins input or modify movie details (title, genre, director, description, release date).
-
Showtime Management:
- Create and schedule showtimes by assigning movies to specific cinemas, screens, dates, and times.
- Update or delete showtimes with confirmation prompts.
-
Cinema Management:
- Add new cinemas (name, type, seating capacity).
- Update or remove cinemas as needed.
-
Seat Management:
- Configure seating arrangements for each cinema by adding or modifying seats.
- Ensures accurate seat availability during booking.
-
Booking Management:
- View, add, update, or delete bookings.
- Includes verification steps for modifications or deletions.
-
User Management:
- View, add, update, or delete user accounts.
- Assign roles ('admin' or 'user') and securely manage user data.
-
Analytics Dashboard:
- View revenue reports and booking statistics.
The system uses MySQL with the following core tables:
- Users: User accounts, authentication, and roles
- Movies: Movie catalog with metadata and posters
- Theaters: Cinema locations and details
- CinemaTypes: Different formats (2D, 3D, IMAX, Director's Club) with price modifiers
- Showtimes: Movie scheduling with pricing
- Seats: Theater seating layout and numbering
- TicketTypes: Pricing tiers and discount percentages (Regular, Senior/PWD, Student)
- Bookings: Reservation records with payment tracking
- Watchlist: User movie preferences
- Qt Framework: 5.15+ or 6.x (Qt Widgets & Qt SQL modules)
- Compiler: C++17 compatible (MSVC 2019+, MinGW, GCC 9+, Clang 10+, Xcode 12+)
- Database: MySQL 8.0+ or MariaDB 10.5+
- MySQL Workbench: For database management (recommended)
- Platform: Windows 10+, Ubuntu 20.04+, or macOS 11+
git clone https://github.com/markalvincadangin/CinemaTicketBookingSystem.git- Download and install MySQL Server from MySQL Downloads
- Download and install MySQL Workbench from MySQL Workbench Downloads
- Remember your root password during installation
- Open MySQL Workbench
- Create a new connection:
- Connection Name:
Cinema System - Hostname:
localhost - Port:
3306(default) - Username:
root - Password: [Your MySQL root password]
- Connection Name:
- Test the connection and click OK
- Connect to your database server
- Create the database:
CREATE DATABASE IF NOT EXISTS cinema; USE cinema;
- Import the main schema:
- Go to
File→Open SQL Script - Select
cinema.sqlfrom your project folder - Click Execute to run the script
- Go to
- Import
cinema_preset_data.sqlusing the same steps as above
Run these queries in MySQL Workbench:
USE cinema;
SHOW TABLES;
SELECT COUNT(*) as movie_count FROM Movies;
SELECT COUNT(*) as user_count FROM Users;
SELECT COUNT(*) as theater_count FROM Theaters;
SELECT * FROM CinemaTypes;
SELECT * FROM TicketTypes;Expected Results:
- 9 tables: Users, Movies, Theaters, CinemaTypes, Showtimes, Seats, TicketTypes, Bookings, Watchlist
- Movies: 20+ sample movies
- Users: 1 admin user
- Theaters: 4 cinema locations
- CinemaTypes: 4 types (2D, 3D, IMAX, Director's Club)
- TicketTypes: 3 types (Regular, Senior/PWD, Student)
Edit the database connection settings in main.cpp around line 17:
QString dbDriver = "QMYSQL";
QString dbHost = "localhost";
QString dbName = "cinema";
QString dbUser = "root"; // Your MySQL username
QString dbPassword = "mark15"; // Change to YOUR MySQL passwordImportant: Replace "mark15" with your actual MySQL root password.
- Open Qt Creator
- Open Project: Select
CinemaTicketBookingSystem.pro - Configure Kit: Ensure Qt SQL module and MySQL drivers are available
- Build and Run: Press Ctrl+R or F5
qmake CinemaTicketBookingSystem.pro
make # Linux/macOS
nmake # Windows with MSVC
mingw32-make # Windows with MinGW- Ensure Qt VS Tools extension is installed
- Open
CinemaTicketBookingSystem.sln - Build solution (F7)
- Ensure MySQL server is running
- Run the executable from the build directory
- Login with admin credentials (if you imported sample data):
- Username:
admin - Password:
admin
- Username:
- Create regular user accounts through the registration dialog
- Register a new account or login with existing credentials
- Browse movies on the home page (Now Showing/Coming Soon)
- Select a movie and click "Book Now"
- Choose theater location and cinema type
- Select date and available showtime
- Pick seats from the interactive seating chart
- Choose ticket types (Regular/Senior/PWD/Student) for automatic discounts
- Complete checkout with payment details
- Receive booking confirmation with receipt
- Login with admin credentials (
admin/admin) - Manage Movies: Add, update, or delete movies
- Manage Showtimes: Create, update, or delete showtimes
- Manage Theaters and Seats: Add cinemas and configure seating
- Manage Bookings: View, modify, or cancel bookings
- Manage Users: Add, update, or delete user accounts
If you imported cinema_preset_data.sql:
- 4 Theaters: SM City, Robinsons Place, Vista Mall, Festive Walk (Iloilo locations)
- 4 Cinema Types: 2D (₱0), 3D (+₱50), IMAX (+₱120), Director's Club (+₱200)
- 3 Ticket Types: Regular (0%), Senior/PWD (20% discount), Student (15% discount)
- 20+ Movies: Mix of now showing, coming soon, and archived
- Admin Account: Username
admin, Passwordadmin - Sample Seats: Different configurations per theater
- MySQL not running: Start MySQL service
- Connection refused: Check port, firewall, and credentials in
main.cpp - QMYSQL driver not found: Reinstall Qt with SQL module, ensure MySQL client libraries, check
libmysql.dll
- Qt SQL module missing: Install Qt SQL addon
- C++17 errors: Update compiler or Qt version
- Missing UI files: Ensure
.uifiles are in project directory
- Stylesheet not loading: Check
resource.qrccompilation - Movie posters missing: Create
posters/directory with image files - Database queries failing: Check MySQL connection and table structure
- Database Connection: Modify connection settings in
main.cpp - Movie Posters: Place JPG/PNG files in
posters/directory - Styling: Edit QSS files in
styles/directory (if they exist) - Sample Data: Modify
cinema_preset_data.sqlto customize theaters, movies, and pricing - Seat Layout: Update seat configurations in MySQL Workbench
- Currency: Fixed to Philippine Peso (₱) pricing
- Payment: Simulation only, no real payment integration
- Deployment: Designed for local MySQL installation
- Security: Educational-level authentication (plain text passwords)
- Scalability: Single-user desktop application
For setup assistance:
- Database Issues: Use MySQL Workbench to verify connection and tables
- Build Problems: Check Qt Creator kit configuration and dependencies
- Runtime Errors: Review debug output and database logs
- File Paths: Ensure all project files are in correct locations
Common Solutions:
- Restart MySQL service if connection fails
- Rebuild project if UI changes don't appear
- Check
main.cppdatabase credentials - Verify Qt SQL module installation
This is an educational project developed for learning purposes. Not intended for commercial use.