diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /ksirc/topic.h | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/topic.h')
-rw-r--r-- | ksirc/topic.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/ksirc/topic.h b/ksirc/topic.h new file mode 100644 index 00000000..73191128 --- /dev/null +++ b/ksirc/topic.h @@ -0,0 +1,70 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Simon Hausmann <hausmann@kde.org> + + This program is free software; you can redistribute it and/or + modify it under the terms of the Artistic License. +*/ +#ifndef __topic_h__ +#define __topic_h__ + +#include <kactivelabel.h> +#include <qtextedit.h> +#include <qlineedit.h> +#include <qpopupmenu.h> +#include <qguardedptr.h> + +class KSircTopicEditor; + +class KSircTopic : public KActiveLabel +{ + Q_OBJECT +public: + KSircTopic( QWidget *parent, const char *name = 0 ); + +public slots: + virtual void setText( const QString &); + +signals: + void topicChange( const QString &newTopic ); + +protected: + virtual void contentsMouseDoubleClickEvent( QMouseEvent * ); + virtual void contentsMouseReleaseEvent( QMouseEvent * ); + virtual void fontChange(QFont &); + +private slots: + void setNewTopic(); + void slotEditResized(); + void doResize(); + +private: + + + QGuardedPtr<KSircTopicEditor> m_editor; + bool m_doEdit; + int m_height; + QString m_text; +}; + +class KSircTopicEditor : public QTextEdit +{ + Q_OBJECT +public: + KSircTopicEditor( QWidget *parent, const char *name = 0 ); + +signals: + void resized(); + +public slots: + virtual void slotMaybeResize(); + +protected: + virtual void keyPressEvent( QKeyEvent *ev ); + virtual void focusOutEvent( QFocusEvent * ); + virtual QPopupMenu *createPopupMenu( const QPoint &pos ); + +private: + QGuardedPtr<QPopupMenu> m_popup; +}; + +#endif |