From bcb704366cb5e333a626c18c308c7e0448a8e69f Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- ksirc/mditoplevel.h | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 ksirc/mditoplevel.h (limited to 'ksirc/mditoplevel.h') diff --git a/ksirc/mditoplevel.h b/ksirc/mditoplevel.h new file mode 100644 index 00000000..7f58619c --- /dev/null +++ b/ksirc/mditoplevel.h @@ -0,0 +1,75 @@ +#ifndef __mditoplevel_h__ +#define __mditoplevel_h__ + +#include +#include + +#include + +class KSTabWidget : public QTabWidget +{ + Q_OBJECT +public: + KSTabWidget ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ) + : QTabWidget(parent, name, f) + { + } + +protected: + virtual void mousePressEvent(QMouseEvent *e); + +signals: + void showContexMenu(QWidget *, const QPoint &); + +}; + +class QLabel; +class KPopupMenu; + +class MDITopLevel : public KMainWindow +{ + Q_OBJECT +public: + MDITopLevel(QWidget *parent = 0, const char *name = 0); + virtual ~MDITopLevel(); + + void addWidget( QWidget *widget, bool show ); + + void removeWidget( QWidget *widget ); + + QTabWidget *tabWidget() const { return m_tab; } + void next(); + void previous(); + + QPtrList &widgets() { return m_tabWidgets; } + + void hideWidget( QWidget *widget ); + void showWidget( QWidget *widget ); + + virtual bool eventFilter( QObject *obj, QEvent *ev ); + bool closing() const { return m_closing; } + +protected: + void removeFromAddressedList( const QWidget* w ); + virtual void closeEvent( QCloseEvent *ev ); + +private slots: + void slotWidgetDestroyed(); + void slotCurrentChanged( QWidget *page ); + void slotMarkPageDirty( bool ); + void slotChangeChannelName( const QString &, const QString &newName ); + void slotShowContexMenu(QWidget *, const QPoint &); + void slotCloseLastWid(); + +private: + KSTabWidget *m_tab; + KPopupMenu *m_pop; + QWidget *m_last_pop_wid; + QPtrList m_tabWidgets; + QPtrList m_addressed; + QPixmap m_dirtyIcon; + QPixmap m_addressedIcon; + bool m_closing; +}; + +#endif -- cgit v1.2.1