示例#1
0
BbGuiHelper::BbGuiHelper(QObject *parent)
    : QObject(parent),
      m_currentOrientation(0),
      m_applicationActive(true)
{
    readApplicationActiveState();
    readOrientation();

    QCoreApplication::eventDispatcher()->installNativeEventFilter(this);
}
示例#2
0
BbGuiHelper::BbGuiHelper(QObject *parent)
    : QObject(parent),
      m_currentOrientation(0),
      m_applicationActive(true)
{
    Q_ASSERT(!s_guiHelper);
    Q_ASSERT(s_previousEventFilter == 0);
    s_guiHelper = this;

    readApplicationActiveState();
    readOrientation();

    s_previousEventFilter = QAbstractEventDispatcher::instance()->setEventFilter(s_eventFilter);
}