summaryrefslogtreecommitdiffstats
path: root/ksirc/mditoplevel.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /ksirc/mditoplevel.h
downloadtdenetwork-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/mditoplevel.h')
-rw-r--r--ksirc/mditoplevel.h75
1 files changed, 75 insertions, 0 deletions
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 <qptrlist.h>
+#include <qtabwidget.h>
+
+#include <kmainwindow.h>
+
+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<QWidget> &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<QWidget> m_tabWidgets;
+ QPtrList<QWidget> m_addressed;
+ QPixmap m_dirtyIcon;
+ QPixmap m_addressedIcon;
+ bool m_closing;
+};
+
+#endif