kopete/libkopete
#include <kopeteview.h>
Public Member Functions | |
KopeteView (Kopete::ChatSession *manager, Kopete::ViewPlugin *parent) | |
virtual | ~KopeteView () |
virtual void | appendMessage (Kopete::Message &)=0 |
virtual void | appendMessages (QList< Kopete::Message >) |
virtual void | clear () |
virtual bool | closeView (bool force=false)=0 |
virtual Kopete::Message | currentMessage ()=0 |
virtual bool | isVisible ()=0 |
virtual QWidget * | mainWidget ()=0 |
virtual void | makeVisible ()=0 |
virtual void | messageSentSuccessfully ()=0 |
Kopete::ChatSession * | msgManager () const |
Kopete::ViewPlugin * | plugin () |
virtual void | raise (bool activate=false)=0 |
virtual void | registerContextMenuHandler (QObject *target, const char *slot) |
virtual void | registerTooltipHandler (QObject *target, const char *slot) |
virtual void | setCurrentMessage (const Kopete::Message &newMessage)=0 |
Protected Attributes | |
Kopete::ChatSession * | m_manager |
Kopete::ViewPlugin * | m_plugin |
Detailed Description
Abstract parent class for all types of views used for messaging.These view objects are provided by a Kopete::ViewPlugin
- See also
- Kopete::ViewPlugin
Definition at line 40 of file kopeteview.h.
Constructor & Destructor Documentation
KopeteView::KopeteView | ( | Kopete::ChatSession * | manager, |
Kopete::ViewPlugin * | parent | ||
) |
constructor
Definition at line 21 of file kopeteview.cpp.
|
virtual |
Definition at line 51 of file kopeteview.cpp.
Member Function Documentation
|
pure virtual |
add a message to the view
The message gets added at the end of the view and is automatically displayed. Classes that inherit from KopeteView should make this a slot.
|
virtual |
append multiple messages to the view
This function does the same thing as the above function but can be reimplemented if it is faster to apend several messages in the same time.
The default implementation just call appendMessage() X times
Definition at line 36 of file kopeteview.cpp.
|
virtual |
Clear the buffer.
Definition at line 31 of file kopeteview.cpp.
|
pure virtual |
Close this view.
|
pure virtual |
Returns the message currently in the edit area.
- Returns
- The Kopete::Message object containing the message
|
pure virtual |
Get the current visibility of the view.
- Returns
- Whether the view is visible or not.
|
pure virtual |
Get the view widget.
Can be reimplemented to return this if derived object is a widget
|
pure virtual |
Make the view visible.
Makes the view visible if it is currently hidden.
|
pure virtual |
Inform the view the message was sent successfully.
This should be reimplemented as a SLOT in any derived objects
Kopete::ChatSession * KopeteView::msgManager | ( | ) | const |
Get the message manager.
- Returns
- The Kopete::ChatSession that the view is in communication with.
Definition at line 26 of file kopeteview.cpp.
Kopete::ViewPlugin * KopeteView::plugin | ( | ) |
Returns the Kopete::ViewPlugin responsible for this view.
KopeteView objects are created by plugins. This returns a pointer to the plugin that created this view. You can use this to infer other information on this view and it's capabilities.
Definition at line 46 of file kopeteview.cpp.
|
pure virtual |
Raises the view above other windows.
- Parameters
-
activate change the focus to the window
|
inlinevirtual |
Register a handler for the context menu.
Plugins should call this slot at view creation to register themselves as handlers for the context menu of this view. Plugins can attach to the viewCreated signal of KopeteMessageManagerFactory to know when views are created.
A view does not need to implement this method unless they have context menus that can be extended
- Parameters
-
target A target QObject for the contextMenuEvent signal of the view slot A slot that matches the signature ( QString&, KMenu *)
Definition at line 142 of file kopeteview.h.
|
inlinevirtual |
Register a handler for the tooltip.
Plugins should call this slot at view creation to register themselves as handlers for the tooltip of this view. Plugins can attach to the viewCreated signal of KopeteMessageManagerFactory to know when views are created.
A view does not need to impliment this method unless it has the ability to show tooltips
- Parameters
-
target A target QObject for the contextMenuEvent signal of the view slot A slot that matches the signature ( QString&, KMenu *)
Definition at line 158 of file kopeteview.h.
|
pure virtual |
Set the message that the view is currently editing.
- Parameters
-
newMessage The Kopete::Message object containing the message to be edited.
Member Data Documentation
|
protected |
a pointer to the Kopete::ChatSession given in the constructor
Definition at line 173 of file kopeteview.h.
|
protected |
Definition at line 174 of file kopeteview.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.