This project is mainly a Windows Desktop application that uses the following technologies:
- C++
- Qt6 (GUI Framework)
- SQLite3 Database
- Author: Mario Fares
- Title: Ebook Access
- Version: v2.0
- Architecture: x64
- There are no third-party libraries that the user needs to install. The project is set up in a way such that if you follow the instructions and choose the right options in the Qt Installer, you can immediately compile the project with no hassles.
We must first set up our dev environment. Please follow the steps below:
- Go to Qt Online Installer Page
- Scroll down until you find
Download the Qt Online Installer
- Click Download
- Once the installer is downloaded run it and follow the below steps
- Create a Qt Account and Login
- Agree to the terms and conditions
- Disable sending statistics
- Choose an installation folder
- Choose
Custom Installation
- In
Qt
>Qt 6.1.3
select the following options:MinGW 8.1.0 64-bit
Qt5 Compatibility Module
Additional Libraries
- Follow the rest of the instructions in the installer
- At the end of the installer, launch
Qt Creator
IDE
The IDE that we will be using is the Qt Creator IDE. Once you complete the above installation steps, you will now have the Qt Creator IDE on your desktop.
- Launch Qt Creator
- Have the implementation folder ready
- In Qt Creator, select
Projects
in the upper left corner - Click on Open
- Proceed to find the
.pro
file in the implementation folder - When prompted to configure the project, select the kit displayed. (there should only be one)
- Once all is set up, you can now click Run (choose release instead of debug) or Build on the bottom left of the IDE.
- The application should compile with no problem and run itself.
- Find the compiled application in a generated directory found in the parent directory of the implementation directory ( i.e. go to the parent directory of the directory containing the .pro file)
- Go to the
release
directory - Executable file should be there
Please find descriptions for the following in the implementation directory:
docs
: Contains all documentation filesforms
: Contains .ui files for GUIheaders
: contains .h header filesresources
: contains icons and stylesheetssource
: contains .cpp source filesEbookAccess.pro
: specific to the IDE
In the bottom left corner of the application, there are 2 buttons that resemble books, the left one is to add a single book, and the right one is to choose a directory from which you can recursively add all the books inside.
Again, the left button will launch a dialog where you can select and add a single file.
You can use the ...
button to find a file. This method is superior to adding all the file's details manually since
when you select a file, the name
, folder
, path
, extension
, and size
fields will automatically be filled out.
The right button mentioned above will help in adding multiple files recursively. In this dialog as well, there is
a ...
button to choose the preferred directory.
If you check the recursive checkbox, then the algorithm will dig into every subdirectory in the given directory and retrieve all files. Please note depending on the number of files, the function could be slow.
Click add
and follow the instructions. Once the progress bar hits 100%, you are free to close the dialog box.
As you see on the right side of the interface, there is a search bar, which automatically updates titles as you type. The search bar will return the names of the ebooks that contain whatever you typed into the bar. You can also clear and sort your selections alphabetically.
You can search your ebooks using the following criteria:
Folder
: This is simply the parent directory in which files are located inAuthor
: You must set an ebook's author manuallyGenre
: You must set an ebook's genre manuallyTags
: You can input tags that are associated with filesExtensions
: you can search ebooks based on their extensions (ex: '.pdf')Size
: You can specify the size range you are searching for. You can also choose the unit (KB, MB, GB)Pages
: You can search a range of pages, but be careful, you must manually update a book's pages
You can save all the criteria you inputted by clicking on the save button.
Then, you can select a search from the Search
combo box and press the load button.
As you see, there is a small button next to every search criteria. This should be the preferred method to choose for example multiple folders or extensions.
This button will show you all the existing data for a certain criterion. Once you select your options and
click Continue
, you will see the relative box updated.
You can sort your ebooks based on all the criteria you use to search them.
The 3 most important sorting mechanisms are Author
, Genre
, and Tags
.
Please note the application uses the |
character as its universal separator. Therefore, when searching tags or
updating
an ebook's tags, you must separate every tag with a |
character.
Once you click on an ebook displayed in the List Widget (the frame in the top right), its metadata will automatically be shown in the Details Frame (the bottom right frame).
From there, you can change any metadata you want except the extension
and size
.
Input your author, genre, and tags for a specific ebook and press on Update
. If you messed around with the data but
did NOT press Update
, you can use Restore
.
One of the fundamental philosophies of this application is to work with files in the database and not on the hard disk. What does that mean?
The application does not copy or move any files on disk, but it simply stores all the data it needs in a database. Why is this relevant to the clean function? What if you deleted your file on the hard disk? This would not automatically delete it from your application, and therefore you would use the clean function.
What does the clean function do? It simply iterates over all the file paths listed in the database and checks if that path is still valid.
You cannot customize the colors of the interface, but you can however hide any frame you do not want to see.
Use the View
menu to see everything you can show and hide.
In the Reset
menu, you are able to reset many things including and limited to:
- Tags
- Ebooks
- Searches
- Database (this resets all the above)
For added workflow productivity, every action in the menus has a shortcut. Therefore, you are encouraged to look over all the shortcuts, choose which ones are most useful to learn.
The shortcut naming system is based on the first letter of each word of the behavior. Example: Search Files
= Ctrl+S, Ctrl+F
. Hold down the Ctrl key and press S then F.