Home · All Namespaces · All Classes |
00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of mhome. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 00020 #ifndef SWITCHERBUTTON_H 00021 #define SWITCHERBUTTON_H 00022 00023 #include <QTimer> 00024 #include <MButton> 00025 #include "switcherbuttonmodel.h" 00026 #include "windowinfo.h" 00027 #include <X11/Xlib.h> 00028 00032 class SwitcherButton : public MButton 00033 { 00034 Q_OBJECT 00035 M_CONTROLLER(SwitcherButton) 00036 00037 00038 Q_PROPERTY(ulong xWindow READ xWindow) 00039 00040 public: 00047 SwitcherButton(QGraphicsItem *parent = NULL, SwitcherButtonModel *model = new SwitcherButtonModel); 00048 00052 virtual ~SwitcherButton(); 00053 00057 Window xWindow(); 00058 00064 void setXWindow(Window window); 00065 00070 virtual void prepareGeometryChange(); 00072 00074 void setVisibleInSwitcherProperty(bool set); 00075 00076 signals: 00080 void windowToFront(Window window); 00081 00085 void closeWindow(Window window); 00086 00090 void closeAllWindows(); 00091 00095 void closeTimedOutForWindow(Window window); 00096 00097 public slots: 00101 void switchToWindow(); 00102 00106 void close(); 00107 00111 virtual void resetState(); 00112 00116 void setVisibilityPropertyEnabled(bool enable); 00117 00118 protected: 00119 00124 virtual void enterDisplayEvent(); 00125 00130 virtual void exitDisplayEvent(); 00131 00132 private: 00133 00135 void setX11VisiblityProperty(bool set); 00136 00138 QTimer windowCloseTimer; 00139 00141 static Atom visibleAtom; 00142 00144 bool visibility; 00145 00147 bool visibilityPropertyEnabled; 00148 00150 bool visibilityInitialized; 00151 }; 00152 00153 #endif // SWITCHERBUTTON_H
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |