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

kopete/kopete

chattexteditpart.h

Go to the documentation of this file.
00001 /*
00002     chattexteditpart.h - Chat Text Edit Part
00003 
00004     Copyright (c) 2004      by Richard Smith         <kde@metafoo.co.uk>
00005 
00006     Kopete    (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
00007 
00008     *************************************************************************
00009     *                                                                       *
00010     * This program is free software; you can redistribute it and/or modify  *
00011     * it under the terms of the GNU General Public License as published by  *
00012     * the Free Software Foundation; either version 2 of the License, or     *
00013     * (at your option) any later version.                                   *
00014     *                                                                       *
00015     *************************************************************************
00016 */
00017 
00018 #ifndef CHATTEXTEDITPART_H
00019 #define CHATTEXTEDITPART_H
00020 
00021 #include "krichtexteditpart.h"
00022 #include <QtCore/QStringList>
00023 
00024 #include <kopete_export.h>
00025 
00026 class QTimer;
00027 
00028 class KCompletion;
00029 
00030 namespace Sonnet {
00031     class Highlighter;
00032 }
00033 
00034 namespace Kopete
00035 {
00036 class Message;
00037 class Contact;
00038 class OnlineStatus;
00039 class ChatSession;
00040 class Protocol;
00041 class PropertyContainer;
00042 }
00043 
00053 class KOPETECHATWINDOW_SHARED_EXPORT ChatTextEditPart : public KRichTextEditPart
00054 {
00055     Q_OBJECT
00056 public:
00057     ChatTextEditPart( Kopete::ChatSession *session, QWidget *parent);
00058     ~ChatTextEditPart();
00059     
00064     Kopete::Message contents();
00065     
00070     void setContents( const Kopete::Message &message );
00071 
00076     void addText( const QString &text );
00077     
00081     bool canSend();
00082 
00086     bool isTyping();
00087 
00088 public slots:
00092     void historyUp();
00093     
00097     void historyDown();
00098     
00102     void complete();
00103     
00107     void sendMessage();
00108 
00109 signals:
00114     void messageSent( Kopete::Message &message );
00115 
00120     void typing( bool typing );
00121 
00126     void canSendChanged( bool canSend );
00127 
00128 private slots:
00134     void slotContactAdded( const Kopete::Contact *c );
00135 
00141     void slotContactRemoved( const Kopete::Contact *c );
00142 
00148     void slotContactStatusChanged( Kopete::Contact *contact, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldstatus );
00149 
00153     void slotTextChanged();
00154 
00159     void slotRepeatTypingTimer();
00160     
00164     void slotStoppedTypingTimer();
00165     
00169     void slotPropertyChanged( Kopete::PropertyContainer *, const QString &key, const QVariant &oldValue, const QVariant &newValue  );
00170 
00174     void slotAppearanceChanged();
00175 
00176 private:
00177     void setProtocolRichTextSupport();
00178 
00179 private:
00180     Kopete::ChatSession *m_session;
00181     
00190     QStringList historyList;
00191     int historyPos;
00192     
00193     KCompletion *mComplete;
00194     QString m_lastMatch;
00195     
00196     QTimer *m_typingRepeatTimer;
00197     QTimer *m_typingStopTimer;
00198 };
00199 
00200 #endif
00201 
00202 // vim: set noet ts=4 sts=4 sw=4:

kopete/kopete

Skip menu "kopete/kopete"
  • 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