if (book->creators.size()) {
QLabel *creators = new QLabel(this);
creators->setWordWrap(true);
- QString c = "By " + book->creators[0];
- for (int i = 1; i < book->creators.size(); i++) {
- c += ", " + book->creators[i];
- }
- creators->setText(c);
+ creators->setText(book->creators.join(", "));
addWidget(creators);
}
QLabel *path = new QLabel("File: " + book->path(), this);
rights->setWordWrap(true);
addWidget(rights);
}
+ if (book->dateAdded.isValid()) {
+ QLabel *added = new QLabel("Added to library: " +
+ book->dateAdded.toString(Qt::SystemLocaleShortDate), this);
+ added->setWordWrap(true);
+ addWidget(added);
+ }
+ if (book->dateOpened.isValid()) {
+ QLabel *opened = new QLabel("Last read: " +
+ book->dateOpened.toString(Qt::SystemLocaleShortDate), this);
+ opened->setWordWrap(true);
+ addWidget(opened);
+ }
addStretch();
}