File indexing completed on 2025-02-02 04:56:55
0001 /*************************************************************************** 0002 * SPDX-FileCopyrightText: 2022 S. MANKOWSKI stephane@mankowski.fr 0003 * SPDX-FileCopyrightText: 2022 G. DE BURE support@mankowski.fr 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 ***************************************************************************/ 0006 #ifndef SKGSELECTALLPLUGIN_H 0007 #define SKGSELECTALLPLUGIN_H 0008 /** @file 0009 * A plugin to select all. 0010 * 0011 * @author Stephane MANKOWSKI 0012 */ 0013 #include "skginterfaceplugin.h" 0014 0015 class QLabel; 0016 0017 /** 0018 * A plugin to select all 0019 */ 0020 class SKGSelectAllPlugin : public SKGInterfacePlugin 0021 { 0022 Q_OBJECT 0023 Q_INTERFACES(SKGInterfacePlugin) 0024 0025 public: 0026 /** 0027 * Default Constructor 0028 */ 0029 explicit SKGSelectAllPlugin(QWidget* iWidget, QObject* iParent, const QVariantList& iArg); 0030 0031 /** 0032 * Default Destructor 0033 */ 0034 ~SKGSelectAllPlugin() override; 0035 0036 /** 0037 * Called to initialise the plugin 0038 * @param iDocument the main document 0039 * @return true if the plugin is compatible with the document 0040 */ 0041 bool setupActions(SKGDocument* iDocument) override; 0042 0043 /** 0044 * The title of the plugin. 0045 * @return The title of the plugin 0046 */ 0047 QString title() const override; 0048 0049 /** 0050 * The icon of the plugin. 0051 * @return The icon of the plugin 0052 */ 0053 QString icon() const override; 0054 0055 /** 0056 * The toolTip of the plugin. 0057 * @return The toolTip of the plugin 0058 */ 0059 QString toolTip() const override; 0060 0061 /** 0062 * The tips list of the plugin. 0063 * @return The tips list of the plugin 0064 */ 0065 QStringList tips() const override; 0066 0067 /** 0068 * Must be implemented to set the position of the plugin. 0069 * @return integer value between 0 and 999 (default = 999) 0070 */ 0071 int getOrder() const override; 0072 0073 private Q_SLOTS: 0074 void onSelectAll(); 0075 void onSelectionChanged(); 0076 0077 private: 0078 Q_DISABLE_COPY(SKGSelectAllPlugin) 0079 0080 SKGDocument* m_currentDocument; 0081 QLabel* m_selectionMessage; 0082 }; 0083 0084 #endif // SKGSELECTALLPLUGIN_H