Document actionshandler

Also cleanup some unused includes
This commit is contained in:
James Graham
2023-04-22 18:50:17 +00:00
parent 2fb4fdd18f
commit 970cd5cf7a
2 changed files with 21 additions and 8 deletions

View File

@@ -3,8 +3,6 @@
#include "actionshandler.h" #include "actionshandler.h"
#include "controller.h"
#include <csapi/joining.h> #include <csapi/joining.h>
#include <events/roommemberevent.h> #include <events/roommemberevent.h>
@@ -13,13 +11,10 @@
#include <KLocalizedString> #include <KLocalizedString>
#include <QStringBuilder> #include <QStringBuilder>
#include "controller.h"
#include "models/actionsmodel.h" #include "models/actionsmodel.h"
#include "models/customemojimodel.h" #include "models/customemojimodel.h"
#include "neochatconfig.h" #include "neochatconfig.h"
#include "neochatroom.h" #include "neochatroom.h"
#include "neochatuser.h"
#include "roommanager.h"
#include "texthandler.h" #include "texthandler.h"
using namespace Quotient; using namespace Quotient;

View File

@@ -12,13 +12,31 @@
class CustomEmojiModel; class CustomEmojiModel;
class NeoChatRoom; class NeoChatRoom;
/// \brief Handles user interactions with NeoChat (joining room, creating room, /**
/// sending message). Account management is handled by Controller. * @class ActionsHandler
*
* This class handles chat messages ready for posting to a room.
*
* Everything that needs to be done to prepare the message for posting in a room
* including:
* - File handling
* - User mentions
* - Quick edits
* - Chat actions
* - Custom emojis
*
* @note A chat action is a message starting with /, resulting in something other
* than a normal message being sent (e.g. /me, /join).
*
* @sa ActionsModel, NeoChatRoom
*/
class ActionsHandler : public QObject class ActionsHandler : public QObject
{ {
Q_OBJECT Q_OBJECT
/// \brief The room that messages will be sent to. /**
* @brief The room that messages will be sent to.
*/
Q_PROPERTY(NeoChatRoom *room READ room WRITE setRoom NOTIFY roomChanged) Q_PROPERTY(NeoChatRoom *room READ room WRITE setRoom NOTIFY roomChanged)
public: public: