From 85b569a3c946af5486e2584fa0e3b123447b0ac9 Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 28 Nov 2018 21:14:11 +0100 Subject: [PATCH] Add a description for each fileitemactionplugin class --- fileitemactionplugin/syncthingdiractions.h | 3 +++ fileitemactionplugin/syncthingfileitemaction.h | 4 ++++ fileitemactionplugin/syncthingfileitemactionstaticdata.h | 6 ++++++ fileitemactionplugin/syncthinginfoaction.h | 7 +++++++ fileitemactionplugin/syncthingmenuaction.h | 3 +++ 5 files changed, 23 insertions(+) diff --git a/fileitemactionplugin/syncthingdiractions.h b/fileitemactionplugin/syncthingdiractions.h index c92776e..6ecb116 100644 --- a/fileitemactionplugin/syncthingdiractions.h +++ b/fileitemactionplugin/syncthingdiractions.h @@ -5,6 +5,9 @@ #include "./syncthinginfoaction.h" +/*! + * \brief The SyncthingDirActions class provides the read-only directory info actions. + */ class SyncthingDirActions : public QObject { Q_OBJECT friend QList &operator<<(QList &, SyncthingDirActions &); diff --git a/fileitemactionplugin/syncthingfileitemaction.h b/fileitemactionplugin/syncthingfileitemaction.h index cf8104a..73a3ee0 100644 --- a/fileitemactionplugin/syncthingfileitemaction.h +++ b/fileitemactionplugin/syncthingfileitemaction.h @@ -7,6 +7,10 @@ class KFileItemListProperties; +/*! + * \brief The SyncthingFileItemAction class implements the plugin interface. + * \remarks This is the only class directly used by Dolphin. + */ class SyncthingFileItemAction : public KAbstractFileItemActionPlugin { Q_OBJECT diff --git a/fileitemactionplugin/syncthingfileitemactionstaticdata.h b/fileitemactionplugin/syncthingfileitemactionstaticdata.h index 5f90fad..2b5d2dc 100644 --- a/fileitemactionplugin/syncthingfileitemactionstaticdata.h +++ b/fileitemactionplugin/syncthingfileitemactionstaticdata.h @@ -3,6 +3,12 @@ #include "../connector/syncthingconnection.h" +/*! + * \brief The SyncthingFileItemActionStaticData class holds objects required during the whole application's live time. + * + * For instance the connection to Syncthing is kept alive until Dolphin is closed to prevent re-establishing it on each and + * every time the context menu is shown. + */ class SyncthingFileItemActionStaticData : public QObject { Q_OBJECT Q_PROPERTY(QString configPath READ configPath) diff --git a/fileitemactionplugin/syncthinginfoaction.h b/fileitemactionplugin/syncthinginfoaction.h index c8bbd5e..df3f44a 100644 --- a/fileitemactionplugin/syncthinginfoaction.h +++ b/fileitemactionplugin/syncthinginfoaction.h @@ -8,6 +8,9 @@ QT_FORWARD_DECLARE_CLASS(QLabel) class SyncthingInfoAction; +/*! + * \brief The SyncthingInfoWidget class displays a SyncthingInfoAction. + */ class SyncthingInfoWidget : public QWidget { Q_OBJECT @@ -23,6 +26,10 @@ private: QLabel *const m_iconLabel; }; +/*! + * \brief The SyncthingInfoAction class provides a display-only QAction used to show eg. the directory info. + * \remarks In contrast to a regular QAction, this class has no highlighting on mouseover event. + */ class SyncthingInfoAction : public QWidgetAction { Q_OBJECT diff --git a/fileitemactionplugin/syncthingmenuaction.h b/fileitemactionplugin/syncthingmenuaction.h index 04439ed..32d80b9 100644 --- a/fileitemactionplugin/syncthingmenuaction.h +++ b/fileitemactionplugin/syncthingmenuaction.h @@ -9,6 +9,9 @@ namespace Data { enum class SyncthingStatus; } +/*! + * \brief The SyncthingMenuAction class provides the top-level menu "Syncthing" entry for the context menu. + */ class SyncthingMenuAction : public QAction { Q_OBJECT