Warning, file /office/calligra/libs/widgets/KoResourceModelBase.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 * Copyright (C) 2014 Victor Lafon <metabolic.ewilan@hotmail.fr> 0003 * 0004 * This library is free software; you can redistribute it and/or 0005 * modify it under the terms of the GNU Library General Public 0006 * License as published by the Free Software Foundation; either 0007 * version 2 of the License, or (at your option) any later version. 0008 * 0009 * This library is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 * Library General Public License for more details. 0013 * 0014 * You should have received a copy of the GNU Library General Public License 0015 * along with this library; see the file COPYING.LIB. If not, write to 0016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef KORESOURCEMODELBASE_H 0021 #define KORESOURCEMODELBASE_H 0022 0023 #include <QAbstractTableModel> 0024 #include "kowidgets_export.h" 0025 0026 class KoResource; 0027 0028 /// The resource model managing the resource data 0029 class KOWIDGETS_EXPORT KoResourceModelBase : public QAbstractTableModel 0030 { 0031 Q_OBJECT 0032 public: 0033 explicit KoResourceModelBase(QObject * parent = nullptr ); 0034 ~KoResourceModelBase() override; 0035 0036 /// reimplemented 0037 int rowCount(const QModelIndex &parent = QModelIndex()) const override = 0; 0038 /// reimplemented 0039 int columnCount ( const QModelIndex & parent = QModelIndex() ) const override = 0; 0040 /// reimplemented 0041 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override = 0; 0042 /// reimplemented 0043 QModelIndex index ( int row, int column = 0, const QModelIndex & parent = QModelIndex() ) const override = 0; 0044 0045 virtual QModelIndex indexFromResource(KoResource* resource) const =0; 0046 virtual QStringList assignedTagsList(KoResource *resource) const =0; 0047 virtual bool removeResource(KoResource* resource) =0; 0048 virtual void addTag(KoResource* resource, const QString& tag) =0; 0049 virtual void deleteTag(KoResource *resource, const QString &tag) =0; 0050 virtual int resourcesCount() const =0; 0051 virtual QList<KoResource *> currentlyVisibleResources() const =0; 0052 virtual void updateServer() =0; 0053 virtual void enableResourceFiltering(bool enable) =0; 0054 virtual void searchTextChanged(const QString& searchString) =0; 0055 virtual QStringList tagNamesList() const =0; 0056 virtual void setCurrentTag(const QString& currentTag) =0; 0057 virtual QList<KoResource *> serverResources() const =0; 0058 virtual void tagCategoryMembersChanged() =0; 0059 virtual void tagCategoryAdded(const QString& tag) =0; 0060 virtual void tagCategoryRemoved(const QString& tag) =0; 0061 0062 private Q_SLOTS: 0063 virtual void tagBoxEntryWasModified() =0; 0064 virtual void tagBoxEntryWasAdded(const QString& tag) =0; 0065 virtual void tagBoxEntryWasRemoved(const QString& tag) =0; 0066 virtual void resourceAdded(KoResource *resource) =0; 0067 virtual void resourceRemoved(KoResource *resource) =0; 0068 virtual void resourceChanged(KoResource* resource) =0; 0069 }; 0070 #endif // KORESOURCEMODELBASE_H 0071