Logo Search packages:      
Sourcecode: kanagram version File versions  Download package

void Kanagram::mousePressEvent ( QMouseEvent *  e ) [private]

called whenever a mouse click occurs checks the mouse position against svg element positions and reacts accordingly

Definition at line 620 of file kanagram.cpp.

References checkWord(), hideHint(), m_helpMenu, m_inputBox, m_nextRect, slotNextAnagram(), slotNextVocabulary(), slotPrevVocabulary(), slotRevealWord(), slotShowSettings(), and slotToggleHint().

{
    if (m_nextRect.contains(e->pos()))
    {
        slotNextAnagram();
    }

    if (m_configRect.contains(e->pos()))
    {
        slotShowSettings();
    }

    if (m_quitRect.contains(e->pos()))
    {
        close();
    }

    if (m_revealRect.contains(e->pos()))
    {
        slotRevealWord();
    }

    if (m_logoRect.contains(e->pos()))
    {
        m_helpMenu->aboutApplication();
    }

    if (!m_showHint && m_overHelp)
    {
        if (m_handbookRect.contains(e->pos()))
        {
            m_helpMenu->appHelpActivated();
        }

        if (m_aboutKDERect.contains(e->pos()))
        {
            m_helpMenu->aboutKDE();
        }

        if (m_aboutAppRect.contains(e->pos()))
        {
            m_helpMenu->aboutApplication();
        }
    }

    if (m_hintBoxRect.contains(e->pos()))
    {
        hideHint();
    }

    if (m_switcherRect.contains(e->pos()) || m_arrowRect.contains(e->pos()))
    {
        if (!(e->button() == Qt::RightButton))
        {
            slotNextVocabulary();
        }
        else
        {
            slotPrevVocabulary();
        }
    }

    if (m_hintRect.contains(e->pos()))
    {
        slotToggleHint();
    }

    if (m_upRect.contains(e->pos()) && !m_inputBox->text().isEmpty())
    {
        checkWord();
    }
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index