kmditaskbar.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _KMDITASKBAR_H_
00029 #define _KMDITASKBAR_H_
00030
00031 #include <ktoolbar.h>
00032 #include <qptrlist.h>
00033 #include <qpixmap.h>
00034 #include <qlabel.h>
00035 #include <qpushbutton.h>
00036
00037 #include "kmdidefines.h"
00038
00039 class KMdiMainFrm;
00040 class KMdiChildView;
00041 class KMdiTaskBar;
00042
00043 class KMdiTaskBarButtonPrivate;
00044
00051 class KMDI_EXPORT KMdiTaskBarButton : public QPushButton
00052 {
00053 Q_OBJECT
00054
00055 public:
00059 KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_ptr);
00063 ~KMdiTaskBarButton();
00067 QString actualText() const;
00071 void fitText(const QString&, int newWidth);
00075 void setText(const QString&);
00076 signals:
00080 void clicked(KMdiChildView*);
00084 void leftMouseButtonClicked(KMdiChildView*);
00088 void rightMouseButtonClicked(KMdiChildView*);
00092 void buttonTextChanged(int);
00093 public slots:
00097 void setNewText(const QString&);
00098 protected slots:
00102 void mousePressEvent( QMouseEvent*);
00103
00104
00105 public:
00109 KMdiChildView *m_pWindow;
00110 protected:
00114 QString m_actualText;
00115
00116 private:
00117 KMdiTaskBarButtonPrivate *d;
00118 };
00119
00120
00121 class KMdiTaskBarPrivate;
00129 class KMDI_EXPORT KMdiTaskBar : public KToolBar
00130 {
00131 Q_OBJECT
00132 public:
00136 KMdiTaskBar(KMdiMainFrm *parent,QMainWindow::ToolBarDock dock);
00140 ~KMdiTaskBar();
00146 KMdiTaskBarButton * addWinButton(KMdiChildView *win_ptr);
00151 void removeWinButton(KMdiChildView *win_ptr, bool haveToLayoutTaskBar = true);
00156 KMdiTaskBarButton * getNextWindowButton(bool bRight,KMdiChildView *win_ptr);
00160 KMdiTaskBarButton * getButton(KMdiChildView *win_ptr);
00164 void switchOn(bool bOn);
00168 bool isSwitchedOn() const { return m_bSwitchedOn; };
00169 protected:
00173 void resizeEvent( QResizeEvent*);
00174 protected slots:
00182 void layoutTaskBar( int taskBarWidth = 0);
00183 public slots:
00188 void setActiveButton(KMdiChildView *win_ptr);
00189 protected:
00194 QPtrList<KMdiTaskBarButton>* m_pButtonList;
00198 KMdiMainFrm* m_pFrm;
00202 KMdiChildView* m_pCurrentFocusedWindow;
00206 QLabel* m_pStretchSpace;
00207 bool m_layoutIsPending;
00208 bool m_bSwitchedOn;
00209
00210 private:
00211 KMdiTaskBarPrivate *d;
00212 };
00213
00214 #endif //_KMDITASKBAR_H_
This file is part of the documentation for kmdi Library Version 3.3.90.