예제 #1
0
const std::vector<std::string> &SeriesTitleEntry::values() const {
    myValues.clear();
    std::set<std::string> valuesSet;
    valuesSet.insert(initialValue());
    valuesSet.insert("");
    if (!myOriginalAuthor.isNull()) {
        myInfoDialog.myCollection.collectSeriesNames(myOriginalAuthor, valuesSet);
    }
    AuthorPtr currentAuthor = myInfoDialog.myAuthorDisplayNameEntry->myCurrentAuthor;
    if (!currentAuthor.isNull() && (currentAuthor != myOriginalAuthor)) {
        myInfoDialog.myCollection.collectSeriesNames(currentAuthor, valuesSet);
    }
    for (std::set<std::string>::const_iterator it = valuesSet.begin(); it != valuesSet.end(); ++it) {
        myValues.push_back(*it);
    }
    return myValues;
}
예제 #2
0
const std::string &AuthorSortKeyEntry::initialValue() const {
    AuthorPtr currentAuthor = myInfoDialog.myAuthorDisplayNameEntry->myCurrentAuthor;
    return currentAuthor.isNull() ?
           myInfoDialog.myBookInfo.AuthorSortKeyOption.value() :
           currentAuthor->sortKey();
}