• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KWin

tabbox.h

Go to the documentation of this file.
00001 /********************************************************************
00002  KWin - the KDE window manager
00003  This file is part of the KDE project.
00004 
00005 Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
00006 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
00007 
00008 This program is free software; you can redistribute it and/or modify
00009 it under the terms of the GNU General Public License as published by
00010 the Free Software Foundation; either version 2 of the License, or
00011 (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020 *********************************************************************/
00021 
00022 #ifndef KWIN_TABBOX_H
00023 #define KWIN_TABBOX_H
00024 
00025 #include <QFrame>
00026 #include <QTimer>
00027 #include "utils.h"
00028 
00029 
00030 namespace KWin
00031 {
00032 
00033 class Workspace;
00034 class Client;
00035 
00036 class TabBox : public QFrame
00037     {
00038     Q_OBJECT
00039     public:
00040         TabBox( Workspace *ws );
00041         ~TabBox();
00042 
00043         Client* currentClient();
00044         ClientList currentClientList();
00045         int currentDesktop();
00046         QList< int > currentDesktopList();
00047 
00048         void setCurrentClient( Client* newClient );
00049         void setCurrentDesktop( int newDesktop );
00050 
00051         enum SortOrder { StaticOrder, MostRecentlyUsedOrder };
00052         void setMode( TabBoxMode mode );
00053         TabBoxMode mode() const;
00054 
00055         void reset( bool partial_reset = false );
00056         void nextPrev( bool next = true);
00057 
00058         void delayedShow();
00059         void hide();
00060 
00061         void refDisplay();
00062         void unrefDisplay();
00063         bool isDisplayed() const;
00064 
00065         void handleMouseEvent( XEvent* );
00066 
00067         Workspace* workspace() const;
00068 
00069         void reconfigure();
00070 
00071     public slots:
00072         void show();
00073 
00074     protected:
00075         void showEvent( QShowEvent* );
00076         void hideEvent( QHideEvent* );
00077         void paintEvent( QPaintEvent* );
00078 
00079     private:
00080         void createClientList(ClientList &list, int desktop /*-1 = all*/, Client *start, bool chain);
00081         void createDesktopList(QList< int > &list, int start, SortOrder order);
00082 
00083     private:
00084         Workspace* wspace;
00085         TabBoxMode m;
00086         ClientList clients;
00087         Client* client;
00088         QList< int > desktops;
00089         int desk;
00090 
00091         QTimer delayedShowTimer;
00092         int display_refcount;
00093         QString no_tasks;
00094         int lineHeight;
00095         bool showMiniIcon;
00096         bool options_traverse_all;
00097     };
00098 
00099 
00103 inline Workspace* TabBox::workspace() const
00104     {
00105     return wspace;
00106     }
00107 
00113 inline TabBoxMode TabBox::mode() const
00114     {
00115     return m;
00116     }
00117 
00123 inline void TabBox::refDisplay()
00124     {
00125     ++display_refcount;
00126     }
00127 
00134 inline bool TabBox::isDisplayed() const
00135     {
00136     return display_refcount > 0;
00137     }
00138 
00139 } // namespace
00140 
00141 #endif

KWin

Skip menu "KWin"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal