1999-08-19 23:26:42 +00:00
|
|
|
#ifndef TABBOX_H
|
|
|
|
#define TABBOX_H
|
|
|
|
#include <qwidget.h>
|
|
|
|
|
|
|
|
class Workspace;
|
|
|
|
class Client;
|
1999-11-26 22:10:25 +00:00
|
|
|
class QLabel;
|
1999-08-19 23:26:42 +00:00
|
|
|
typedef QValueList<Client*> ClientList;
|
|
|
|
|
|
|
|
class TabBox : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
TabBox( Workspace *ws, const char *name=0 );
|
|
|
|
~TabBox();
|
|
|
|
|
|
|
|
Client* currentClient();
|
|
|
|
int currentDesktop();
|
|
|
|
|
|
|
|
enum Mode { DesktopMode, WindowsMode };
|
|
|
|
void setMode( Mode mode );
|
|
|
|
Mode mode() const;
|
|
|
|
|
|
|
|
void reset();
|
|
|
|
void nextPrev( bool next = TRUE);
|
|
|
|
|
|
|
|
Workspace* workspace() const;
|
|
|
|
|
|
|
|
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;
|
1999-08-19 23:26:42 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Returns the tab box' workspace
|
|
|
|
*/
|
|
|
|
inline Workspace* TabBox::workspace() const
|
|
|
|
{
|
|
|
|
return wspace;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Returns the current mode, either DesktopMode or WindowsMode
|
|
|
|
|
|
|
|
\sa setMode()
|
|
|
|
*/
|
|
|
|
inline TabBox::Mode TabBox::mode() const
|
|
|
|
{
|
|
|
|
return m;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|