Book Shelf
Loading...
Searching...
No Matches
Book Class Reference

The Book class represents a book object. More...

#include <book.h>

Public Member Functions

 Book ()
 Construct a new Book object.
 
 Book (const QString &title, const QStringList &authors, const QString &isbn, const QDate &publicationDate)
 Construct a new Book object.
 
void setTitle (const QString &title)
 Set the book's title.
 
void setAuthors (const QStringList &authors)
 Set the book's author(s).
 
void setIsbn (const QString &isbn)
 Set the book's ISBN.
 
void setPublicationDate (const QDate &publicationDate)
 Set the book's Publication Date.
 
QString getTitle () const
 Get the book's title.
 
QStringList getAuthors () const
 Get the book's author(s)
 
QString getIsbn () const
 Get the book's ISBN.
 
QDate getPublicationDate () const
 Get the book's Publication Date.
 

Detailed Description

The Book class represents a book object.

Constructor & Destructor Documentation

◆ Book()

Book::Book ( const QString & title,
const QStringList & authors,
const QString & isbn,
const QDate & publicationDate )

Construct a new Book object.

Parameters
titleThe title of the book.
authorsThe author(s) of the book.
isbnThe ISBN of the book.
publicationDateThe publication date of the book.

Member Function Documentation

◆ getAuthors()

QStringList Book::getAuthors ( ) const

Get the book's author(s)

Returns
QStringList A list of the author(s) of the book.

◆ getIsbn()

QString Book::getIsbn ( ) const

Get the book's ISBN.

Returns
QString

◆ getPublicationDate()

QDate Book::getPublicationDate ( ) const

Get the book's Publication Date.

Returns
QDate

◆ getTitle()

QString Book::getTitle ( ) const

Get the book's title.

Returns
QString The title of the book.

◆ setAuthors()

void Book::setAuthors ( const QStringList & authors)

Set the book's author(s).

Parameters
authorsA list of the author(s) of the book.

◆ setIsbn()

void Book::setIsbn ( const QString & isbn)

Set the book's ISBN.

The ISBN line edit used an input mask to ensure that the ISBN is entered in the correct format.

Parameters
isbnThe ISBN of the book.

◆ setPublicationDate()

void Book::setPublicationDate ( const QDate & publicationDate)

Set the book's Publication Date.

Parameters
publicationDateThe publication date of the book.

◆ setTitle()

void Book::setTitle ( const QString & title)

Set the book's title.

Parameters
titleThe title of the book.

The documentation for this class was generated from the following files: