Warning, file /office/calligra/libs/widgets/KoResourceTaggingManager.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 * This file is part of the KDE project 0003 * Copyright (c) 2002 Patrick Julien <freak@codepimps.org> 0004 * Copyright (c) 2007 Jan Hambrecht <jaham@gmx.net> 0005 * Copyright (c) 2007 Sven Langkamp <sven.langkamp@gmail.com> 0006 * Copyright (C) 2011 Srikanth Tiyyagura <srikanth.tulasiram@gmail.com> 0007 * Copyright (c) 2011 José Luis Vergara <pentalis@gmail.com> 0008 * Copyright (c) 2013 Sascha Suelzer <s.suelzer@gmail.com> 0009 * 0010 * This library is free software; you can redistribute it and/or 0011 * modify it under the terms of the GNU Library General Public 0012 * License as published by the Free Software Foundation; either 0013 * version 2 of the License, or (at your option) any later version. 0014 * 0015 * This library is distributed in the hope that it will be useful, 0016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0018 * Library General Public License for more details. 0019 * 0020 * You should have received a copy of the GNU Library General Public License 0021 * along with this library; see the file COPYING.LIB. If not, write to 0022 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0023 * Boston, MA 02110-1301, USA. 0024 */ 0025 0026 #ifndef KORESOURCETAGGINGMANAGER_H 0027 #define KORESOURCETAGGINGMANAGER_H 0028 0029 #include <QObject> 0030 0031 class QWidget; 0032 class QStringList; 0033 class QString; 0034 class QPoint; 0035 0036 class KoTagFilterWidget; 0037 class KoTagChooserWidget; 0038 class KoResourceModel; 0039 class KoResource; 0040 0041 class KoResourceTaggingManager : public QObject 0042 { 0043 Q_OBJECT 0044 0045 public: 0046 explicit KoResourceTaggingManager(KoResourceModel* model, QWidget* parent); 0047 ~KoResourceTaggingManager() override; 0048 void showTaggingBar(bool show); 0049 QStringList availableTags() const; 0050 QString currentTag(); 0051 void contextMenuRequested(KoResource* currentResource, QPoint pos); 0052 void allowTagModification( bool set ); 0053 bool allowTagModification(); 0054 KoTagFilterWidget* tagFilterWidget(); 0055 KoTagChooserWidget* tagChooserWidget(); 0056 private Q_SLOTS: 0057 void undeleteTag(const QString& tagToUndelete); 0058 void purgeTagUndeleteList(); 0059 void contextCreateNewTag(KoResource* resource, const QString& tag); 0060 void contextCreateNewTag(const QString& tag); 0061 void syncTagBoxEntryRemoval(const QString& tag); 0062 void syncTagBoxEntryAddition(const QString& tag); 0063 void syncTagBoxEntries(); 0064 void tagSaveButtonPressed(); 0065 void contextRemoveTagFromResource(KoResource* resource, const QString& tag); 0066 void contextAddTagToResource(KoResource* resource, const QString& tag); 0067 void renameTag(const QString &oldName, const QString &newName); 0068 void tagChooserIndexChanged(const QString& lineEditText); 0069 void tagSearchLineEditTextChanged(const QString& lineEditText); 0070 void removeTagFromComboBox(const QString& tag); 0071 0072 private: 0073 void contextMenuRequested(KoResource* resource, const QStringList& resourceTags, const QPoint& pos); 0074 void enableContextMenu(bool enable); 0075 void removeResourceTag(KoResource* resource, const QString& tagName); 0076 void addResourceTag(KoResource* resource, const QString& tagName); 0077 void updateTaggedResourceView(); 0078 class Private; 0079 Private* const d; 0080 }; 0081 0082 0083 #endif // KORESOURCETAGGINGINTERFACE_H