File indexing completed on 2024-04-21 04:57:56

0001 // -*- c++ -*-
0002 
0003 /*
0004     SPDX-FileCopyrightText: 2003 Richard J. Moore <rich@kde.org>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #ifndef __plugin_autorefresh_h
0010 #define __plugin_autorefresh_h
0011 
0012 #include <QVariant>
0013 #include <konq_kpart_plugin.h>
0014 
0015 class QTimer;
0016 class KSelectAction;
0017 
0018 /**
0019  * A plugin is the way to add actions to an existing @ref KParts application,
0020  * or to a @ref Part.
0021  *
0022  * The XML of those plugins looks exactly like of the shell or parts,
0023  * with one small difference: The document tag should have an additional
0024  * attribute, named "library", and contain the name of the library implementing
0025  * the plugin.
0026  *
0027  * If you want this plugin to be used by a part, you need to
0028  * install the rc file under the directory
0029  * "data" (KDEDIR/share/apps usually)+"/instancename/kpartplugins/"
0030  * where instancename is the name of the part's instance.
0031  **/
0032 class AutoRefresh : public KonqParts::Plugin
0033 {
0034     Q_OBJECT
0035 public:
0036 
0037     /**
0038      * Construct a new KParts plugin.
0039      */
0040     explicit AutoRefresh(QObject *parent = nullptr, const QVariantList &args = QVariantList());
0041 
0042     /**
0043      * Destructor.
0044      */
0045     ~AutoRefresh() override;
0046 
0047 public slots:
0048     void slotRefresh();
0049     void slotIntervalChanged();
0050 
0051 private:
0052     KSelectAction *refresher;
0053     QTimer *timer;
0054 };
0055 
0056 #endif