Warning, file /office/calligra/libs/widgets/KoResourcePopupAction.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 * Made by Tomislav Lukman (tomislav.lukman@ck.tel.hr) 0003 * Copyright (C) 2012 Jean-Nicolas Artaud <jeannicolasartaud@gmail.com> 0004 * 0005 * This library is free software; you can redistribute it and/or 0006 * modify it under the terms of the GNU Library General Public 0007 * License as published by the Free Software Foundation; either 0008 * version 2 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 * Library General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Library General Public License 0016 * along with this library; see the file COPYING.LIB. If not, write to 0017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef KORESOURCEPOPUPACTION_H 0022 #define KORESOURCEPOPUPACTION_H 0023 0024 #include "kowidgets_export.h" 0025 0026 #include <QAction> 0027 0028 #include <QSharedPointer> 0029 0030 class KoShapeBackground; 0031 class KoAbstractResourceServerAdapter; 0032 class QModelIndex; 0033 0034 class KOWIDGETS_EXPORT KoResourcePopupAction : public QAction 0035 { 0036 Q_OBJECT 0037 0038 public: 0039 /** 0040 * Constructs a KoResourcePopupAction (gradient or pattern) with the specified parent. 0041 * 0042 * @param gradientResourceAdapter A pointer to gradient resource adapter. 0043 * @param parent The parent for this action. 0044 */ 0045 explicit KoResourcePopupAction(QSharedPointer<KoAbstractResourceServerAdapter>gradientResourceAdapter, QObject *parent = 0); 0046 0047 /** 0048 * Destructor 0049 */ 0050 ~KoResourcePopupAction() override; 0051 0052 QSharedPointer<KoShapeBackground> currentBackground() const; 0053 void setCurrentBackground(QSharedPointer<KoShapeBackground> background); 0054 0055 Q_SIGNALS: 0056 /// Emitted when a resource was selected 0057 void resourceSelected(QSharedPointer<KoShapeBackground> background); 0058 0059 public Q_SLOTS: 0060 void updateIcon(); 0061 0062 private Q_SLOTS: 0063 void indexChanged(const QModelIndex &modelIndex); 0064 0065 private: 0066 class Private; 0067 Private * const d; 0068 }; 0069 0070 #endif /* KORESOURCEPOPUPACTION_H */