diff --git a/src/acbf/AcbfAuthor.h b/src/acbf/AcbfAuthor.h index 162b7f8..8f7d77e 100644 --- a/src/acbf/AcbfAuthor.h +++ b/src/acbf/AcbfAuthor.h @@ -1,68 +1,68 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFAUTHORINFO_H #define ACBFAUTHORINFO_H #include "AcbfMetadata.h" namespace AdvancedComicBookFormat { class ACBF_EXPORT Author : public QObject { Q_OBJECT public: // Author is used in both Bookinfo and Documentinfo, and as such it is parented to Metadata explicit Author(Metadata* parent = 0); - virtual ~Author(); + ~Author() override; void toXml(QXmlStreamWriter* writer); bool fromXml(QXmlStreamReader *xmlReader); Q_INVOKABLE QString displayName(); Q_INVOKABLE QString activity(); Q_INVOKABLE void setActivity(QString activity); Q_INVOKABLE static QStringList availableActivities(); // The language this author worked in for this book. Activity dependent (writer, translator, letterer...) Q_INVOKABLE QString language(); Q_INVOKABLE void setLanguage(QString language = ""); Q_INVOKABLE QString firstName(); Q_INVOKABLE void setFirstName(QString name); Q_INVOKABLE QString middleName(); Q_INVOKABLE void setMiddleName(QString name); Q_INVOKABLE QString lastName(); Q_INVOKABLE void setLastName(QString name); Q_INVOKABLE QString nickName(); Q_INVOKABLE void setNickName(QString name); Q_INVOKABLE QString homePage(); Q_INVOKABLE void setHomePage(QString homepage); Q_INVOKABLE QString email(); Q_INVOKABLE void setEmail(QString email); private: class Private; Private* d; }; } #endif//ACBFAUTHORINFO_H diff --git a/src/acbf/AcbfBinary.h b/src/acbf/AcbfBinary.h index 17cb32c..c1088e5 100644 --- a/src/acbf/AcbfBinary.h +++ b/src/acbf/AcbfBinary.h @@ -1,59 +1,59 @@ /* * Copyright (C) 2017 Jesse Pullinen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFBINARY_H #define ACBFBINARY_H #include #include "acbf_export.h" class QXmlStreamReader; class QXmlStreamWriter; namespace AdvancedComicBookFormat { class Data; class ACBF_EXPORT Binary : public QObject { Q_OBJECT public: explicit Binary(Data* parent = 0); - virtual ~Binary(); + ~Binary() override; void toXml(QXmlStreamWriter *writer); bool fromXml(QXmlStreamReader *xmlReader); QString id(); void setId(QString newId); QString contentType(); void setContentType(QString newContentType); QByteArray data(); void setData(QByteArray newData); private: class Private; Private* d; }; } #endif // ACBFBINARY_H diff --git a/src/acbf/AcbfBody.h b/src/acbf/AcbfBody.h index 55fc899..5d0413c 100644 --- a/src/acbf/AcbfBody.h +++ b/src/acbf/AcbfBody.h @@ -1,62 +1,62 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFBODY_H #define ACBFBODY_H #include "AcbfDocument.h" #include class QXmlStreamWriter; class QXmlStreamReader; namespace AdvancedComicBookFormat { class Page; class ACBF_EXPORT Body : public QObject { Q_OBJECT public: explicit Body(Document* parent = 0); - virtual ~Body(); + ~Body() override; Document* document(); void toXml(QXmlStreamWriter *writer); bool fromXml(QXmlStreamReader *xmlReader); QString bgcolor(); void setBgcolor(QString newColor); QList pages(); Page* page(int index); int pageIndex(Page* page); // If afterIndex is larger than zero, the insertion will happen at that index void addPage(Page* page, int index = -1); void removePage(Page* page); bool swapPages(Page* swapThis, Page* withThis); private: class Private; Private* d; }; } #endif//ACBFBODY_H diff --git a/src/acbf/AcbfBookinfo.h b/src/acbf/AcbfBookinfo.h index 6cd9940..31755aa 100644 --- a/src/acbf/AcbfBookinfo.h +++ b/src/acbf/AcbfBookinfo.h @@ -1,115 +1,115 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFBOOKINFO_H #define ACBFBOOKINFO_H #include "AcbfMetadata.h" #include namespace AdvancedComicBookFormat { class Author; class Page; class Language; class Sequence; class DatabaseRef; class ContentRating; class ACBF_EXPORT BookInfo : public QObject { Q_OBJECT Q_PROPERTY(QStringList authorNames READ authorNames NOTIFY authorsChanged) Q_PROPERTY(QStringList titleLanguages READ titleLanguages NOTIFY titleChanged) Q_PROPERTY(QStringList genres READ genres NOTIFY genresChanged) Q_PROPERTY(QStringList characters READ characters NOTIFY charactersChanged) public: explicit BookInfo(Metadata* parent = 0); - virtual ~BookInfo(); + ~BookInfo() override; Metadata* metadata(); void toXml(QXmlStreamWriter *writer); bool fromXml(QXmlStreamReader *xmlReader); QList author(); QStringList authorNames() const; Q_INVOKABLE Author* getAuthor(int index) const; Q_INVOKABLE void addAuthor(QString activity, QString language, QString firstName, QString middleName, QString lastName, QString nickName, QString homePage, QString email); Q_INVOKABLE void setAuthor(int index, QString activity, QString language, QString firstName, QString middleName, QString lastName, QString nickName, QString homePage, QString email); Q_INVOKABLE void removeAuthor(int index); void addAuthor(Author* author); void removeAuthor(Author* author); Q_SIGNAL void authorsChanged(); Q_INVOKABLE QStringList titleForAllLanguages(); Q_INVOKABLE QStringList titleLanguages(); Q_INVOKABLE QString title(QString language = ""); Q_INVOKABLE void setTitle(QString title, QString language = ""); Q_SIGNAL void titleChanged(); Q_INVOKABLE QHash genre(); Q_INVOKABLE QStringList genres() const; Q_INVOKABLE int genrePercentage(QString genre) const; Q_INVOKABLE void setGenre(QString genre, int matchPercentage = 100); Q_INVOKABLE void removeGenre(QString genre); Q_SIGNAL void genresChanged(); Q_INVOKABLE static QStringList availableGenres(); Q_INVOKABLE QStringList characters(); Q_INVOKABLE void addCharacter(QString name); Q_INVOKABLE void removeCharacter(QString name); Q_SIGNAL void charactersChanged(); Q_INVOKABLE QList annotationsForAllLanguage(); Q_INVOKABLE QStringList annotationLanguages(); Q_INVOKABLE QStringList annotation(QString language = ""); // empty string means "default language", as (un)defined by the specification... Q_INVOKABLE void setAnnotation(QStringList annotation, QString language = ""); QHash keywordsForAllLanguage(); QStringList keywords(QString language = ""); void setKeywords(QStringList keywords, QString language = ""); Page* coverpage(); void setCoverpage(Page* newCover); QList languages(); void addLanguage(Language* language); void removeLanguage(Language* language); QList sequence(); void addSequence(Sequence* sequence); void removeSequence(Sequence* sequence); QList databaseRef(); void addDatabaseRef(DatabaseRef* databaseRef); void removeDatabaseRef(DatabaseRef* databaseRef); QList contentRating(); void addContentRating(ContentRating* contentRating); void removeContentRating(ContentRating* contentRating); private: class Private; Private* d; }; } #endif//ACBFBOOKINFO_H diff --git a/src/acbf/AcbfContentrating.h b/src/acbf/AcbfContentrating.h index 242bfb4..0f4689d 100644 --- a/src/acbf/AcbfContentrating.h +++ b/src/acbf/AcbfContentrating.h @@ -1,50 +1,50 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFCONTENTRATING_H #define ACBFCONTENTRATING_H #include "AcbfBookinfo.h" namespace AdvancedComicBookFormat { class ACBF_EXPORT ContentRating : public QObject { Q_OBJECT public: explicit ContentRating(BookInfo* parent = 0); - virtual ~ContentRating(); + ~ContentRating() override; void toXml(QXmlStreamWriter* writer); bool fromXml(QXmlStreamReader *xmlReader); QString type(); void setType(QString type); QString rating(); void setRating(QString rating); private: class Private; Private* d; }; } #endif//ACBFCONTENTRATING_H diff --git a/src/acbf/AcbfData.h b/src/acbf/AcbfData.h index 6d9a3e7..34fc895 100644 --- a/src/acbf/AcbfData.h +++ b/src/acbf/AcbfData.h @@ -1,50 +1,50 @@ /* * Copyright (C) 2017 Jesse Pullinen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFDATA_H #define ACBFDATA_H #include #include #include "AcbfDocument.h" #include "AcbfBinary.h" namespace AdvancedComicBookFormat { class ACBF_EXPORT Data : public QObject { Q_OBJECT public: explicit Data(Document* parent = 0); - virtual ~Data(); + ~Data() override; void toXml(QXmlStreamWriter *writer); bool fromXml(QXmlStreamReader *xmlReader); Binary* binary(QString id); private: class Private; Private* d; }; } #endif // ACBFDATA_H diff --git a/src/acbf/AcbfDatabaseref.h b/src/acbf/AcbfDatabaseref.h index 784ec7f..9f520f2 100644 --- a/src/acbf/AcbfDatabaseref.h +++ b/src/acbf/AcbfDatabaseref.h @@ -1,53 +1,53 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFDATABASEREF_H #define ACBFDATABASEREF_H #include "AcbfBookinfo.h" namespace AdvancedComicBookFormat { class ACBF_EXPORT DatabaseRef : public QObject { Q_OBJECT public: explicit DatabaseRef(BookInfo* parent = 0); - virtual ~DatabaseRef(); + ~DatabaseRef() override; void toXml(QXmlStreamWriter* writer); bool fromXml(QXmlStreamReader *xmlReader); QString dbname(); void setDbname(QString dbname); QString type(); void setType(QString type); QString reference(); void setReference(QString reference); private: class Private; Private* d; }; } #endif//ACBFDATABASEREF_H diff --git a/src/acbf/AcbfDocument.h b/src/acbf/AcbfDocument.h index e9b5b3a..b6cd1b1 100644 --- a/src/acbf/AcbfDocument.h +++ b/src/acbf/AcbfDocument.h @@ -1,59 +1,59 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFDOCUMENT_H #define ACBFDOCUMENT_H #include #include "acbf_export.h" namespace AdvancedComicBookFormat { class Metadata; class Body; // class References; class Data; // class Stylesheet; class ACBF_EXPORT Document : public QObject { Q_OBJECT Q_PROPERTY(Metadata* metaData READ metaData NOTIFY metaDataChanged) public: explicit Document(QObject* parent = 0); - virtual ~Document(); + ~Document() override; QString toXml(); bool fromXml(QString xmlDocument); Metadata* metaData(); Q_SIGNAL void metaDataChanged(); Body* body(); // References* references(); Data* data(); // Stylesheet* stylesheet(); private: class Private; Private* d; }; } #endif//ACBFDOCUMENT_H diff --git a/src/acbf/AcbfDocumentinfo.h b/src/acbf/AcbfDocumentinfo.h index 05a1e1d..c81b901 100644 --- a/src/acbf/AcbfDocumentinfo.h +++ b/src/acbf/AcbfDocumentinfo.h @@ -1,69 +1,69 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFDOCUMENTINFO_H #define ACBFDOCUMENTINFO_H #include "AcbfMetadata.h" #include namespace AdvancedComicBookFormat { class Author; class ACBF_EXPORT DocumentInfo : public QObject { Q_OBJECT public: explicit DocumentInfo(Metadata* parent = 0); - virtual ~DocumentInfo(); + ~DocumentInfo() override; Metadata* metadata(); void toXml(QXmlStreamWriter *writer); bool fromXml(QXmlStreamReader *xmlReader); QList author(); void addAuthor(Author* author); void removeAuthor(Author* author); QDate creationDate(); void setCreationDate(QDate creationDate); QStringList source(); void setSource(QStringList source); QString id(); void setId(QString id); QString version(); void setVersion(QString version); QStringList history(); void setHistory(QStringList history); void addHistoryLine(QString historyLine); private: class Private; Private* d; }; } #endif//ACBFDOCUMENTINFO_H diff --git a/src/acbf/AcbfLanguage.h b/src/acbf/AcbfLanguage.h index ed1c10a..dcc9c32 100644 --- a/src/acbf/AcbfLanguage.h +++ b/src/acbf/AcbfLanguage.h @@ -1,52 +1,52 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFLANGUAGEINFO_H #define ACBFLANGUAGEINFO_H #include "AcbfBookinfo.h" namespace AdvancedComicBookFormat { // Due to an oddity in the naming of certain elements in the ACBF standard, this class // actually represents a text-layer sub-element in the languages subelement of book-info class ACBF_EXPORT Language : public QObject { Q_OBJECT public: explicit Language(BookInfo* parent = 0); - virtual ~Language(); + ~Language() override; void toXml(QXmlStreamWriter* writer); bool fromXml(QXmlStreamReader *xmlReader); void setLanguage(QString language); QString language(); void setShow(bool show); bool show(); private: class Private; Private* d; }; } #endif//ACBFLANGUAGEINFO_H diff --git a/src/acbf/AcbfMetadata.h b/src/acbf/AcbfMetadata.h index c59d834..1f99b05 100644 --- a/src/acbf/AcbfMetadata.h +++ b/src/acbf/AcbfMetadata.h @@ -1,58 +1,58 @@ /* * Copyright (C) 2016 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFMETADATA_H #define ACBFMETADATA_H #include "AcbfDocument.h" class QXmlStreamWriter; class QXmlStreamReader; namespace AdvancedComicBookFormat { class BookInfo; class PublishInfo; class DocumentInfo; class ACBF_EXPORT Metadata : public QObject { Q_OBJECT Q_PROPERTY(AdvancedComicBookFormat::BookInfo* bookInfo READ bookInfo NOTIFY bookInfoChanged) public: explicit Metadata(Document* parent = 0); - virtual ~Metadata(); + ~Metadata() override; Document* document(); void toXml(QXmlStreamWriter *writer); bool fromXml(QXmlStreamReader *xmlReader); BookInfo* bookInfo(); Q_SIGNAL void bookInfoChanged(); PublishInfo* publishInfo(); DocumentInfo* documentInfo(); private: class Private; Private* d; }; } Q_DECLARE_METATYPE(AdvancedComicBookFormat::Metadata*) #endif//ACBFMETADATA_H diff --git a/src/acbf/AcbfPage.h b/src/acbf/AcbfPage.h index 0e7e7eb..532e446 100644 --- a/src/acbf/AcbfPage.h +++ b/src/acbf/AcbfPage.h @@ -1,88 +1,88 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFPAGE_H #define ACBFPAGE_H #include "AcbfDocument.h" class QXmlStreamWriter; class QXmlStreamReader; namespace AdvancedComicBookFormat { class Textlayer; class Frame; class Jump; class ACBF_EXPORT Page : public QObject { Q_OBJECT public: // Pages can also be cover pages, which means they can also be children of BookInfo explicit Page(Document* parent = 0); - virtual ~Page(); + ~Page() override; void toXml(QXmlStreamWriter* writer); bool fromXml(QXmlStreamReader *xmlReader); QString bgcolor(); void setBgcolor(QString newColor = ""); QString transition(); void setTransition(QString transition); static QStringList availableTransitions(); QStringList titleForAllLanguages(); QString title(QString language = ""); void setTitle(QString title, QString language = ""); QString imageHref(); void setImageHref(QString imageHref); QList textLayersForAllLanguages(); Textlayer* textLayer(QString language = ""); // Setting the textlayer for a language to null removes that language (as with other translated entries, though this one not being text warranted a comment) void setTextLayer(Textlayer* textlayer, QString language = ""); QList frames(); Frame* frame(int index); int frameIndex(Frame* frame); // If afterIndex is larger than zero, the insertion will happen at that index void addFrame(Frame* frame, int index = -1); void removeFrame(Frame* frame); bool swapFrames(Frame* swapThis, Frame* withThis); QList jumps(); Jump* jump(int index); int jumpIndex(Jump* jump); // If afterIndex is larger than zero, the insertion will happen at that index void addJump(Jump* jump, int index = -1); void removeJump(Jump* jump); bool swapJumps(Jump* swapThis, Jump* withThis); bool isCoverPage(); void setIsCoverPage(bool isCoverPage = false); private: class Private; Private* d; }; } #endif//ACBFPAGE_H diff --git a/src/acbf/AcbfPublishinfo.h b/src/acbf/AcbfPublishinfo.h index 4df934a..8e8be95 100644 --- a/src/acbf/AcbfPublishinfo.h +++ b/src/acbf/AcbfPublishinfo.h @@ -1,61 +1,61 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFPUBLISHINFO_H #define ACBFPUBLISHINFO_H #include "AcbfMetadata.h" #include namespace AdvancedComicBookFormat { class ACBF_EXPORT PublishInfo : public QObject { Q_OBJECT public: explicit PublishInfo(Metadata* parent = 0); - virtual ~PublishInfo(); + ~PublishInfo() override; void toXml(QXmlStreamWriter *writer); bool fromXml(QXmlStreamReader *xmlReader); QString publisher(); void setPublisher(QString publisher); QDate publishDate(); void setPublishDate(QDate publishDate); QString city(); void setCity(QString city = ""); QString isbn(); void setIsbn(QString isbn = ""); QString license(); void setLicense(QString license = ""); private: class Private; Private* d; }; } #endif//ACBFPUBLISHINFO_H diff --git a/src/acbf/AcbfSequence.h b/src/acbf/AcbfSequence.h index 0535eab..2c46221 100644 --- a/src/acbf/AcbfSequence.h +++ b/src/acbf/AcbfSequence.h @@ -1,54 +1,54 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFSEQUENCE_H #define ACBFSEQUENCE_H #include "AcbfBookinfo.h" namespace AdvancedComicBookFormat { class ACBF_EXPORT Sequence : public QObject { Q_OBJECT public: explicit Sequence(BookInfo * parent = 0); - virtual ~Sequence(); + ~Sequence() override; void toXml(QXmlStreamWriter* writer); bool fromXml(QXmlStreamReader *xmlReader); QString title(); void setTitle(QString title); // Optional attribute - if set to 0, this is not saved int volume(); void setVolume(int volume = 0); int number(); void setNumber(int number); private: class Private; Private* d; }; } #endif//ACBFSEQUENCE_H diff --git a/src/acbf/AcbfTextarea.h b/src/acbf/AcbfTextarea.h index e92348d..d4382f2 100644 --- a/src/acbf/AcbfTextarea.h +++ b/src/acbf/AcbfTextarea.h @@ -1,75 +1,75 @@ /* * Copyright (C) 2016 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFTEXTAREA_H #define ACBFTEXTAREA_H #include "AcbfTextlayer.h" #include namespace AdvancedComicBookFormat { class ACBF_EXPORT Textarea : public QObject { Q_OBJECT public: explicit Textarea(Textlayer* parent = 0); - virtual ~Textarea(); + ~Textarea() override; void toXml(QXmlStreamWriter* writer); bool fromXml(QXmlStreamReader *xmlReader); QList points(); QPoint point(int index); int pointIndex(QPoint point); // If afterIndex is larger than zero, the insertion will happen at that index void addPoint(QPoint point, int index = -1); void removePoint(QPoint point); bool swapPoints(QPoint swapThis, QPoint withThis); QString bgcolor(); void setBgcolor(QString newColor = ""); int textRotation(); void setTextRotation(int rotation = 0); QString type(); void setType(QString type = "speech"); static QStringList availableTypes(); bool inverted(); void setInverted(bool inverted = false); bool transparent(); void setTransparent(bool transparent = false); QStringList paragraphs(); // Allowed sub-elements: strong, emphasis, strikethrough, sub, sup, a (with mandatory href attribute only) // Deprecated sub-elements (superceded by...): code (type option code), inverted (textarea option inverted) void setParagraphs(QStringList paragraphs); private: class Private; Private* d; }; } #endif//ACBFTEXTAREA_H diff --git a/src/acbf/AcbfTextlayer.h b/src/acbf/AcbfTextlayer.h index 2b3f3f8..62742d1 100644 --- a/src/acbf/AcbfTextlayer.h +++ b/src/acbf/AcbfTextlayer.h @@ -1,59 +1,59 @@ /* * Copyright (C) 2016 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ACBFTEXTLAYER_H #define ACBFTEXTLAYER_H #include "AcbfPage.h" namespace AdvancedComicBookFormat { class Textarea; class ACBF_EXPORT Textlayer : public QObject { Q_OBJECT public: explicit Textlayer(Page* parent = 0); - virtual ~Textlayer(); + ~Textlayer() override; void toXml(QXmlStreamWriter* writer); bool fromXml(QXmlStreamReader *xmlReader); QString language(); void setLanguage(QString language); QString bgcolor(); void setBgcolor(QString newColor = ""); QList textareas(); Textarea* textarea(int index); int textareaIndex(Textarea* textarea); // If afterIndex is larger than zero, the insertion will happen at that index void addTextarea(Textarea* textarea, int index = -1); void removeTextarea(Textarea* textarea); bool swapTextareas(Textarea* swapThis, Textarea* withThis); private: class Private; Private* d; }; } #endif//ACBFTEXTLAYER_H diff --git a/src/contentlist/BalooContentLister.h b/src/contentlist/BalooContentLister.h index 3d35026..81583a4 100644 --- a/src/contentlist/BalooContentLister.h +++ b/src/contentlist/BalooContentLister.h @@ -1,53 +1,53 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef BALOOCONTENTLISTER_H #define BALOOCONTENTLISTER_H #include "ContentListerBase.h" #include #include class BalooContentLister : public ContentListerBase { Q_OBJECT public: explicit BalooContentLister(QObject* parent = 0); - virtual ~BalooContentLister(); + ~BalooContentLister() override; bool balooEnabled() const; - virtual void addLocation(QString path); - virtual void addMimetype(QString mimetype); - virtual void setSearchString(const QString& searchString); - virtual void setKnownFiles(QStringList knownFiles); - virtual void startSearch(); + void addLocation(QString path) override; + void addMimetype(QString mimetype) override; + void setSearchString(const QString& searchString) override; + void setKnownFiles(QStringList knownFiles) override; + void startSearch() override; private: class Private; Private* d; Q_SLOT void queryCompleted(Baloo::QueryRunnable* query); Q_SLOT void queryResult(Baloo::QueryRunnable* query, QString file); }; #endif//BALOOCONTENTLISTER_H diff --git a/src/contentlist/ContentList.h b/src/contentlist/ContentList.h index dfe0a24..de47021 100644 --- a/src/contentlist/ContentList.h +++ b/src/contentlist/ContentList.h @@ -1,58 +1,58 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef CONTENTLISTBASE_H #define CONTENTLISTBASE_H #include class ContentList : public QAbstractListModel { Q_OBJECT public: explicit ContentList(QObject* parent = 0); - virtual ~ContentList(); + ~ContentList() override; Q_INVOKABLE static QString getMimetype(QString filePath); Q_SLOT void addLocation(QString path); Q_SLOT void addMimetype(QString mimetype); Q_SLOT void setSearchString(const QString& searchString); Q_SLOT void setKnownFiles(QStringList knownFiles); Q_SLOT void startSearch(); enum Roles { FilenameRole = Qt::UserRole + 1, MetadataRole }; - virtual QHash roleNames() const; - virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; - virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; + QHash roleNames() const override; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; Q_SLOT void fileFound(const QString& filePath, const QVariantHash& metaData); Q_SIGNAL void searchCompleted(); private: class Private; Private* d; }; #endif//CONTENTLISTBASE_H diff --git a/src/contentlist/ContentListerBase.h b/src/contentlist/ContentListerBase.h index ffacbdb..bd3351f 100644 --- a/src/contentlist/ContentListerBase.h +++ b/src/contentlist/ContentListerBase.h @@ -1,44 +1,44 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef CONTENTLISTERBASE_H #define CONTENTLISTERBASE_H #include class ContentListerBase : public QObject { Q_OBJECT public: explicit ContentListerBase(QObject* parent = 0); - virtual ~ContentListerBase(); + ~ContentListerBase() override; virtual void addLocation(QString path); virtual void addMimetype(QString mimetype); virtual void setSearchString(const QString& searchString); virtual void setKnownFiles(QStringList knownFiles); Q_SLOT virtual void startSearch(); Q_SIGNAL void fileFound(const QString& filePath, const QVariantHash& metadata); Q_SIGNAL void searchCompleted(); }; #endif//CONTENTLISTERBASE_H diff --git a/src/contentlist/FilesystemContentLister.h b/src/contentlist/FilesystemContentLister.h index d35cff0..b56936c 100644 --- a/src/contentlist/FilesystemContentLister.h +++ b/src/contentlist/FilesystemContentLister.h @@ -1,44 +1,44 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef FILESYSTEMCONTENTLISTER_H #define FILESYSTEMCONTENTLISTER_H #include "ContentListerBase.h" class FilesystemContentLister : public ContentListerBase { Q_OBJECT public: explicit FilesystemContentLister(QObject* parent = 0); - virtual ~FilesystemContentLister(); + ~FilesystemContentLister() override; - virtual void addLocation(QString path); - virtual void addMimetype(QString mimetype); - virtual void setSearchString(const QString& searchString); - virtual void setKnownFiles(QStringList knownFiles); - virtual void startSearch(); + void addLocation(QString path) override; + void addMimetype(QString mimetype) override; + void setSearchString(const QString& searchString) override; + void setKnownFiles(QStringList knownFiles) override; + void startSearch() override; private: class Private; Private* d; }; #endif//FILESYSTEMCONTENTLISTER_H diff --git a/src/contentlist/qmlplugin.h b/src/contentlist/qmlplugin.h index 3898df9..b83cb45 100644 --- a/src/contentlist/qmlplugin.h +++ b/src/contentlist/qmlplugin.h @@ -1,36 +1,36 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef _QML_PLUGIN_H #define _QML_PLUGIN_H #include class QmlPlugins : public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: - virtual void initializeEngine(QQmlEngine *engine, const char *uri); - virtual void registerTypes(const char *uri); + void initializeEngine(QQmlEngine *engine, const char *uri) override; + void registerTypes(const char *uri) override; }; #endif diff --git a/src/qtquick/ArchiveBookModel.h b/src/qtquick/ArchiveBookModel.h index 02f1e56..55e329e 100644 --- a/src/qtquick/ArchiveBookModel.h +++ b/src/qtquick/ArchiveBookModel.h @@ -1,102 +1,102 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ARCHIVEBOOKMODEL_H #define ARCHIVEBOOKMODEL_H #include "BookModel.h" class KArchiveFile; class ArchiveBookModel : public BookModel { Q_OBJECT Q_PROPERTY(QObject* qmlEngine READ qmlEngine WRITE setQmlEngine NOTIFY qmlEngineChanged) Q_PROPERTY(bool readWrite READ readWrite WRITE setReadWrite NOTIFY readWriteChanged) Q_PROPERTY(bool hasUnsavedChanges READ hasUnsavedChanges NOTIFY hasUnsavedChangesChanged) public: explicit ArchiveBookModel(QObject* parent = 0); - virtual ~ArchiveBookModel(); + ~ArchiveBookModel() override; - virtual void setFilename(QString newFilename) override; + void setFilename(QString newFilename) override; - virtual QString author() const override; - virtual void setAuthor(QString newAuthor) override; - virtual QString publisher() const override; - virtual void setPublisher(QString newPublisher) override; - virtual QString title() const override; - virtual void setTitle(QString newTitle) override; + QString author() const override; + void setAuthor(QString newAuthor) override; + QString publisher() const override; + void setPublisher(QString newPublisher) override; + QString title() const override; + void setTitle(QString newTitle) override; QObject* qmlEngine() const; void setQmlEngine(QObject* newEngine); Q_SIGNAL void qmlEngineChanged(); bool readWrite() const; void setReadWrite(bool newReadWrite); Q_SIGNAL void readWriteChanged(); bool hasUnsavedChanges() const; Q_INVOKABLE void setDirty(bool isDirty = true); Q_SIGNAL void hasUnsavedChangesChanged(); /** * Saves the archive back to disk * @return True if the save was successful */ Q_INVOKABLE bool saveBook(); - virtual void addPage(QString url, QString title) override; + void addPage(QString url, QString title) override; /** * Adds a new page to the book archive on disk, by copying in the file * passed to the function. Optionally this can be done at a specific * position in the book. * * @param fileUrl The URL of the file to copy into the archive * @param insertAfter The index to insert the new page after. If invalid, insertion will be at the end */ Q_INVOKABLE void addPageFromFile(QString fileUrl, int insertAfter = -1); /** * @brief Swap the two pages at the specified indices * * This will change the order in the archive file as well (that is, renaming the files inside the archive) * * @param swapThisIndex The index of the first page to be swapped * @param withThisIndex The index of the page you want the first to be swapped with */ - Q_INVOKABLE virtual void swapPages(int swapThisIndex, int withThisIndex) override; + Q_INVOKABLE void swapPages(int swapThisIndex, int withThisIndex) override; /** * Creates a new book in the folder, with the given title and cover. * A filename will be constructed to fit the title, and which does not already exist in the * directory. */ Q_INVOKABLE QString createBook(QString folder, QString title, QString coverUrl); friend class ArchiveImageProvider; protected: const KArchiveFile* archiveFile(const QString& filePath); private: class Private; Private* d; }; #endif//ARCHIVEBOOKMODEL_H diff --git a/src/qtquick/ArchiveImageProvider.h b/src/qtquick/ArchiveImageProvider.h index ceb880d..a41bf27 100644 --- a/src/qtquick/ArchiveImageProvider.h +++ b/src/qtquick/ArchiveImageProvider.h @@ -1,44 +1,44 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef ARCHIVEIMAGEPROVIDER_H #define ARCHIVEIMAGEPROVIDER_H #include class ArchiveBookModel; class ArchiveImageProvider : public QQuickImageProvider { public: explicit ArchiveImageProvider(); - virtual ~ArchiveImageProvider(); + ~ArchiveImageProvider() override; - virtual QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize); + QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize) override; void setArchiveBookModel(ArchiveBookModel* model); void setPrefix(QString prefix); QString prefix() const; private: class Private; Private* d; }; #endif//ARCHIVEIMAGEPROVIDER_H diff --git a/src/qtquick/BookDatabase.h b/src/qtquick/BookDatabase.h index 2df2222..e5b3581 100644 --- a/src/qtquick/BookDatabase.h +++ b/src/qtquick/BookDatabase.h @@ -1,42 +1,42 @@ /* * Copyright (C) 2017 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef BOOKDATABASE_H #define BOOKDATABASE_H #include struct BookEntry; class BookDatabase : public QObject { Q_OBJECT public: explicit BookDatabase(QObject* parent = 0); - virtual ~BookDatabase(); + ~BookDatabase() override; QList loadEntries(); void addEntry(BookEntry* entry); private: class Private; Private* d; }; #endif//BOOKDATABASE_H diff --git a/src/qtquick/BookListModel.h b/src/qtquick/BookListModel.h index 2c86c4e..89de592 100644 --- a/src/qtquick/BookListModel.h +++ b/src/qtquick/BookListModel.h @@ -1,101 +1,101 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef BOOKLISTMODEL_H #define BOOKLISTMODEL_H #include "CategoryEntriesModel.h" #include class BookListModel : public CategoryEntriesModel, public QQmlParserStatus { Q_OBJECT Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(QObject* contentModel READ contentModel WRITE setContentModel NOTIFY contentModelChanged) Q_PROPERTY(QObject* newlyAddedCategoryModel READ newlyAddedCategoryModel NOTIFY newlyAddedCategoryModelChanged) Q_PROPERTY(QObject* titleCategoryModel READ titleCategoryModel NOTIFY titleCategoryModelChanged) Q_PROPERTY(QObject* authorCategoryModel READ authorCategoryModel NOTIFY authorCategoryModelChanged) Q_PROPERTY(QObject* seriesCategoryModel READ seriesCategoryModel NOTIFY seriesCategoryModelChanged) Q_PROPERTY(QObject* folderCategoryModel READ folderCategoryModel NOTIFY folderCategoryModelChanged) Q_PROPERTY(bool cacheLoaded READ cacheLoaded NOTIFY cacheLoadedChanged) Q_ENUMS(Grouping) Q_INTERFACES(QQmlParserStatus) public: explicit BookListModel(QObject* parent = 0); - virtual ~BookListModel(); + ~BookListModel() override; - virtual void classBegin() override {}; - virtual void componentComplete() override; + void classBegin() override {}; + void componentComplete() override; enum Grouping { GroupByNone = 0, GroupByRecentlyAdded, GroupByRecentlyRead, GroupByTitle, GroupByAuthor, GroupByPublisher }; QObject* contentModel() const; void setContentModel(QObject* newModel); Q_SIGNAL void contentModelChanged(); int count() const; Q_SIGNAL void countChanged(); QObject* titleCategoryModel() const; Q_SIGNAL void titleCategoryModelChanged(); QObject* newlyAddedCategoryModel() const; Q_SIGNAL void newlyAddedCategoryModelChanged(); QObject* authorCategoryModel() const; Q_SIGNAL void authorCategoryModelChanged(); QObject* seriesCategoryModel() const; Q_SIGNAL void seriesCategoryModelChanged(); // Returns the leaf model representing the series the entry with the passed URL is a part of // Base assumption: A book is only part of one series. This is not always true, but not sure how // to sensibly represent that Q_INVOKABLE QObject* seriesModelForEntry(QString fileName); QObject* folderCategoryModel() const; Q_SIGNAL void folderCategoryModelChanged(); bool cacheLoaded() const; Q_SIGNAL void cacheLoadedChanged(); // Update the data of a book at runtime - in particular, we need to update totalPages and currentPage Q_INVOKABLE void setBookData(QString fileName, QString property, QString value); // Delete a book from the model, and optionally delete the entry from file storage Q_INVOKABLE void removeBook(QString fileName, bool deleteFile = false); // A list of the files currently known by the applications Q_INVOKABLE QStringList knownBookFiles() const; private: class Private; Private* d; Q_SLOT void contentModelItemsInserted(QModelIndex index,int first, int last); }; #endif//BOOKLISTMODEL_H diff --git a/src/qtquick/BookModel.h b/src/qtquick/BookModel.h index 65280b0..c71d3cc 100644 --- a/src/qtquick/BookModel.h +++ b/src/qtquick/BookModel.h @@ -1,109 +1,109 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef BOOKMODEL_H #define BOOKMODEL_H #include class BookModel : public QAbstractListModel { Q_OBJECT Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged) Q_PROPERTY(QString author READ author WRITE setAuthor NOTIFY authorChanged) Q_PROPERTY(QString publisher READ publisher WRITE setPublisher NOTIFY publisherChanged) Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged) Q_PROPERTY(int pageCount READ pageCount NOTIFY pageCountChanged) Q_PROPERTY(int currentPage READ currentPage WRITE setCurrentPage NOTIFY currentPageChanged) /** * The Advanced Comic Book Format data management instance associated with this book * This may be null */ Q_PROPERTY(QObject* acbfData READ acbfData NOTIFY acbfDataChanged) Q_PROPERTY(bool processing READ processing WRITE setProcessing NOTIFY processingChanged) public: explicit BookModel(QObject* parent = 0); - virtual ~BookModel(); + ~BookModel() override; enum Roles { UrlRole = Qt::UserRole + 1, TitleRole, }; - virtual QHash roleNames() const; - virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; - virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; + QHash roleNames() const override; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; virtual void addPage(QString url, QString title); virtual void clearPages(); QString filename() const; virtual void setFilename(QString newFilename); Q_SIGNAL void filenameChanged(); virtual QString author() const; virtual void setAuthor(QString newAuthor); Q_SIGNAL void authorChanged(); virtual QString publisher() const; virtual void setPublisher(QString newPublisher); Q_SIGNAL void publisherChanged(); virtual QString title() const; virtual void setTitle(QString newTitle); Q_SIGNAL void titleChanged(); virtual int pageCount() const; Q_SIGNAL void pageCountChanged(); int currentPage() const; /** * * @param updateFilesystem If this is set to false, the attributes do not get written back to the filesystem. Useful for when the information is first filled out */ virtual void setCurrentPage(int newCurrentPage, bool updateFilesystem = true); Q_SIGNAL void currentPageChanged(); QObject* acbfData() const; /** * This is used by subclasses who want to create one such. Until this is called * with a valid object, acbfData is null. This function causes BookModel to take * ownership of the object. It will further delete any previous objects set as * acbfData. */ void setAcbfData(QObject* obj); Q_SIGNAL void acbfDataChanged(); // Whether or not the any processing is currently going on bool processing() const; void setProcessing(bool processing); Q_SIGNAL void processingChanged(); Q_SIGNAL void loadingCompleted(bool success); /** * @brief Swap the two pages at the specified indices * * @param swapThisIndex The index of the first page to be swapped * @param withThisIndex The index of the page you want the first to be swapped with */ Q_INVOKABLE virtual void swapPages(int swapThisIndex, int withThisIndex); private: class Private; Private* d; }; #endif//BOOKMODEL_H diff --git a/src/qtquick/CategoryEntriesModel.h b/src/qtquick/CategoryEntriesModel.h index 07676be..b8b928c 100644 --- a/src/qtquick/CategoryEntriesModel.h +++ b/src/qtquick/CategoryEntriesModel.h @@ -1,100 +1,100 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef CATEGORYENTRIESMODEL_H #define CATEGORYENTRIESMODEL_H #include #include class CategoryEntriesModel; struct BookEntry { BookEntry() : totalPages(0) , currentPage(0) {} QString filename; QString filetitle; QString title; QString series; QString author; QString publisher; QDateTime created; QDateTime lastOpenedTime; int totalPages; int currentPage; QString thumbnail; }; class CategoryEntriesModel : public QAbstractListModel { Q_OBJECT public: explicit CategoryEntriesModel(QObject* parent = 0); - virtual ~CategoryEntriesModel(); + ~CategoryEntriesModel() override; enum Roles { FilenameRole = Qt::UserRole + 1, FiletitleRole, TitleRole, SeriesRole, AuthorRole, PublisherRole, CreatedRole, LastOpenedTimeRole, TotalPagesRole, CurrentPageRole, CategoryEntriesModelRole, CategoryEntryCountRole, ThumbnailRole }; - virtual QHash roleNames() const; - virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; - virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; + QHash roleNames() const override; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; void append(BookEntry* entry, Roles compareRole = TitleRole); void addCategoryEntry(const QString& categoryName, BookEntry* entry); Q_INVOKABLE QObject* get(int index); // This is backwards... need to fox this to make get return the actual thing, not just a book, and create a getter for books... Q_INVOKABLE QObject* getEntry(int index); Q_INVOKABLE QObject* bookFromFile(QString filename); Q_INVOKABLE int indexOfFile(QString filename); Q_INVOKABLE bool indexIsBook(int index); int bookCount() const; Q_SIGNAL void entryDataUpdated(BookEntry* entry); Q_SLOT void entryDataChanged(BookEntry* entry); Q_SIGNAL void entryRemoved(BookEntry* entry); Q_SLOT void entryRemove(BookEntry* entry); // This will iterate over all sub-models and find the model which contains the entry, or null if not found QObject* leafModelForEntry(BookEntry* entry); protected: QString name() const; void setName(const QString& newName); private: class Private; Private* d; }; #endif//CATEGORYENTRIESMODEL_H diff --git a/src/qtquick/ComicCoverImageProvider.h b/src/qtquick/ComicCoverImageProvider.h index 33d672d..272d7df 100644 --- a/src/qtquick/ComicCoverImageProvider.h +++ b/src/qtquick/ComicCoverImageProvider.h @@ -1,46 +1,46 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef COMICCOVERIMAGEPROVIDER_H #define COMICCOVERIMAGEPROVIDER_H #include /** * \brief Get file previews of Comic Book Archives * * TODO This should go into a thumbnailer later, once karchive-rar is merged into KArchive * * NOTE: As this task is potentially heavy, make sure to mark any Image using this provider asynchronous */ class ComicCoverImageProvider : public QQuickImageProvider { public: explicit ComicCoverImageProvider(); - virtual ~ComicCoverImageProvider(); + ~ComicCoverImageProvider() override; - virtual QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize); + QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize) override; private: class Private; Private* d; }; #endif//COMICCOVERIMAGEPROVIDER_H diff --git a/src/qtquick/FilterProxy.h b/src/qtquick/FilterProxy.h index c2c868b..980f796 100644 --- a/src/qtquick/FilterProxy.h +++ b/src/qtquick/FilterProxy.h @@ -1,35 +1,35 @@ /* * Copyright (C) 2016 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef FILTERPROXY_H #define FILTERPROXY_H #include class FilterProxy : public QSortFilterProxyModel { Q_OBJECT public: explicit FilterProxy(QObject* parent = 0); - virtual ~FilterProxy(); + ~FilterProxy() override; }; #endif//FILTERPROXY_H diff --git a/src/qtquick/FolderBookModel.h b/src/qtquick/FolderBookModel.h index ced9e2f..866db35 100644 --- a/src/qtquick/FolderBookModel.h +++ b/src/qtquick/FolderBookModel.h @@ -1,37 +1,37 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef FOLDERBOOKMODEL_H #define FOLDERBOOKMODEL_H #include "BookModel.h" class FolderBookModel : public BookModel { Q_OBJECT public: explicit FolderBookModel(QObject* parent = 0); - virtual ~FolderBookModel(); + ~FolderBookModel() override; - virtual void setFilename(QString newFilename); + void setFilename(QString newFilename) override; }; #endif//FOLDERBOOKMODEL_H diff --git a/src/qtquick/PeruseConfig.h b/src/qtquick/PeruseConfig.h index 7b2d998..e21facc 100644 --- a/src/qtquick/PeruseConfig.h +++ b/src/qtquick/PeruseConfig.h @@ -1,66 +1,66 @@ /* * Copyright (C) 2016 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef PERUSECONFIG_H #define PERUSECONFIG_H #include class PeruseConfig : public QObject { Q_OBJECT Q_ENUMS(ZoomMode) Q_PROPERTY(QStringList recentlyOpened READ recentlyOpened NOTIFY recentlyOpenedChanged) Q_PROPERTY(QStringList bookLocations READ bookLocations NOTIFY bookLocationsChanged) Q_PROPERTY(QString newstuffLocation READ newstuffLocation NOTIFY newstuffLocationChanged) public: enum ZoomMode { ZoomFull = 0, ZoomFitWidth = 1, ZoomFitHeight = 2 }; explicit PeruseConfig(QObject* parent = 0); - virtual ~PeruseConfig(); + ~PeruseConfig() override; Q_INVOKABLE void bookOpened(QString path); QStringList recentlyOpened() const; Q_SIGNAL void recentlyOpenedChanged(); Q_INVOKABLE void addBookLocation(const QString& location); Q_INVOKABLE void removeBookLocation(const QString& location); QStringList bookLocations() const; Q_SIGNAL void bookLocationsChanged(); QString newstuffLocation() const; Q_SIGNAL void newstuffLocationChanged(); Q_SIGNAL void showMessage(QString message); // This should go somewhere more sensible, really... like a static on Qt. or something :P Q_INVOKABLE QString homeDir() const; Q_INVOKABLE void setFilesystemProperty(QString fileName, QString propertyName, QString value); private: class Private; Private* d; }; #endif//PERUSECONFIG_H diff --git a/src/qtquick/PreviewImageProvider.h b/src/qtquick/PreviewImageProvider.h index 547436b..93a9505 100644 --- a/src/qtquick/PreviewImageProvider.h +++ b/src/qtquick/PreviewImageProvider.h @@ -1,51 +1,51 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef PREVIEWIMAGEPROVIDER_H #define PREVIEWIMAGEPROVIDER_H #include /** * \brief Get file previews using KIO::PreviewJob * * NOTE: As this task is potentially heavy, make sure to mark any Image using this provider asynchronous */ class KFileItem; class KJob; class PreviewImageProvider : public QObject, public QQuickImageProvider { Q_OBJECT public: explicit PreviewImageProvider(QObject* parent = 0); - virtual ~PreviewImageProvider(); + ~PreviewImageProvider() override; - virtual QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize); + QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize) override; Q_SLOT void updatePreview(const KFileItem&, const QPixmap& p); Q_SLOT void fallbackPreview(const KFileItem& item); Q_SLOT void finishedPreview(KJob* job); private: class Private; Private* d; }; #endif//PREVIEWIMAGEPROVIDER_H diff --git a/src/qtquick/PropertyContainer.h b/src/qtquick/PropertyContainer.h index b35dbc6..27f37ae 100644 --- a/src/qtquick/PropertyContainer.h +++ b/src/qtquick/PropertyContainer.h @@ -1,52 +1,52 @@ /* * Copyright (C) 2012 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef PROPERTYCONTAINER_H #define PROPERTYCONTAINER_H #include #include /** * The only purpose of this class is to expose the dynamic property * system of Qt to QML, so we can set and get properties on a generic * object. It is a little bit of a hack, but QML deliberately does * not have access to this (according to the developers). */ class PropertyContainer : public QObject { Q_OBJECT public: explicit PropertyContainer(QObject* parent = 0); explicit PropertyContainer(QString name, QObject* parent = 0); - virtual ~PropertyContainer(); + ~PropertyContainer() override; // As QObject already as setProperty and property() functions, we must // name ours differently Q_INVOKABLE void writeProperty(QString name, QVariant value); Q_INVOKABLE QVariant readProperty(QString name); Q_INVOKABLE QString name(); private: QString m_name; }; #endif // PROPERTYCONTAINER_H diff --git a/src/qtquick/karchive-rar/KRar.h b/src/qtquick/karchive-rar/KRar.h index 757bf85..d0afd94 100644 --- a/src/qtquick/karchive-rar/KRar.h +++ b/src/qtquick/karchive-rar/KRar.h @@ -1,101 +1,101 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef KRAR_H #define KRAR_H #include /** * KRar is a class for reading archives in the rar format. Writing * is not supported. * @short A class for reading rar archives. * @author Dan Leinir Turthra Jensen */ class KARCHIVE_EXPORT KRar : public KArchive { public: /** * Creates an instance that operates on the given filename. * using the compression filter associated to given mimetype. * * @param filename is a local path (e.g. "/home/leinir/boop.rar") */ KRar(const QString &filename); /** * Creates an instance that operates on the given device. * The device can be compressed (KFilterDev) or not (QFile, etc.). * @warning Do not assume that giving a QFile here will decompress the file, * in case it's compressed! * @param dev the device to access */ KRar(QIODevice *dev); /** * If the rar file is still opened, then it will be * closed automatically by the destructor. */ - virtual ~KRar(); + ~KRar() override; protected: /* * Writing is not supported by this class, will always fail. * @return always false */ bool doPrepareWriting(const QString &name, const QString &user, const QString &group, qint64 size, - mode_t perm, const QDateTime &atime, const QDateTime &mtime, const QDateTime &ctime) Q_DECL_OVERRIDE; + mode_t perm, const QDateTime &atime, const QDateTime &mtime, const QDateTime &ctime) override; /* * Writing is not supported by this class, will always fail. * @return always false */ - bool doFinishWriting(qint64 size) Q_DECL_OVERRIDE; + bool doFinishWriting(qint64 size) override; /* * Writing is not supported by this class, will always fail. * @return always false */ bool doWriteDir(const QString &name, const QString &user, const QString &group, - mode_t perm, const QDateTime &atime, const QDateTime &mtime, const QDateTime &ctime) Q_DECL_OVERRIDE; + mode_t perm, const QDateTime &atime, const QDateTime &mtime, const QDateTime &ctime) override; bool doWriteSymLink(const QString &name, const QString &target, const QString &user, const QString &group, mode_t perm, - const QDateTime &atime, const QDateTime &mtime, const QDateTime &ctime) Q_DECL_OVERRIDE; + const QDateTime &atime, const QDateTime &mtime, const QDateTime &ctime) override; /** * Opens the archive for reading. * Parses the directory listing of the archive * and creates the KArchiveDirectory/KArchiveFile entries. * */ - bool openArchive(QIODevice::OpenMode mode) Q_DECL_OVERRIDE; - bool closeArchive() Q_DECL_OVERRIDE; + bool openArchive(QIODevice::OpenMode mode) override; + bool closeArchive() override; protected: - void virtual_hook(int id, void *data) Q_DECL_OVERRIDE; + void virtual_hook(int id, void *data) override; private: class Private; Private* d; }; #endif//KRAR_H diff --git a/src/qtquick/karchive-rar/KRarFileEntry.h b/src/qtquick/karchive-rar/KRarFileEntry.h index e983fc0..995e0a9 100644 --- a/src/qtquick/karchive-rar/KRarFileEntry.h +++ b/src/qtquick/karchive-rar/KRarFileEntry.h @@ -1,76 +1,76 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef KRARFILEENTRY_H #define KRARFILEENTRY_H #include "KRar.h" /** * A KRarFileEntry represents a file in a rar archive. */ class KARCHIVE_EXPORT KRarFileEntry : public KArchiveFile { public: /** * Creates a new rar file entry. Do not call this, KRar takes care of it. */ KRarFileEntry(KRar *rar, const QString &name, int access, const QDateTime &date, const QString &user, const QString &group, const QString &symlink, const QString &path, qint64 start, qint64 uncompressedSize, struct ar_archive_s* archive); /** * Destructor. Do not call this. */ - ~KRarFileEntry(); + ~KRarFileEntry() override; /// Header start: only used when writing, consequently not used (as we don't support writing) void setHeaderStart(qint64 headerstart); qint64 headerStart() const; /// CRC: only used when writing, consequently not used (as we don't support writing) unsigned long crc32() const; void setCRC32(unsigned long crc32); /// Name with complete path - KArchiveFile::name() is the filename only (no path) const QString &path() const; /** * @return the content of this file. * Call data() with care (only once per file), this data isn't cached. */ - QByteArray data() const Q_DECL_OVERRIDE; + QByteArray data() const override; /** * This method returns a QIODevice to read the file contents. * This is obviously for reading only. * Note that the ownership of the device is being transferred to the caller, * who will have to delete it. * The returned device auto-opens (in readonly mode), no need to open it. */ - QIODevice *createDevice() const Q_DECL_OVERRIDE; + QIODevice *createDevice() const override; private: class Private; Private *const d; }; #endif//KRARFILEENTRY_H diff --git a/src/qtquick/qmlplugin.h b/src/qtquick/qmlplugin.h index 3898df9..b83cb45 100644 --- a/src/qtquick/qmlplugin.h +++ b/src/qtquick/qmlplugin.h @@ -1,36 +1,36 @@ /* * Copyright (C) 2015 Dan Leinir Turthra Jensen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * */ #ifndef _QML_PLUGIN_H #define _QML_PLUGIN_H #include class QmlPlugins : public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: - virtual void initializeEngine(QQmlEngine *engine, const char *uri); - virtual void registerTypes(const char *uri); + void initializeEngine(QQmlEngine *engine, const char *uri) override; + void registerTypes(const char *uri) override; }; #endif