LeechCraft Azoth 0.6.70-16373-g319c272718
Modular multiprotocol IM plugin for LeechCraft
Loading...
Searching...
No Matches
LC::Azoth::IMUCJoinWidget Class Referenceabstract

This interface defines methods that should be implemented in widgets which are used to join MUC rooms. More...

#include "imucjoinwidget.h"

Public Member Functions

virtual ~IMUCJoinWidget ()
 
virtual void AccountSelected (QObject *account)=0
 Called when user selects a different account of this protocol.
 
virtual void Join (QObject *account)=0
 Called when user decides to join a chatroom from the given account.
 
virtual void Cancel ()=0
 Called when user decides to not join any chatrooms.
 
virtual QVariantMap GetIdentifyingData () const =0
 Returns the map with current join parameters.
 
virtual void SetIdentifyingData (const QVariantMap &data)=0
 Sets the previously saved join parameters.
 
virtual void validityChanged (bool isValid)=0
 Notifies about validity of the input.
 

Detailed Description

This interface defines methods that should be implemented in widgets which are used to join MUC rooms.

Please note that the join widget is global for the whole protocol thus account objects are used to distinguish between different accounts when joining.

Definition at line 24 of file imucjoinwidget.h.

Constructor & Destructor Documentation

◆ ~IMUCJoinWidget()

virtual LC::Azoth::IMUCJoinWidget::~IMUCJoinWidget ( )
inlinevirtual

Definition at line 27 of file imucjoinwidget.h.

Member Function Documentation

◆ AccountSelected()

virtual void LC::Azoth::IMUCJoinWidget::AccountSelected ( QObject * account)
pure virtual

Called when user selects a different account of this protocol.

In this function the join widget may change the account- dependent options according to the selected account, like default join nickname and such.

This function is only called if the account belonging to the join widget's protocol is selected. If the user selects an account from another protocol, this function won't be called.

Parameters
[in]accountThe account object of the protocol that returned this widget.

◆ Cancel()

virtual void LC::Azoth::IMUCJoinWidget::Cancel ( )
pure virtual

Called when user decides to not join any chatrooms.

◆ GetIdentifyingData()

virtual QVariantMap LC::Azoth::IMUCJoinWidget::GetIdentifyingData ( ) const
pure virtual

Returns the map with current join parameters.

The returned map could be saved by Azoth core to be used later to restore the join parameters, for example, if they were saved to history, and the user decides to pick a recent join from the history.

The returned map should have two mandatory fields. First is HumanReadableName, its value should be a human-readable QString, it is used to visually represent this item to the user. Second field is AccountID, the corresponding value should be a QByteArray with the ID of the selected account (IAccount::GetAccountID()).

Of course, all the data in the map should be serializable, since it would be stored in QSettings.

You are free to use any other fields.

Returns
Join parameters map.
See also
SetIdentifyingData()

◆ Join()

virtual void LC::Azoth::IMUCJoinWidget::Join ( QObject * account)
pure virtual

Called when user decides to join a chatroom from the given account.

Parameters
[in]accountThe account object through which the user wishes to join.

◆ SetIdentifyingData()

virtual void LC::Azoth::IMUCJoinWidget::SetIdentifyingData ( const QVariantMap & data)
pure virtual

Sets the previously saved join parameters.

This function is called when the user selects a previously saved join. See the documentation for GetIdentifyingData() for more information regarding the map's contents.

Parameters
[in]dataJoin parameters map.
See also
GetIdentifyingData()

◆ validityChanged()

virtual void LC::Azoth::IMUCJoinWidget::validityChanged ( bool isValid)
pure virtual

Notifies about validity of the input.

This signal should be emitted whenever the validity of the input data is changed.

Note
This function is expected to be a signal.
Parameters
[out]isValidWhether the data given by the user is valid.

The documentation for this class was generated from the following file: