CalcPlusPlus is a professional, modern, and intuitive scientific calculator application developed using C++17 and the Qt6 framework. Designed for Linux (Ubuntu 22.04+), it offers a clean user interface, responsive layout, and persistent calculation history, making it a reliable tool for both basic and advanced mathematical operations.
- Version: v1.0.0
- Platform: Linux (Ubuntu 22.04+)
- Built with: C++17, Qt6 (Widgets, Core, GUI, SQL), CMake, SQLite
- Packaging:
.debinstaller generated via CPack
- Comprehensive Operations: Perform addition, subtraction, multiplication, division, percentages, exponentiation (x^y), and square roots.
- Precision Handling: Supports decimal values and negative numbers with double-precision floating-point arithmetic.
- Robustness: Includes integrated error handling to gracefully manage invalid expressions and mathematical exceptions like division by zero.
CalcPlusPlus features an intuitive dual-line display for clarity:
- Top Line: Shows the full mathematical expression as it's being entered or processed (e.g.,
75 × 3 + 2). - Bottom Line: Displays the current number being input or the partial/final result (e.g.,
227). - Post-Calculation View: After pressing the equals button (
=), the complete expression (e.g.,75 × 3 + 2 =) remains visible in a smaller, semi-transparent style above the final result, providing a clear record of the performed calculation.
A dedicated history panel, integrated seamlessly as a QDockWidget, provides a comprehensive record of all past calculations:
- Persistent Storage: All operations (expression and result) are automatically saved to a local SQLite database (
calc_history.db), ensuring history is retained across application sessions. - Scrollable List: Displays entries in a scrollable list, with each item showing the operation and its result.
- Recall Functionality: Clicking any history entry loads that specific expression and its result back into the main calculator display, allowing users to easily reuse or continue from previous calculations.
- Clear History: A convenient "Clear History" button is available within the panel to delete all stored entries.
- User-Friendly Alerts: Replaces generic system message boxes with custom-styled alert dialogs that match the application's dark theme.
- Clear Feedback: Provides user-friendly error messages for invalid expressions, mathematical exceptions (e.g.,
sqrt(-1)), and operational issues.
- Modern Dark Theme: Features a sleek dark theme with consistent typography, spacing, and color palette for an aesthetically pleasing experience.
- Responsive Layout: The window layout is designed to adapt gracefully to different display sizes, maintaining usability and visual appeal.
- Intuitive Button Arrangement: Buttons are arranged in a standard, easy-to-use calculator layout for efficient input.
The easiest way to install CalcPlusPlus on Ubuntu 22.04+ is by using the provided Debian package.
-
Download the
.debfile: Obtain the latestcalcplusplus_1.0.0_amd64.debfile from the Releases page. -
Install the package: Open a terminal in the directory where you downloaded the
.debfile and run:sudo dpkg -i calcplusplus_1.0.0_amd64.deb sudo apt install -f # To resolve any missing dependencies -
Launch CalcPlusPlus: Once installed, you can launch CalcPlusPlus from your system’s applications menu (look under "Utilities" or "Calculator") or by typing the command:
CalcPlusPlus
If you prefer to build CalcPlusPlus from source, follow these steps:
-
Install Dependencies: Ensure you have the necessary build tools and Qt6 development libraries installed:
sudo apt update sudo apt install qt6-base-dev qt6-base-dev-tools libsqlite3-dev cmake g++ ninja-build
-
Clone the Repository:
git clone https://github.com/CodeWithBotinaOficial/CalcPlusPlus.git cd CalcPlusPlus -
Build the Project:
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt6 cmake --build build --config Release
-
Run the Executable:
./build/CalcPlusPlus
- Project Structure:
src/core: Contains the core mathematical logic and the SQLite database manager.src/ui: Manages the Qt Widgets-based user interface and window components.src/utils: Provides utility classes for error handling and custom alerts.resources/: Stores application assets like icons and desktop entry files.
- Build System: CMake is used for cross-platform build configuration, with Ninja as the build tool.
- Database: SQLite3 is integrated for persistent storage of calculation history, automatically managed on application startup.
- Release Automation: GitHub Actions are configured to automate the build process, generate
.debpackages, and publish them to GitHub Releases and GitHub Packages upon new tag pushes.
This project is licensed under the MIT License. See the LICENSE file for details.
© 2025 Diego Alejandro Botina — CodeWithBotina