A Book Management Application
- 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.
- 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 andBookProxyModel
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.
- 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.
- Download the Release: Navigate to the Releases page of this repository.
- Select the Latest Release: Download the release with the version number formatted as
yyyy.mm.dd.<question_number>
. - Extract the Files: Extract the downloaded archive to your desired location.
- Clone the Repository:
git clone https://github.com/mitchcamza/COS3711-03-01 cd COS3711-03-01
- Checkout the COS3711-03-01 branch
git checkout COS3711-03-01
- Open the top-level CMakeLists.txt file in Qt Creator.
- Configure the project.
- Build and run the project.
- Navigate to the Project Directory: Open a terminal or command prompt and navigate to the extracted project directory.
- Make sure the build script is executable: On Linux:
sudo chmod +x ./build_and_run.sh
- Run the build script:
sudo ./build_and_run.sh
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
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.
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.
- Use the search bar to filter books by title or author name. The displayed results will update as you type.
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.
Mitch Campbell
This project is licensed under the MIT License - see the LICENSE file for details.