diff --git a/krita/plugins/extensions/pykrita/libkis/application.h b/krita/plugins/extensions/pykrita/libkis/application.h index f503e465fed..9c0bb6832d4 100644 --- a/krita/plugins/extensions/pykrita/libkis/application.h +++ b/krita/plugins/extensions/pykrita/libkis/application.h @@ -1,35 +1,35 @@ /* * Copyright (c) 2014 Boudewijn Rempt * * This program 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 of the License, or * (at your option) any later version. * * This program 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 Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIS_APPLICATION_H #define LIBKIS_APPLICATION_H #include -#include +#include "libkis_export.h" class LIBKIS_EXPORT Application : public QObject { Q_OBJECT public: explicit Application(QObject *parent = 0); Q_SIGNALS: public Q_SLOTS: }; #endif // LIBKIS_APPLICATION_H diff --git a/krita/plugins/extensions/pykrita/libkis/dockwidget.h b/krita/plugins/extensions/pykrita/libkis/dockwidget.h index 542528214a7..94b4adf1130 100644 --- a/krita/plugins/extensions/pykrita/libkis/dockwidget.h +++ b/krita/plugins/extensions/pykrita/libkis/dockwidget.h @@ -1,37 +1,37 @@ /* * Copyright (c) 2015 Cyrille Berger * * This program 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 of the License, or * (at your option) any later version. * * This program 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 Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIS_DOCKWIDGET_H #define LIBKIS_DOCKWIDGET_H #include #include -#include +#include "libkis_export.h" class LIBKIS_EXPORT DockWidget : public QDockWidget, public KoCanvasObserverBase { Q_OBJECT public: DockWidget(); virtual ~DockWidget(); protected: virtual void setCanvas(KoCanvasBase* canvas); virtual void unsetCanvas(); }; #endif diff --git a/krita/plugins/extensions/pykrita/libkis/dockwidgetfactorybase.h b/krita/plugins/extensions/pykrita/libkis/dockwidgetfactorybase.h index 6478d2f183c..546ef441d09 100644 --- a/krita/plugins/extensions/pykrita/libkis/dockwidgetfactorybase.h +++ b/krita/plugins/extensions/pykrita/libkis/dockwidgetfactorybase.h @@ -1,42 +1,42 @@ /* * Copyright (c) 2015 Cyrille Berger * * This program 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 of the License, or * (at your option) any later version. * * This program 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 Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIS_DOCKWIDGETFACTORY_H #define LIBKIS_DOCKWIDGETFACTORY_H #include #include -#include +#include "libkis_export.h" class LIBKIS_EXPORT DockWidgetFactoryBase : public KoDockFactoryBase { public: DockWidgetFactoryBase(const QString& _id, DockPosition _dockPosition, bool _isCollapsable = true, bool _defaultCollapsed = false); virtual ~DockWidgetFactoryBase(); virtual QString id() const; virtual DockPosition defaultDockPosition() const; virtual bool isCollapsable() const; virtual bool defaultCollapsed() const; private: QString m_id; DockPosition m_dockPosition; bool m_isCollapsable, m_defaultCollapsed; }; #endif diff --git a/krita/plugins/extensions/pykrita/libkis/document.h b/krita/plugins/extensions/pykrita/libkis/document.h index c506a58a2d2..52f3d824968 100644 --- a/krita/plugins/extensions/pykrita/libkis/document.h +++ b/krita/plugins/extensions/pykrita/libkis/document.h @@ -1,43 +1,43 @@ /* * Copyright (c) 2014 Boudewijn Rempt * * This program 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 of the License, or * (at your option) any later version. * * This program 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 Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIS_DOCUMENT_H #define LIBKIS_DOCUMENT_H -#include +#include "libkis_export.h" #include class KisDocument; class Image; class LIBKIS_EXPORT Document : public QObject { Q_OBJECT public: explicit Document(KisDocument *document, QObject *parent = 0); Image *image(); Q_SIGNALS: public Q_SLOTS: private: QPointer m_document; }; #endif // LIBKIS_DOCUMENT_H diff --git a/krita/plugins/extensions/pykrita/libkis/image.h b/krita/plugins/extensions/pykrita/libkis/image.h index 88bbe6e4c5c..35f75b519ff 100644 --- a/krita/plugins/extensions/pykrita/libkis/image.h +++ b/krita/plugins/extensions/pykrita/libkis/image.h @@ -1,38 +1,38 @@ /* * Copyright (c) 2014 Boudewijn Rempt * * This program 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 of the License, or * (at your option) any later version. * * This program 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 Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIS_IMAGE_H #define LIBKIS_IMAGE_H #include #include -#include +#include "libkis_export.h" class LIBKIS_EXPORT Image : public QObject { Q_OBJECT public: explicit Image(QObject *image, QObject *parent = 0); Q_SIGNALS: public Q_SLOTS: private: KisImageWSP m_image; }; #endif // LIBKIS_IMAGE_H diff --git a/krita/plugins/extensions/pykrita/libkis/krita.h b/krita/plugins/extensions/pykrita/libkis/krita.h index 7eff2d678c1..5bdc2923a6b 100644 --- a/krita/plugins/extensions/pykrita/libkis/krita.h +++ b/krita/plugins/extensions/pykrita/libkis/krita.h @@ -1,63 +1,63 @@ /* * Copyright (c) 2014 Boudewijn Rempt * * This program 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 of the License, or * (at your option) any later version. * * This program 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 Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIS_KRITA_H #define LIBKIS_KRITA_H #include #include #include #include "application.h" #include "mainwindow.h" #include "view.h" #include "document.h" #include "image.h" -#include +#include "libkis_export.h" class DockWidgetFactoryBase; class ViewExtension; class LIBKIS_EXPORT Krita : public QObject { Q_OBJECT public: explicit Krita(QObject *parent = 0); QList mainWindows(); QList views(); QList documents(); QList images(); QAction *createAction(const QString &text); void addViewExtension(ViewExtension* _viewExtension); QList viewExtensions(); void addDockWidgetFactory(DockWidgetFactoryBase* _factory ); static Krita* instance(); Q_SIGNALS: public Q_SLOTS: private: static Krita* s_instance; QList m_viewExtensions; }; #endif // LIBKIS_KRITA_H diff --git a/krita/plugins/extensions/pykrita/libkis/libkis_export.h b/krita/plugins/extensions/pykrita/libkis/libkis_export.h new file mode 100644 index 00000000000..e3195073355 --- /dev/null +++ b/krita/plugins/extensions/pykrita/libkis/libkis_export.h @@ -0,0 +1,59 @@ +/* + This file is part of krita + Copyright (c) 2008 Boudewijn Rempt + Copyright (c) 2008 Thomas Zander + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. +*/ + +#ifndef LIBKIS_EXPORT_H +#define LIBKIS_EXPORT_H + +#include + +/* We use _WIN32/_WIN64 instead of Q_OS_WIN so that this header can be used from C files too */ +#if defined(_WIN32) || defined(_WIN64) + +#ifndef LIBKIS_EXPORT +# ifdef MAKE_LIBKIS_LIB +# define LIBKIS_EXPORT KDE_EXPORT +# else +# define LIBKIS_EXPORT KDE_IMPORT +# endif +#endif + +#else // not windows + +#define LIBKIS_EXPORT KDE_EXPORT + +#endif /* not windows */ + +/* Now the same for Krita*_TEST_EXPORT, if compiling with unit tests enabled */ +#ifdef COMPILING_TESTS +# if defined _WIN32 || defined _WIN64 +# if defined(MAKE_LIBKIS_LIB) +# define LIBKIS_TEST_EXPORT KDE_EXPORT +# else +# define LIBKIS_TEST_EXPORT KDE_IMPORT +# endif +# else /* not windows */ +# define LIBKIS_TEST_EXPORT KDE_EXPORT +# endif +#else /* not compiling tests */ +# define LIBKIS_TEST_EXPORT +#endif + +#endif /* LIBKIS_EXPORT_H */ diff --git a/krita/plugins/extensions/pykrita/libkis/mainwindow.h b/krita/plugins/extensions/pykrita/libkis/mainwindow.h index de3f605e4c5..e044deabe8f 100644 --- a/krita/plugins/extensions/pykrita/libkis/mainwindow.h +++ b/krita/plugins/extensions/pykrita/libkis/mainwindow.h @@ -1,41 +1,41 @@ /* * Copyright (c) 2014 Boudewijn Rempt * * This program 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 of the License, or * (at your option) any later version. * * This program 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 Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIS_MAINWINDOW_H #define LIBKIS_MAINWINDOW_H #include -#include +#include "libkis_export.h" class KisMainWindow; class LIBKIS_EXPORT MainWindow : public QObject { Q_OBJECT public: explicit MainWindow(KisMainWindow *mainWin, QObject *parent = 0); Q_SIGNALS: public Q_SLOTS: private: KisMainWindow *m_mainWindow; }; #endif // MAINWINDOW_H diff --git a/krita/plugins/extensions/pykrita/libkis/node.h b/krita/plugins/extensions/pykrita/libkis/node.h index 3ff5b40be0f..4a0830e686a 100644 --- a/krita/plugins/extensions/pykrita/libkis/node.h +++ b/krita/plugins/extensions/pykrita/libkis/node.h @@ -1,37 +1,37 @@ /* * Copyright (c) 2014 Boudewijn Rempt * * This program 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 of the License, or * (at your option) any later version. * * This program 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 Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIS_NODE_H #define LIBKIS_NODE_H #include -#include +#include "libkis_export.h" class LIBKIS_EXPORT Node : public QObject { Q_OBJECT public: explicit Node(QObject *parent = 0); Q_SIGNALS: public Q_SLOTS: }; #endif // LIBKIS_NODE_H diff --git a/krita/plugins/extensions/pykrita/libkis/view.h b/krita/plugins/extensions/pykrita/libkis/view.h index 635b015b9ca..637c33f3cce 100644 --- a/krita/plugins/extensions/pykrita/libkis/view.h +++ b/krita/plugins/extensions/pykrita/libkis/view.h @@ -1,43 +1,43 @@ /* * Copyright (c) 2014 Boudewijn Rempt * * This program 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 of the License, or * (at your option) any later version. * * This program 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 Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIS_VIEW_H #define LIBKIS_VIEW_H #include -#include +#include "libkis_export.h" class KisView; class LIBKIS_EXPORT View : public QObject { Q_OBJECT public: explicit View(KisView *view, QObject *parent = 0); Q_SIGNALS: public Q_SLOTS: private: KisView *m_view; }; #endif // LIBKIS_VIEW_H diff --git a/krita/plugins/extensions/pykrita/libkis/viewextension.h b/krita/plugins/extensions/pykrita/libkis/viewextension.h index 9da585c65c8..dfba9147ffa 100644 --- a/krita/plugins/extensions/pykrita/libkis/viewextension.h +++ b/krita/plugins/extensions/pykrita/libkis/viewextension.h @@ -1,37 +1,37 @@ /* * Copyright (c) 2015 Cyrille Berger * * This program 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 of the License, or * (at your option) any later version. * * This program 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 Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIS_VIEWEXTENSION_H #define LIBKIS_VIEWEXTENSION_H -#include +#include "libkis_export.h" #include class ViewManager; class LIBKIS_EXPORT ViewExtension : public QObject { Q_OBJECT public: explicit ViewExtension(QObject *parent = 0); virtual ~ViewExtension(); virtual void setup(ViewManager* _view) = 0; }; #endif diff --git a/krita/plugins/extensions/pykrita/libkis/viewmanager.h b/krita/plugins/extensions/pykrita/libkis/viewmanager.h index 9ec53b7941d..5f1207e0640 100644 --- a/krita/plugins/extensions/pykrita/libkis/viewmanager.h +++ b/krita/plugins/extensions/pykrita/libkis/viewmanager.h @@ -1,45 +1,45 @@ /* * Copyright (c) 2015 Cyrille Berger * * This program 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 of the License, or * (at your option) any later version. * * This program 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 Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIS_VIEWMANAGER_H #define LIBKIS_VIEWMANAGER_H #include -#include +#include "libkis_export.h" class KisViewManager; class QAction; class LIBKIS_EXPORT ViewManager : public QObject { Q_OBJECT public: explicit ViewManager(KisViewManager *viewManager, QObject *parent = 0); QAction *createAction(const QString &text); Q_SIGNALS: public Q_SLOTS: private: KisViewManager *m_viewManager; }; #endif // LIBKIS_VIEW_H