taskswitcherapp/tsserviceplugin/src/tspresentation.cpp
changeset 36 cdae8c6c3876
parent 35 f9ce957a272c
equal deleted inserted replaced
35:f9ce957a272c 36:cdae8c6c3876
    24 #include "tstasksgriditem.h"
    24 #include "tstasksgriditem.h"
    25 #include "tstaskpopuphandler.h"
    25 #include "tstaskpopuphandler.h"
    26 
    26 
    27 // FIXME: workaround for Orbit bug: not moving to foreground after QWidget::activateWindow();
    27 // FIXME: workaround for Orbit bug: not moving to foreground after QWidget::activateWindow();
    28 #ifdef Q_OS_SYMBIAN
    28 #ifdef Q_OS_SYMBIAN
    29 #include <APGTASK.H>
    29 #include <apgtask.h>
    30 #include <eikenv.h>
    30 #include <eikenv.h>
    31 #endif    
    31 #endif    
    32 
    32 
       
    33 /*!
       
    34     \class TsPresentation
       
    35     \ingroup group_tsserviceplugin
       
    36     \brief Class providing UI for presenting TS data.
       
    37 */
    33 TsPresentation::TsPresentation(QObject *parent) : TsPresentationInterface(parent), mDialog(NULL), mGrid(NULL)
    38 TsPresentation::TsPresentation(QObject *parent) : TsPresentationInterface(parent), mDialog(NULL), mGrid(NULL)
    34 {
    39 {
    35     HbMainWindow *mainWindow = HbInstance::instance()->allMainWindows().first();
    40     HbMainWindow *mainWindow = HbInstance::instance()->allMainWindows().first();
    36 
    41 
    37     // load layout from XML
    42     // load layout from XML
    90     
    95     
    91 #ifdef Q_OS_SYMBIAN
    96 #ifdef Q_OS_SYMBIAN
    92     // FIXME: workaround for Orbit bug: not moving to foreground after QWidget::activateWindow();
    97     // FIXME: workaround for Orbit bug: not moving to foreground after QWidget::activateWindow();
    93     TApaTaskList taskList(CEikonEnv::Static()->WsSession());
    98     TApaTaskList taskList(CEikonEnv::Static()->WsSession());
    94     TApaTask task = taskList.FindApp(RProcess().Type()[2]);
    99     TApaTask task = taskList.FindApp(RProcess().Type()[2]);
    95     if (task.Exists()) {
   100     Q_ASSERT_X(task.Exists(), "Bringing task switcher to foreground", "Application couldn't find task with its own UID");
    96         task.BringToForeground();
   101     task.BringToForeground();
    97     } else {
   102 #endif
    98         qWarning("Can't bring TaskSwitcher to foreground: task not found");
       
    99     }    
       
   100 #endif    
       
   101    
   103    
   102     mDialog->show();
   104     mDialog->show();
   103 }
   105 }
   104 
   106 
   105 void TsPresentation::loadOrientationSpecificLayoutData(Qt::Orientation orientation)
   107 void TsPresentation::loadOrientationSpecificLayoutData(Qt::Orientation orientation)