• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kopete/libkopete

KopeteView Class Reference

#include <kopeteview.h>

List of all members.


Detailed Description

Author:
Jason Keirstead

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.


Public Member Functions

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
 KopeteView (Kopete::ChatSession *manager, Kopete::ViewPlugin *parent)
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
virtual ~KopeteView ()

Protected Attributes

Kopete::ChatSession * m_manager
Kopete::ViewPlugin * m_plugin

Constructor & Destructor Documentation

KopeteView::KopeteView ( Kopete::ChatSession *  manager,
Kopete::ViewPlugin *  parent 
)

constructor

Definition at line 21 of file kopeteview.cpp.

KopeteView::~KopeteView (  )  [virtual]

Definition at line 51 of file kopeteview.cpp.


Member Function Documentation

virtual void KopeteView::appendMessage ( Kopete::Message &   )  [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.

void KopeteView::appendMessages ( QList< Kopete::Message >  msgs  )  [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.

void KopeteView::clear (  )  [virtual]

Clear the buffer.

Definition at line 31 of file kopeteview.cpp.

virtual bool KopeteView::closeView ( bool  force = false  )  [pure virtual]

Close this view.

virtual Kopete::Message KopeteView::currentMessage (  )  [pure virtual]

Returns the message currently in the edit area.

Returns:
The Kopete::Message object containing the message

virtual bool KopeteView::isVisible (  )  [pure virtual]

Get the current visibility of the view.

Returns:
Whether the view is visible or not.

virtual QWidget* KopeteView::mainWidget (  )  [pure virtual]

Get the view widget.

Can be reimplemented to return this if derived object is a widget

virtual void KopeteView::makeVisible (  )  [pure virtual]

Make the view visible.

Makes the view visible if it is currently hidden.

virtual void KopeteView::messageSentSuccessfully (  )  [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.

virtual void KopeteView::raise ( bool  activate = false  )  [pure virtual]

Raises the view above other windows.

Parameters:
activate change the focus to the window

virtual void KopeteView::registerContextMenuHandler ( QObject *  target,
const char *  slot 
) [inline, virtual]

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.

virtual void KopeteView::registerTooltipHandler ( QObject *  target,
const char *  slot 
) [inline, virtual]

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.

virtual void KopeteView::setCurrentMessage ( const Kopete::Message &  newMessage  )  [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

Kopete::ChatSession* KopeteView::m_manager [protected]

a pointer to the Kopete::ChatSession given in the constructor

Definition at line 173 of file kopeteview.h.

Kopete::ViewPlugin* KopeteView::m_plugin [protected]

Definition at line 174 of file kopeteview.h.


The documentation for this class was generated from the following files:
  • kopeteview.h
  • kopeteview.cpp

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal