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 | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /kwin/tabbox.h | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.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/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin/tabbox.h')
-rw-r--r-- | kwin/tabbox.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/kwin/tabbox.h b/kwin/tabbox.h new file mode 100644 index 000000000..b2d8e4bc0 --- /dev/null +++ b/kwin/tabbox.h @@ -0,0 +1,102 @@ +/***************************************************************** + KWin - the KDE window manager + This file is part of the KDE project. + +Copyright (C) 1999, 2000 Matthias Ettrich <[email protected]> +Copyright (C) 2003 Lubos Lunak <[email protected]> + +You can Freely distribute this program under the GNU General Public +License. See the file "COPYING" for the exact licensing terms. +******************************************************************/ + +#ifndef KWIN_TABBOX_H +#define KWIN_TABBOX_H + +#include <qframe.h> +#include <qtimer.h> +#include <qvaluelist.h> +#include "utils.h" + +class QLabel; + +namespace KWinInternal +{ + +class Workspace; +class Client; + +class TabBox : public QFrame + { + Q_OBJECT + public: + TabBox( Workspace *ws, const char *name=0 ); + ~TabBox(); + + Client* currentClient(); + void setCurrentClient( Client* c ); + int currentDesktop(); + + // DesktopMode and WindowsMode are based on the order in which the desktop + // or window were viewed. + // DesktopListMode lists them in the order created. + enum Mode { DesktopMode, DesktopListMode, WindowsMode }; + void setMode( Mode mode ); + Mode mode() const; + + void reset(); + void nextPrev( bool next = TRUE); + + void delayedShow(); + void hide(); + + void handleMouseEvent( XEvent* ); + + Workspace* workspace() const; + + void reconfigure(); + + protected: + void showEvent( QShowEvent* ); + void hideEvent( QHideEvent* ); + void drawContents( QPainter * ); + + private: + void createClientList(ClientList &list, int desktop /*-1 = all*/, Client *start, bool chain); + void updateOutline(); + + private: + Client* current_client; + Mode m; + Workspace* wspace; + ClientList clients; + int desk; + int lineHeight; + bool showMiniIcon; + QTimer delayedShowTimer; + QString no_tasks; + bool options_traverse_all; + Window outline_left, outline_right, outline_top, outline_bottom; + }; + + +/*! + Returns the tab box' workspace + */ +inline Workspace* TabBox::workspace() const + { + return wspace; + } + +/*! + Returns the current mode, either DesktopListMode or WindowsMode + + \sa setMode() + */ +inline TabBox::Mode TabBox::mode() const + { + return m; + } + +} // namespace + +#endif |