2000-03-24 22:23:02 +00:00
|
|
|
/*****************************************************************
|
|
|
|
kwin - the KDE window manager
|
|
|
|
|
|
|
|
Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
|
|
|
******************************************************************/
|
2002-07-26 20:30:36 +00:00
|
|
|
#ifndef KWIN_TABBOX_H
|
|
|
|
#define KWIN_TABBOX_H
|
1999-08-19 23:26:42 +00:00
|
|
|
#include <qwidget.h>
|
2000-05-14 01:58:13 +00:00
|
|
|
#include <qtimer.h>
|
2001-08-18 23:06:16 +00:00
|
|
|
#include <qvaluelist.h>
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2001-02-20 01:20:38 +00:00
|
|
|
class QLabel;
|
|
|
|
|
|
|
|
namespace KWinInternal {
|
|
|
|
|
1999-08-19 23:26:42 +00:00
|
|
|
class Workspace;
|
|
|
|
class Client;
|
|
|
|
typedef QValueList<Client*> ClientList;
|
|
|
|
|
|
|
|
class TabBox : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
TabBox( Workspace *ws, const char *name=0 );
|
|
|
|
~TabBox();
|
|
|
|
|
|
|
|
Client* currentClient();
|
|
|
|
int currentDesktop();
|
|
|
|
|
2001-06-10 04:10:42 +00:00
|
|
|
// 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 };
|
1999-08-19 23:26:42 +00:00
|
|
|
void setMode( Mode mode );
|
|
|
|
Mode mode() const;
|
|
|
|
|
|
|
|
void reset();
|
|
|
|
void nextPrev( bool next = TRUE);
|
|
|
|
|
2000-05-14 01:58:13 +00:00
|
|
|
void delayedShow();
|
|
|
|
void hide();
|
|
|
|
|
1999-08-19 23:26:42 +00:00
|
|
|
Workspace* workspace() const;
|
2001-06-10 04:10:42 +00:00
|
|
|
|
2001-03-19 20:05:36 +00:00
|
|
|
void reconfigure();
|
1999-08-19 23:26:42 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void paintEvent( QPaintEvent* );
|
|
|
|
void showEvent( QShowEvent* );
|
1999-11-26 22:10:25 +00:00
|
|
|
void hideEvent( QHideEvent* );
|
1999-08-19 23:26:42 +00:00
|
|
|
void paintContents();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Client* client;
|
|
|
|
Mode m;
|
|
|
|
Workspace* wspace;
|
|
|
|
ClientList clients;
|
|
|
|
int desk;
|
1999-11-26 22:10:25 +00:00
|
|
|
QLabel* icon;
|
|
|
|
int wmax;
|
2000-05-14 01:58:13 +00:00
|
|
|
QTimer delayedShowTimer;
|
2000-06-01 05:32:06 +00:00
|
|
|
QString no_tasks;
|
2001-03-19 20:05:36 +00:00
|
|
|
bool options_traverse_all;
|
1999-08-19 23:26:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Returns the tab box' workspace
|
|
|
|
*/
|
|
|
|
inline Workspace* TabBox::workspace() const
|
|
|
|
{
|
|
|
|
return wspace;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
2001-06-10 04:10:42 +00:00
|
|
|
Returns the current mode, either DesktopListMode or WindowsMode
|
1999-08-19 23:26:42 +00:00
|
|
|
|
|
|
|
\sa setMode()
|
|
|
|
*/
|
|
|
|
inline TabBox::Mode TabBox::mode() const
|
|
|
|
{
|
|
|
|
return m;
|
|
|
|
}
|
|
|
|
|
2003-07-26 10:41:28 +00:00
|
|
|
}
|
2001-02-20 01:20:38 +00:00
|
|
|
|
1999-08-19 23:26:42 +00:00
|
|
|
#endif
|