kmdi Library API Documentation

kmditaskbar.h

00001 //---------------------------------------------------------------------------- 00002 // filename : kmditaskbar.h 00003 //---------------------------------------------------------------------------- 00004 // Project : KDE MDI extension 00005 // 00006 // begin : 07/1999 by Szymon Stefanek as part of kvirc 00007 // (an IRC application) 00008 // changes : 09/1999 by Falk Brettschneider to create an 00009 // - 06/2000 stand-alone Qt extension set of 00010 // classes and a Qt-based library 00011 // 2000-2003 maintained by the KDevelop project 00012 // 00013 // copyright : (C) 1999-2003 by Falk Brettschneider 00014 // and 00015 // Szymon Stefanek (stefanek@tin.it) 00016 // email : falkbr@kdevelop.org (Falk Brettschneider) 00017 //---------------------------------------------------------------------------- 00018 // 00019 //---------------------------------------------------------------------------- 00020 // 00021 // This program is free software; you can redistribute it and/or modify 00022 // it under the terms of the GNU Library General Public License as 00023 // published by the Free Software Foundation; either version 2 of the 00024 // License, or (at your option) any later version. 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 KMdiTaskBarButton : public QPushButton 00052 { 00053 Q_OBJECT 00054 // methods 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 // attributes 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 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_
KDE Logo
This file is part of the documentation for kmdi Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 8 11:15:51 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003