https://github.com/mitchcamza/bookshelf
A Book Management Application
https://github.com/mitchcamza/bookshelf
automated-testing factory-pattern model-view oo-design oop-principles qt6-gui qttest serialization singleton-pattern
Last synced: 4 months ago
JSON representation
A Book Management Application
- Host: GitHub
- URL: https://github.com/mitchcamza/bookshelf
- Owner: mitchcamza
- License: mit
- Created: 2024-07-20T17:38:56.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-02-22T02:26:25.000Z (4 months ago)
- Last Synced: 2025-02-22T03:23:01.278Z (4 months ago)
- Topics: automated-testing, factory-pattern, model-view, oo-design, oop-principles, qt6-gui, qttest, serialization, singleton-pattern
- Language: HTML
- Homepage: https://mitchcamza.github.io/COS3711-03/
- Size: 646 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BookShelf
A Book Management Application[](https://github.com/mitchcamza/COS3711-03/actions/workflows/build.yml)
[](https://github.com/mitchcamza/BookShelf/actions/workflows/test.yml)## Project Overview
- **Book Management**: Classes for representing and managing books (`Book`, `Author`, etc.) and functionality to read from and write to XML files.
- **Graphical User Interface**: A Qt Widgets-based GUI to interact with the book data.
- **CMake Build System**: The project uses CMake to manage the build process.## Features
- **Book Management**: Add, view, and manage a collection of books.
- **User Interface**: Intuitive GUI for interacting with the book collection.
- **Book Factory**: The `BookFactory` class utilizes the factory pattern for managaing the creation of books.
- **Custom Models**: The application uses `BookTableModel` to represent book data and `BookProxyModel` to filter and sort the data.
- **XML Serialization**: Export book data to an XML file using the `BookWriter` class.
- **Filter Books**: Filter books based on author name or book title.![alt text]()
## Getting Started
### Prerequisites
- **Qt**: Ensure you have Qt installed (version 5 or 6).
- **CMake**: Version 3.5 or higher.
- **C++ Compiler**: Ensure you have a C++17 compatible compiler.### Getting the Source Code
#### Option 1: Download the Release
1. **Download the Release**: Navigate to the [Releases](https://github.com/mitchcamza/COS3711-03-01/releases) page of this repository.
2. **Select the Latest Release**: Download the release with the version number formatted as `yyyy.mm.dd.`.
3. **Extract the Files**: Extract the downloaded archive to your desired location.#### Option 2: Clone the Repository
1. **Clone the Repository**:
```bash
git clone https://github.com/mitchcamza/COS3711-03-01
cd COS3711-03-01
```
2. **Checkout the COS3711-03-01 branch**
```bash
git checkout COS3711-03-01## Building the Project
### Option 1: Using Qt Creator
1. Open the top-level CMakeLists.txt file in Qt Creator.
2. Configure the project.
3. Build and run the project.### Option 2: Using the command line (on Linux)
1. **Navigate to the Project Directory**: Open a terminal or command prompt and navigate to the extracted project directory.
2. **Make sure the build script is executable**: On Linux:
```bash
sudo chmod +x ./build_and_run.sh
```
3. **Run the build script**:
```bash
sudo ./build_and_run.sh
```## Project Structure
```
MyProject/
├── CMakeLists.txt # Root CMake file for the entire project
├── src/ # Source directory
│ ├── CMakeLists.txt # CMake file for source code
│ ├── main.cpp
│ ├── author.h
│ ├── author.cpp
│ ├── book.h
│ ├── book.cpp
│ ├── bookfactory.h
│ ├── bookfactory.cpp
│ ├── bookinput.h
│ ├── bookinput.cpp
│ ├── bookproxymodel.h
│ ├── bookproxymodel.cpp
│ ├── booktablemodel.h
│ ├── booktablemodel.cpp
│ ├── bookwriter.h
│ ├── bookwriter.cpp
│ ├── filewriter.h
│ ├── filewriter.cpp
│ ├── mainwindow.h
│ └── mainwindow.cpp├── tests/ # Tests directory
│ ├── CMakeLists.txt # CMake file for tests
│ ├── testauthor.h
│ ├── testauthor.cpp
│ ├── testbook.h
│ ├── testbook.cpp
│ ├── testbookfactory.h
│ ├── testbookfactory.cpp
│ ├── testbookproxymodel.h
│ ├── testbookproxymodel.cpp
│ ├── testbooktablemodel.h
│ ├── testbooktablemodel.cpp
│ ├── testbookwriter.h
│ ├── testbookwriter.cpp
│ ├── testfilewriter.h
│ └── testfilewriter.cpp
```## Usage
The application allows users to manage a collection of books, including adding new books, filtering the list, and exporting or importing the collection as an XML file.### Adding a Book
1. Open the application.
2. Use the “New Book” button to add a new book.
3. Enter the book’s title, authors, publication date, and ISBN.
4. Save the book to add it to the collection.### Filtering Books
- Use the search bar to filter books by title or author name. The displayed results will update as you type.
### Exporting Books
1. Click on “Export Book List” in the file menu.
2. Choose a destination and file name for the XML file.
3. Save the file to export the current book list.## Author
Mitch Campbell[LinkedIn](https://www.linkedin.com/in/mitch-campbell-93b18919b/)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.