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 MAINWINDOW_H 00021 #define MAINWINDOW_H 00022 00023 #include <MWindow> 00024 #include <X11/Xdefs.h> 00025 00026 class Home; 00027 class MScene; 00028 class MSceneManager; 00029 class QGLContext; 00030 00034 class MainWindow : public MWindow 00035 { 00036 Q_OBJECT 00037 00038 public: 00042 ~MainWindow(); 00043 00051 static MainWindow *instance(bool create = false); 00052 00058 static QGLContext *glContext(); 00059 00061 virtual void keyPressEvent(QKeyEvent *event); 00062 virtual void closeEvent(QCloseEvent *event); 00064 00065 private slots: 00067 void markKeyPressesSentAndSendRemainingKeyPresses(); 00068 00070 void markKeyPressesNotSent(); 00071 00072 private: 00078 MainWindow(QWidget *parent = NULL); 00079 00084 void excludeFromTaskBar(); 00085 00087 void applyStyle(); 00088 00096 void changeNetWmState(bool set, Atom one, Atom two = 0); 00097 00104 static bool isCallUILaunchingKey(int key); 00105 00116 void setupExternalService(const QString &service, const QString &path, const QString &interface, const QString &method); 00117 00123 void sendKeyPresses(); 00124 00126 static const QString CONTENT_SEARCH_DBUS_SERVICE; 00128 static const QString CONTENT_SEARCH_DBUS_PATH; 00130 static const QString CONTENT_SEARCH_DBUS_INTERFACE; 00132 static const QString CONTENT_SEARCH_DBUS_METHOD; 00133 00135 static const QString CALL_UI_DBUS_SERVICE; 00137 static const QString CALL_UI_DBUS_PATH; 00139 static const QString CALL_UI_DBUS_INTERFACE; 00141 static const QString CALL_UI_DBUS_METHOD; 00142 00144 static MainWindow *mainWindowInstance; 00145 00147 static QGLContext *openGLContext; 00148 00150 Home *home; 00151 00153 const QString *externalServiceService; 00155 const QString *externalServicePath; 00157 const QString *externalServiceInterface; 00159 const QString *externalServiceMethod; 00160 00162 QString keyPressesToBeSent; 00163 00165 QString keyPressesBeingSent; 00166 00167 #ifdef UNIT_TEST 00168 friend class Ut_MainWindow; 00169 #endif 00170 }; 00171 00172 #endif // MAINWINDOW_H
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |