Changeset View
Changeset View
Standalone View
Standalone View
src/acbf/AcbfBookinfo.h
Context not available. | |||||
85 | Q_PROPERTY(QStringList authorNames READ authorNames NOTIFY authorsChanged) | 85 | Q_PROPERTY(QStringList authorNames READ authorNames NOTIFY authorsChanged) | ||
---|---|---|---|---|---|
86 | Q_PROPERTY(QStringList titleLanguages READ titleLanguages NOTIFY titleChanged) | 86 | Q_PROPERTY(QStringList titleLanguages READ titleLanguages NOTIFY titleChanged) | ||
87 | Q_PROPERTY(QStringList genres READ genres NOTIFY genresChanged) | 87 | Q_PROPERTY(QStringList genres READ genres NOTIFY genresChanged) | ||
88 | Q_PROPERTY(QStringList characters READ characters NOTIFY charactersChanged) | 88 | Q_PROPERTY(QStringList characters READ characters WRITE setCharacters NOTIFY charactersChanged) | ||
89 | Q_PROPERTY(QStringList languageEntryList READ languageEntryList NOTIFY languageEntryListChanged) | ||||
90 | Q_PROPERTY(int sequenceCount READ sequenceCount NOTIFY sequenceCountChanged) | ||||
91 | Q_PROPERTY(int databaseRefCount READ databaseRefCount NOTIFY databaseRefCountChanged) | ||||
92 | Q_PROPERTY(int contentRatingCount READ contentRatingCount NOTIFY contentRatingCountChanged) | ||||
93 | Q_PROPERTY(bool rightToLeft READ rightToLeft WRITE setRightToLeft NOTIFY rightToLeftChanged) | ||||
89 | public: | 94 | public: | ||
90 | explicit BookInfo(Metadata* parent = nullptr); | 95 | explicit BookInfo(Metadata* parent = nullptr); | ||
91 | ~BookInfo() override; | 96 | ~BookInfo() override; | ||
Context not available. | |||||
244 | * @param name - the name of the character to remove. | 249 | * @param name - the name of the character to remove. | ||
245 | */ | 250 | */ | ||
246 | Q_INVOKABLE void removeCharacter(QString name); | 251 | Q_INVOKABLE void removeCharacter(QString name); | ||
252 | | ||||
253 | /** | ||||
254 | * @brief Replace the characters stringlist. | ||||
255 | * @param characters new string list to use. | ||||
256 | */ | ||||
257 | Q_INVOKABLE void setCharacters(QStringList characters); | ||||
247 | /** | 258 | /** | ||
248 | * \brief this triggers when the character name list is changed. | 259 | * \brief this triggers when the character name list is changed. | ||
249 | */ | 260 | */ | ||
Context not available. | |||||
280 | * @param language - the language for which to return the keywords for. | 291 | * @param language - the language for which to return the keywords for. | ||
281 | * @return a stringlist of keywords in the given language. | 292 | * @return a stringlist of keywords in the given language. | ||
282 | */ | 293 | */ | ||
283 | QStringList keywords(QString language = ""); | 294 | Q_INVOKABLE QStringList keywords(QString language = ""); | ||
284 | /** | 295 | /** | ||
285 | * \brief set the list of keywords for the given language. | 296 | * \brief set the list of keywords for the given language. | ||
286 | * @param keywords - A stringlist of keywords | 297 | * @param keywords - A stringlist of keywords | ||
287 | * @param language - The language for which to set the annotation in | 298 | * @param language - The language for which to set the annotation in | ||
288 | * language code, country code format joined by a dash (not an underscore). | 299 | * language code, country code format joined by a dash (not an underscore). | ||
289 | */ | 300 | */ | ||
290 | void setKeywords(QStringList keywords, QString language = ""); | 301 | Q_INVOKABLE void setKeywords(QStringList keywords, QString language = ""); | ||
291 | 302 | | |||
292 | /** | 303 | /** | ||
293 | * @return the coverpage as a page object. | 304 | * @return the coverpage as a page object. | ||
294 | */ | 305 | */ | ||
295 | Page* coverpage(); | 306 | Q_INVOKABLE Page* coverpage(); | ||
296 | /** | 307 | /** | ||
297 | * \brief set a cover page. | 308 | * \brief set a cover page. | ||
298 | * @param newCover A page object with the new cover. | 309 | * @param newCover A page object with the new cover. | ||
Context not available. | |||||
308 | * @param language - language object to add. | 319 | * @param language - language object to add. | ||
309 | */ | 320 | */ | ||
310 | void addLanguage(Language* language); | 321 | void addLanguage(Language* language); | ||
322 | | ||||
323 | /** | ||||
324 | * @brief languageEntryList | ||||
325 | * @return a list of languages for the language text layers. | ||||
326 | */ | ||||
327 | QStringList languageEntryList(); | ||||
328 | /** | ||||
329 | * @brief fires when the language entry list changes. | ||||
330 | */ | ||||
331 | Q_SIGNAL void languageEntryListChanged(); | ||||
332 | | ||||
333 | /** | ||||
334 | * \brief add a language to the list of translations. | ||||
335 | * @param language - language for which to add a language object. | ||||
336 | * @param show - whether to set the language object to 'show'. | ||||
337 | */ | ||||
338 | Q_INVOKABLE void addLanguage(QString language="", bool show=false); | ||||
311 | /** | 339 | /** | ||
312 | * \brief remove a language from the translations. | 340 | * \brief remove a language from the translations. | ||
313 | * @param language - language object to remove. | 341 | * @param language - language object to remove. | ||
314 | */ | 342 | */ | ||
315 | void removeLanguage(Language* language); | 343 | void removeLanguage(Language* language); | ||
344 | /** | ||||
345 | * @brief removeLanguage | ||||
346 | * @param index | ||||
347 | */ | ||||
348 | Q_INVOKABLE void removeLanguage(int index); | ||||
316 | 349 | | |||
317 | /** | 350 | /** | ||
318 | * @return a list of sequence objects that describe the series and | 351 | * @return a list of sequence objects that describe the series and | ||
Context not available. | |||||
325 | * a sequence. | 358 | * a sequence. | ||
326 | */ | 359 | */ | ||
327 | void addSequence(Sequence* sequence); | 360 | void addSequence(Sequence* sequence); | ||
361 | | ||||
362 | /** | ||||
363 | * @brief add a sequence from basic strings. | ||||
364 | * | ||||
365 | * @param number - integer representing the number within the sequence. | ||||
366 | * @param title - the of the sequence, optional. | ||||
367 | * @param volume - volume of the sequence, optional. | ||||
368 | */ | ||||
369 | Q_INVOKABLE void addSequence(int number, QString title = QString(), int volume = 0); | ||||
328 | /** | 370 | /** | ||
329 | * \brief remove a sequence object from the list of sequences this book is | 371 | * \brief remove a sequence object from the list of sequences this book is | ||
330 | * part of. | 372 | * part of. | ||
Context not available. | |||||
333 | */ | 375 | */ | ||
334 | void removeSequence(Sequence* sequence); | 376 | void removeSequence(Sequence* sequence); | ||
335 | 377 | | |||
378 | /** | ||||
379 | * @brief remove a sequence by index. | ||||
380 | * @param index - index of sequence to remove. | ||||
381 | */ | ||||
382 | Q_INVOKABLE void removeSequence(int index); | ||||
383 | /** | ||||
384 | * @brief get a sequence by index. | ||||
385 | * @param index = index of the sequence to get. | ||||
386 | */ | ||||
387 | Q_INVOKABLE Sequence* sequence(int index) const; | ||||
388 | | ||||
389 | /** | ||||
390 | * @brief get total amount of sequences. | ||||
391 | */ | ||||
392 | Q_INVOKABLE int sequenceCount() const; | ||||
393 | | ||||
394 | /** | ||||
395 | * @brief fires when the sequence count changes. | ||||
396 | */ | ||||
397 | Q_SIGNAL void sequenceCountChanged(); | ||||
336 | /** | 398 | /** | ||
337 | * @returns a list of entries that this book has in various databases. | 399 | * @returns a list of entries that this book has in various databases. | ||
338 | */ | 400 | */ | ||
Context not available. | |||||
343 | * in a database. | 405 | * in a database. | ||
344 | */ | 406 | */ | ||
345 | void addDatabaseRef(DatabaseRef* databaseRef); | 407 | void addDatabaseRef(DatabaseRef* databaseRef); | ||
408 | /** | ||||
409 | * @brief add a database entry that this book has. | ||||
410 | * @param reference the entry itself. | ||||
411 | * @param dbname the name of the database. | ||||
412 | * @param type the type of entry, optional. | ||||
413 | */ | ||||
414 | Q_INVOKABLE void addDatabaseRef(QString reference, QString dbname, QString type=""); | ||||
346 | /** | 415 | /** | ||
347 | * \brief remove a database entry that this book has. | 416 | * \brief remove a database entry that this book has. | ||
348 | * @param databaseRef - a databaseRef object describing this work's place | 417 | * @param databaseRef - a databaseRef object describing this work's place | ||
349 | * in a database. | 418 | * in a database. | ||
350 | */ | 419 | */ | ||
351 | void removeDatabaseRef(DatabaseRef* databaseRef); | 420 | void removeDatabaseRef(DatabaseRef* databaseRef); | ||
421 | /** | ||||
422 | * @brief removeDatabaseRef | ||||
423 | * @param index of the database reference to remove. | ||||
424 | */ | ||||
425 | Q_INVOKABLE void removeDatabaseRef(int index); | ||||
426 | | ||||
427 | /** | ||||
428 | * @brief get databaseRef | ||||
429 | * @param index - index of the database ref to get. | ||||
430 | * @return databaseTef at index. | ||||
431 | */ | ||||
432 | Q_INVOKABLE DatabaseRef* databaseRef(int index); | ||||
433 | /** | ||||
434 | * @brief databaseRefCount | ||||
435 | * @return amount of database references. | ||||
436 | */ | ||||
437 | Q_INVOKABLE int databaseRefCount(); | ||||
438 | /** | ||||
439 | * @brief fires when databaseRefCount changes | ||||
440 | */ | ||||
441 | Q_SIGNAL void databaseRefCountChanged(); | ||||
352 | 442 | | |||
353 | /** | 443 | /** | ||
354 | * @returns a list of contentRating objects describing the audience for this | 444 | * @returns a list of contentRating objects describing the audience for this | ||
Context not available. | |||||
361 | * contentrating system. | 451 | * contentrating system. | ||
362 | */ | 452 | */ | ||
363 | void addContentRating(ContentRating* contentRating); | 453 | void addContentRating(ContentRating* contentRating); | ||
454 | /** | ||||
455 | * @brief add a contentRating object to the contentratings. | ||||
456 | * @param rating - The label of the rating. | ||||
457 | * @param type - the system the label belongs to. | ||||
458 | */ | ||||
459 | Q_INVOKABLE void addContentRating(QString rating, QString type = QString()); | ||||
364 | /** | 460 | /** | ||
365 | * \brief remove a contentRating object from the contentRatings. | 461 | * \brief remove a contentRating object from the contentRatings. | ||
366 | * @param contentRating - a contentRating object describing the label and | 462 | * @param contentRating - a contentRating object describing the label and | ||
367 | * contentrating system. | 463 | * contentrating system. | ||
368 | */ | 464 | */ | ||
369 | void removeContentRating(ContentRating* contentRating); | 465 | void removeContentRating(ContentRating* contentRating); | ||
370 | 466 | /** | |||
467 | * @brief removeContentRating | ||||
468 | * @param index the entry to remove. | ||||
469 | */ | ||||
470 | Q_INVOKABLE void removeContentRating(int index); | ||||
471 | /** | ||||
472 | * @brief gets the contentrating by index. | ||||
473 | * @param index - index of the content rating to get. | ||||
474 | * @return the content rating for the index. | ||||
475 | */ | ||||
476 | Q_INVOKABLE ContentRating* contentRating(int index); | ||||
477 | /** | ||||
478 | * @brief contentRatingCount | ||||
479 | * @return the total amount of content ratings in this book. | ||||
480 | */ | ||||
481 | Q_INVOKABLE int contentRatingCount(); | ||||
482 | /** | ||||
483 | * @brief fires when contentRatingCount changes. | ||||
484 | */ | ||||
485 | Q_SIGNAL void contentRatingCountChanged(); | ||||
371 | /** | 486 | /** | ||
372 | * @brief The reading direction for this comic for adjusting the layout. | 487 | * @brief The reading direction for this comic for adjusting the layout. | ||
373 | * An ACBF 1.2 feature. | 488 | * An ACBF 1.2 feature. | ||
374 | * @return QString with either ltr or rtl. | 489 | * @return true when the reading direction is right to left. | ||
375 | */ | 490 | */ | ||
376 | QString readingDirection() const; | 491 | bool rightToLeft() const; | ||
377 | 492 | | |||
378 | /** | 493 | /** | ||
379 | * @brief set the Reading direction for this comic. This indicates | 494 | * @brief set the Reading direction for this comic. This indicates | ||
380 | * how the UI will lay out the buttons and controls. | 495 | * how the UI will lay out the buttons and controls. | ||
381 | * An ACBF 1.2 feature. | 496 | * An ACBF 1.2 feature. | ||
382 | * @param readingDirection a QString with either "ltr" or "rtl". | 497 | * @param rtl a boolean indicating whether the reading direction is right to left. | ||
498 | */ | ||||
499 | void setRightToLeft(const bool& rtl = false); | ||||
500 | /** | ||||
501 | * @brief fires when right to left changes. | ||||
383 | */ | 502 | */ | ||
384 | void setReadingDirection(const QString& readingDirection = "ltr"); | 503 | Q_SIGNAL void rightToLeftChanged(); | ||
385 | private: | 504 | private: | ||
386 | class Private; | 505 | class Private; | ||
387 | std::unique_ptr<Private> d; | 506 | std::unique_ptr<Private> d; | ||
Context not available. |