1 /* 2 * %kadu copyright begin% 3 * Copyright 2014 Bartosz Brachaczek (b.brachaczek@gmail.com) 4 * Copyright 2011 Rafał Przemysław Malinowski (rafal.przemyslaw.malinowski@gmail.com) 5 * %kadu copyright end% 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as 9 * published by the Free Software Foundation; either version 2 of 10 * the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #pragma once 22 23 #include <QtCore/QPointer> 24 #include <QtWidgets/QAction> 25 26 #include "gui/actions/action-description.h" 27 28 class ChatWidget; 29 class PluginInjectedFactory; 30 class ScreenShotConfiguration; 31 32 class ScreenshotAction : public ActionDescription 33 { 34 Q_OBJECT 35 36 QPointer<PluginInjectedFactory> m_pluginInjectedFactory; 37 QPointer<ScreenShotConfiguration> m_screenShotConfiguration; 38 39 ChatWidget * findChatWidget(QObject *obejct); 40 41 private slots: 42 INJEQT_SET void setPluginInjectedFactory(PluginInjectedFactory *pluginInjectedFactory); 43 44 void takeStandardShotSlot(ChatWidget *chatWidget = 0); 45 void takeShotWithChatWindowHiddenSlot(); 46 void takeWindowShotSlot(); 47 48 protected: 49 virtual void actionInstanceCreated(Action *action); 50 virtual void actionTriggered(QAction *sender, bool toggled); 51 virtual void updateActionState(Action *action); 52 53 public: 54 explicit ScreenshotAction(ScreenShotConfiguration *screenShotConfiguration, QObject *parent); 55 virtual ~ScreenshotAction(); 56 57 }; 58