20 #ifndef CHATMESSAGEPART_H
21 #define CHATMESSAGEPART_H
23 #include <khtml_part.h>
24 #include <dom/html_element.h>
25 #include <dom/dom2_events.h>
28 #include <kopetemessage.h>
30 #include <kopete_export.h>
63 void keepScrolledDown();
72 QString formatName(
const Kopete::Contact* contact, Qt::TextFormat format )
const;
81 QString formatName(
const QString &sourceName, Qt::TextFormat format )
const;
92 void copy(
bool justselection =
false);
119 void appendMessage( Kopete::Message &message,
bool restoring =
false);
130 void setStyle(
const QString &styleName );
147 void setStyleVariant(
const QString &variantPath );
149 void messageStateChanged( uint messageId, Kopete::Message::MessageState state );
155 KDE_DEPRECATED
void slotToggleGraphicOverride(
bool enable);
161 void contextMenuEvent(
const QString &textUnderMouse, KMenu *popupMenu );
166 void tooltipEvent(
const QString &textUnderMouse,
QString &toolTip );
169 void slotOpenURLRequest(
const KUrl &url,
const KParts::OpenUrlArguments &,
const KParts::BrowserArguments & );
170 void slotFileTransferIncomingDone(
unsigned int id );
171 void slotScrollView();
172 void slotRenderingFinished();
173 void slotAppearanceChanged();
175 void slotScrollingTo(
int y );
177 void slotRefreshView();
183 void slotCloseView(
bool force =
false );
198 void slotUpdateHeaderDisplayName();
202 void slotUpdateHeaderPhoto();
204 void resendMessage( uint messageId );
206 void playVoiceClip( uint messageId );
208 void saveVoiceClip( uint messageId );
211 virtual void khtmlDrawContentsEvent( khtml::DrawContentsEvent * );
214 void readOverrides();
216 const QString styleHTML()
const;
218 Kopete::Contact *contactFromNode(
const DOM::Node &n )
const;
223 void emitTooltipEvent(
const QString &textUnderMouse,
QString &toolTipString );
242 QString formatStyleKeywords(
const QString &sourceHTML,
const Kopete::Message &message );
270 QString formatMessageBody(
const Kopete::Message &message );
275 void writeTemplate();
283 QString adjustStyleVariantForChatSession(
const QString & styleVariant )
const;
289 QString photoForContact(
const Kopete::Contact *contact )
const;
291 void addFileTransferButtonsEventListener(
unsigned int id );
293 void disableFileTransferButtons(
unsigned int id );
295 void addVoiceClipsButtonsEventListener(
unsigned int id );
297 void changeMessageStateElement( uint
id, Kopete::Message::MessageState state );
299 void registerClickEventListener( DOM::HTMLElement element );
This class represent a single chat window style.
virtual Kopete::ChatSession * manager(Kopete::Contact::CanCreateFlags)
void playVoiceClip(uint messageId)
virtual bool event(QEvent *e)
void resendMessage(uint messageId)
void saveVoiceClip(uint messageId)
virtual void handleEvent(DOM::Event &event)