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

kopete/libkopete

Public Member Functions | Protected Attributes | List of all members
KopeteView Class Referenceabstract

#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

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.

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
activatechange the focus to the window
virtual void KopeteView::registerContextMenuHandler ( QObject *  target,
const char *  slot 
)
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
targetA target QObject for the contextMenuEvent signal of the view
slotA slot that matches the signature ( QString&, KMenu *)

Definition at line 142 of file kopeteview.h.

virtual void KopeteView::registerTooltipHandler ( QObject *  target,
const char *  slot 
)
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
targetA target QObject for the contextMenuEvent signal of the view
slotA 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
newMessageThe 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
This file is part of the KDE documentation.
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.

kopete/libkopete

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

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal