LeechCraft Azoth  0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
LC::Azoth::IConfigurableMUC Class Referenceabstract

This interfaces is used for MUCs that can be configured. More...

#include "iconfigurablemuc.h"

Public Member Functions

virtual ~IConfigurableMUC ()
 
virtual QWidget * GetConfigurationWidget ()=0
 Returns the widget used for configuration. More...
 
virtual void AcceptConfiguration (QWidget *widget)=0
 Accepts the configuration. More...
 

Detailed Description

This interfaces is used for MUCs that can be configured.

If a multiuser chatroom can be configured by the user, than it can implement this interface for the Azoth to promote this ability to the user. Obviously, the chatroom should also implement ICLEntry and IMUCEntry interfaces.

Definition at line 69 of file iconfigurablemuc.h.

Constructor & Destructor Documentation

◆ ~IConfigurableMUC()

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

Definition at line 72 of file iconfigurablemuc.h.

Member Function Documentation

◆ AcceptConfiguration()

virtual void LC::Azoth::IConfigurableMUC::AcceptConfiguration ( QWidget *  widget)
pure virtual

Accepts the configuration.

If the user has accepted the configuration, this method is called with the widget being the one returned previously from the GetConfigurationWidget(). In this method, for example, it could be qobject_cast'ed to the exact widget type, and the values entered by the user used to update the configuration of the room.

Parameters
[in]widgetThe widget previously returned from GetConfigurationWidget() and filled by the user.
See also
GetConfigurationWidget()

◆ GetConfigurationWidget()

virtual QWidget* LC::Azoth::IConfigurableMUC::GetConfigurationWidget ( )
pure virtual

Returns the widget used for configuration.

The returned widget is shown to the user to be filled by him, and if the user accepts the new configuration, the AcceptConfiguration() of this method would be called (or IMUCConfigWidget::accept(), depending on context).

Obviously, it's better to pre-fill the widget with the values corresponding to the current configuration of the MUC room. Since the filling may require communicating to the server, the widget is assumed to be in the invalid state until its dataReady() signal is emitted. Until that signal is emitted, user won't be allowed to interact with the widget.

This function should create a new widget each time it is called, and the ownership is transferred to the caller.

The returned widget must implement IMUCConfigWidget.

Returns
The widget used to configure the room, implementing IMUCConfigWidget.
See also
AcceptConfiguration()

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