Skip to content

ErfannKhastar/Countdown-Timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyQt6 Countdown Timer ⏳

A sleek and intuitive desktop countdown timer application built using Python and the PyQt6 framework. Set a specific duration, watch the live countdown in a dedicated window, and get notified with an alarm sound when the time is up.

Main Window Timer Window


🚀 Features

Feature Description
⏱️ Flexible Time Input Set the countdown duration with separate inputs for hours, minutes, and seconds.
🪟 Dedicated Window The countdown appears in a separate, clean window to help you focus on the remaining time.
⏯️ Pause & Resume Easily pause the timer and resume it from exactly where you left off.
🔄 Reset Functionality Restart the countdown from the originally set time at any moment with a single click.
🎵 Audio Notification An alarm sound (alarm.mp3) plays automatically when the timer reaches zero.
🛡️ Smart Validation Prevents starting the timer if the time is set to 00:00:00, avoiding logical errors.

🛠️ Technologies Used

  • Python 3: Core backend logic and time management.
  • PyQt6: Used for building the graphical user interface (GUI) and handling multiple windows.
  • Pygame: Utilized for its mixer module to handle seamless audio playback.
  • Threading: Ensures the alarm sound plays in the background without freezing the application's interface.

📦 Requirements & Installation

To run this application, you need Python 3 installed on your system. It is highly recommended to use a virtual environment (.venv).

  1. Clone the Repository:

    git clone <your-repository-url>
    cd <repository-folder>
  2. Install Dependencies: Install the required libraries using the provided requirements file:

    pip install -r requirements.txt
  3. Run the Application: Execute the main.py script from the src directory to launch the timer:

    python src/main.py

⚙️ How It Works

  1. The application starts with a main settings window where you can select the desired duration.
  2. Clicking Set validates the input. If a valid time is provided, it calculates the total seconds and opens a secondary countdown window.
  3. A QTimer triggers every second, updating the display in real-time.
  4. You can use the Pause/Resume or Reset buttons to control the flow.
  5. Once the countdown hits zero, a background thread uses pygame.mixer to play the alarm sound, and a message box pops up to notify you.

🤝 Support & Feedback

If you found this project helpful or interesting, please consider giving it a Star ⭐️ on GitHub! Feel free to open an issue or leave a comment if you have any suggestions, feedback, or found a bug. Your input helps make this project better.

📬 Contact Me

Let's connect! You can find my links and reach out to me through my GitHub profile bio:

  • Check out my GitHub Profile for Email, Telegram, LinkedIn, and Instagram links.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A sleek and intuitive desktop countdown timer built with Python and PyQt6. Features multiple windows, pause/resume functionality, and audio notifications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages