{"id":24676263,"url":"https://github.com/hrosicka/simplecalculator","last_synced_at":"2025-03-21T16:47:04.479Z","repository":{"id":196716041,"uuid":"696967870","full_name":"hrosicka/SimpleCalculator","owner":"hrosicka","description":"The Calculator is a 💪 powerful and user-friendly desktop application. Perform basic arithmetic operations, keep track of your history, and save your results to a file with this tool.","archived":false,"fork":false,"pushed_at":"2024-04-13T11:18:17.000Z","size":2766,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T12:14:24.256Z","etag":null,"topics":["basic-calculator","calculator","calculator-app","calculator-application","calculator-python3","design","desktop-application","gui","math","object-oriented-programming","oop","oop-python","python","python-calculator","python3","simple-calculator-python","simplecalculator","test","unit-testing","unittests"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrosicka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-09-26T19:27:12.000Z","updated_at":"2024-12-22T18:45:15.000Z","dependencies_parsed_at":"2023-11-20T05:03:31.604Z","dependency_job_id":"aa010c7a-4bd1-4d1f-936e-f3c0a6ac2dbf","html_url":"https://github.com/hrosicka/SimpleCalculator","commit_stats":{"total_commits":40,"total_committers":2,"mean_commits":20.0,"dds":0.5,"last_synced_commit":"203b4cb2cad226417ee3e12bafdfaaea8da5c6f7"},"previous_names":["hrosicka/pyqtsimplecalculator","hrosicka/simplecalculator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrosicka%2FSimpleCalculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrosicka%2FSimpleCalculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrosicka%2FSimpleCalculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrosicka%2FSimpleCalculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrosicka","download_url":"https://codeload.github.com/hrosicka/SimpleCalculator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244831298,"owners_count":20517667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["basic-calculator","calculator","calculator-app","calculator-application","calculator-python3","design","desktop-application","gui","math","object-oriented-programming","oop","oop-python","python","python-calculator","python3","simple-calculator-python","simplecalculator","test","unit-testing","unittests"],"created_at":"2025-01-26T12:14:26.977Z","updated_at":"2025-03-21T16:47:04.449Z","avatar_url":"https://github.com/hrosicka.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Calculator\nThis user-friendly calculator lets you add, subtract, multiply, and divide with clear input fields and a comprehensive history.\n\n## Key Features:\n- **Simple Interface:** Effortless calculation with intuitive buttons and clear display.\n- **Error Handling:** Get notified of invalid input and division by zero attempts.\n- **Calculation History:** Track all your past calculations for easy reference.\n- **Save History (Optional):** Save your calculation history to a file for future use.\n\n## Main Window\nThe main window consists of several sections:\n- **Display:** This area shows the current result of the calculation.\n- **Input Fields:**\n  - **Number 1:** Enter the first number for the calculation.\n  - **Number 2:** Enter the second number for the calculation.\n- **History:** This text box displays the history of your previous calculations.\n- **Buttons:**\n  - **Sum ( + ):** Calculates the sum of Number 1 and Number 2.\n  - **Difference ( - ):** Calculates the difference between Number 1 and Number 2 (Number 1 - Number 2).\n  - **Product ( * ):** Calculates the product of Number 1 and Number 2 (Number 1 * Number 2).\n  - **Quotient ( / ):** Calculates the quotient of Number 1 and Number 2 (Number 1 / Number 2).\n  - **History Save:** Saves the current history to a text file.\n  - **Input Clear:** Clears the values in both Number 1 and Number 2 input fields.\n  - **History Clear:** Clears the text box containing the history of calculations.\n  - **Exit:** Closes the application.\n \n## Using the Calculator\n1. Enter the first number in the \"Number 1\" field.\n\n   ![](https://github.com/hrosicka/PyQtSimpleCalculator/blob/master/doc/MainWindow1.PNG)\n3. Enter the second number in the \"Number 2\" field.\n\n   ![](https://github.com/hrosicka/PyQtSimpleCalculator/blob/master/doc/MainWindow2.PNG)\n5. Click the button corresponding to the desired operation (Sum, Difference, Product, or Quotient).\n6. The result of the calculation will be displayed in the display area.\n   \n   ![](https://github.com/hrosicka/PyQtSimpleCalculator/blob/master/doc/ResultsAndHistory.PNG)\n8. The calculation will be added to the history box along with the formula used (e.g., \"5 + 3 = 8\").\n9. You can perform multiple calculations and view their history.\n\n## Saving History\n1. Click the \"History Save\" button.\n2. A dialog box will appear, allowing you to choose a location and filename to save the history as a text file.\n3. Once you select a location and filename, the history will be saved to the chosen file.\n4. Checks if the history is empty and displays a message box if so.\n\n   ![](https://github.com/hrosicka/SimpleCalculator/blob/master/doc/ErrorEmptyHistory.png)\n\n## Clearing Input and History\n- Click the \"Input Clear\" button to clear the values in both Number 1 and Number 2 input fields.\n- Click the \"History Clear\" button to clear the text box containing the history of calculations.\n\n## Error Handling\n- The application performs basic input validation. If you enter a non-numeric value in the input fields, an error message will be displayed, and the input fields will be highlighted in pink.\n  \n  ![](https://github.com/hrosicka/PyQtSimpleCalculator/blob/master/doc/InputError.PNG)\n- Division by zero is not allowed. If you attempt to divide by zero, an error message will be displayed, and the Number 2 input field will be highlighted in pink.\n  \n  ![](https://github.com/hrosicka/PyQtSimpleCalculator/blob/master/doc/ErrorDividedByZero.PNG)\n\n## Additional Notes\n- Tooltips are available for most buttons, providing a brief description of their functionality.\n  ![](https://github.com/hrosicka/PyQtSimpleCalculator/blob/master/doc/Tooltip.png)\n- The application uses a dark blue color scheme for buttons and message boxes, enhancing readability.\n\n## Unit tests\n### Class TestCalculator\nClass TestCalculator contains unit tests for the Calculator class.\n\nThese tests verify the functionality of the calculator's basic arithmetic operations (addition, subtraction, multiplication, and division) for various inputs, including:\n- Positive and negative numbers\n- Mixed combinations of positive and negative numbers\n- Zero values\n- Limit cases with very large or very small numbers\nThe tests also ensure that division by zero raises a CalculatorError.\n\n[MIT LICENSE](https://github.com/hrosicka/SimpleCalculator?tab=MIT-1-ov-file#readme)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrosicka%2Fsimplecalculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrosicka%2Fsimplecalculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrosicka%2Fsimplecalculator/lists"}