Warning, file /office/calligra/libs/widgets/KoResourceServerObserver.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 0003 Copyright (c) 2007 Sven Langkamp <sven.langkamp@gmail.com> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Lesser General Public 0007 License as published by the Free Software Foundation; either 0008 version 2.1 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Lesser General Public License for more details. 0014 0015 You should have received a copy of the GNU Lesser General Public 0016 License along with this library; if not, write to the Free Software 0017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 0018 */ 0019 0020 #ifndef KORESOURCESERVEROBSERVER_H 0021 #define KORESOURCESERVEROBSERVER_H 0022 0023 #include "kowidgets_export.h" 0024 0025 #include "KoResourceServerPolicies.h" 0026 0027 0028 /** 0029 * The KoResourceServerObserver class provides a interface to observe a KoResourceServer. 0030 * To receive notifications it needs to be added to the resource server. 0031 */ 0032 template <class T, class Policy = PointerStoragePolicy<T> > 0033 class KoResourceServerObserver 0034 { 0035 public: 0036 virtual ~KoResourceServerObserver() {} 0037 typedef typename Policy::PointerType PointerType; 0038 0039 virtual void unsetResourceServer() = 0; 0040 0041 /** 0042 * Will be called by the resource server after a resource is added 0043 * @param resource the added resource 0044 */ 0045 virtual void resourceAdded(PointerType resource) = 0; 0046 0047 /** 0048 * Will be called by the resource server before a resource will be removed 0049 * @param resource the resource which is going to be removed 0050 */ 0051 virtual void removingResource(PointerType resource) = 0; 0052 0053 /** 0054 * Will be called by the resource server when a resource is changed 0055 * @param resource the resource which is going to be removed 0056 */ 0057 virtual void resourceChanged(PointerType resource) = 0; 0058 0059 /** 0060 * Will be called by the resource server when resources are added or removed 0061 * from a tag category 0062 */ 0063 virtual void syncTaggedResourceView()=0; 0064 0065 /** 0066 * Will be called by the resource server when a new tag category has been created 0067 */ 0068 virtual void syncTagAddition(const QString& tag)=0; 0069 0070 /** 0071 * Will be called by the resource server when a new tag category has been deleted 0072 */ 0073 virtual void syncTagRemoval(const QString& tag)=0; 0074 0075 }; 0076 0077 #endif // KORESOURCESERVEROBSERVER_H