diff --git a/src/definitions/definitions.h.in b/src/definitions/definitions.h.in index 648dd8792..3abfd8a68 100755 --- a/src/definitions/definitions.h.in +++ b/src/definitions/definitions.h.in @@ -41,6 +41,7 @@ #define SERVICE_CODE_STD_RSS "std-rss" #define SERVICE_CODE_TT_RSS "tt-rss" #define SERVICE_CODE_OWNCLOUD "owncloud" +#define SERVICE_CODE_WALLABAG "wallabag" #define ARGUMENTS_LIST_SEPARATOR "\n" diff --git a/src/miscellaneous/application.cpp b/src/miscellaneous/application.cpp index 0b58466ca..c0b8119b7 100755 --- a/src/miscellaneous/application.cpp +++ b/src/miscellaneous/application.cpp @@ -32,6 +32,7 @@ #include "services/standard/standardserviceentrypoint.h" #include "services/tt-rss/ttrssserviceentrypoint.h" #include "services/owncloud/owncloudserviceentrypoint.h" +#include "services/wallabag/wallabagserviceentrypoint.h" #include #include @@ -60,6 +61,7 @@ QList Application::feedServices() { m_feedServices.append(new StandardServiceEntryPoint()); m_feedServices.append(new TtRssServiceEntryPoint()); m_feedServices.append(new OwnCloudServiceEntryPoint()); + m_feedServices.append(new WallabagServiceEntryPoint()); } return m_feedServices; diff --git a/src/services/wallabag/wallabagserviceentrypoint.cpp b/src/services/wallabag/wallabagserviceentrypoint.cpp new file mode 100644 index 000000000..033f0d2b5 --- /dev/null +++ b/src/services/wallabag/wallabagserviceentrypoint.cpp @@ -0,0 +1,68 @@ +// This file is part of RSS Guard. +// +// Copyright (C) 2011-2016 by Martin Rotter +// +// RSS Guard is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// RSS Guard 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with RSS Guard. If not, see . + +#include "services/wallabag/wallabagserviceentrypoint.h" + +#include "miscellaneous/application.h" +#include "miscellaneous/iconfactory.h" +#include "gui/messagebox.h" +#include "gui/dialogs/formmain.h" + + +WallabagServiceEntryPoint::WallabagServiceEntryPoint() { +} + +WallabagServiceEntryPoint::~WallabagServiceEntryPoint() { +} + +ServiceRoot *WallabagServiceEntryPoint::createNewRoot() const { + MessageBox::show(qApp->mainForm(), QMessageBox::Warning, QObject::tr("Not yet supported"), + QObject::tr("This plugin is not yet ready for usage. It will be added in future versions.")); + return NULL; +} + +QList WallabagServiceEntryPoint::initializeSubtree() const { + return QList(); +} + +bool WallabagServiceEntryPoint::isSingleInstanceService() const { + return false; +} + +QString WallabagServiceEntryPoint::name() const { + return QSL("wallabag"); +} + +QString WallabagServiceEntryPoint::code() const { + return SERVICE_CODE_WALLABAG; +} + +QString WallabagServiceEntryPoint::description() const { + return QObject::tr("This plugin allows you to view and manager your wallabag articles."); +} + +QString WallabagServiceEntryPoint::version() const { + return APP_VERSION; +} + +QString WallabagServiceEntryPoint::author() const { + return APP_AUTHOR; +} + +QIcon WallabagServiceEntryPoint::icon() const { + return qApp->icons()->fromTheme(QSL("application-wallabag")); +} diff --git a/src/services/wallabag/wallabagserviceentrypoint.h b/src/services/wallabag/wallabagserviceentrypoint.h new file mode 100644 index 000000000..110f2044d --- /dev/null +++ b/src/services/wallabag/wallabagserviceentrypoint.h @@ -0,0 +1,41 @@ +// This file is part of RSS Guard. +// +// Copyright (C) 2011-2016 by Martin Rotter +// +// RSS Guard is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// RSS Guard 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with RSS Guard. If not, see . + +#ifndef WALLABAGSERVICEENTRYPOINT_H +#define WALLABAGSERVICEENTRYPOINT_H + +#include "services/abstract/serviceentrypoint.h" + + +class WallabagServiceEntryPoint : public ServiceEntryPoint { + public: + explicit WallabagServiceEntryPoint(); + virtual ~WallabagServiceEntryPoint(); + + ServiceRoot *createNewRoot() const; + QList initializeSubtree() const; + + bool isSingleInstanceService() const; + QString name() const; + QString code() const; + QString description() const; + QString version() const; + QString author() const; + QIcon icon() const; +}; + +#endif // WALLABAGSERVICEENTRYPOINT_H