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

void Kanagram::resizeEvent ( QResizeEvent *   ) [private]

called whenever the window is resized update all svg elements calculated positions based on the new window size

Definition at line 449 of file kanagram.cpp.

References m_inputBox, m_nextRect, and m_xRatio.

{
    m_xRatio = width() / kWindowWidth;
    m_yRatio = height() / kWindowHeight;

    m_blackboardRect = QRect(int(63.657 * m_xRatio), int(182.397 * m_yRatio), int(563.273 * m_xRatio), int(380.735 * m_yRatio));
    m_inputBox->setGeometry(QRect(int(80 * m_xRatio), int(657.272 * m_yRatio), int(420 * m_xRatio), int(44.639 * m_yRatio)));

    m_upRect = QRect(int(m_inputBox->x() + m_inputBox->width() + 20 * m_xRatio), m_inputBox->y(), int(50 * m_xRatio), m_inputBox->height());
    m_arrowRect = QRect(m_switcherRect.right() + 5, m_switcherRect.top(), int(16.250 * m_xRatio), int(25.0 * m_yRatio));
    m_logoRect = QRect(int(112.188 * m_xRatio), int(32.375 * m_yRatio), int(466.981 * m_xRatio), int(91.407 * m_yRatio));

    m_aboutAppRect = QRect(int(xTranslateButtons * width()), int(yTranslateHelpButton * height()),
            int(xScale57Buttons * width()), int(yScale57Buttons * height()));
    m_aboutKDERect = QRect(int(867 * m_xRatio), int(335.352 * m_yRatio),
            int(xScale57Buttons * width()), int(yScale57Buttons * height()));
    m_handbookRect = QRect(int(753 * m_xRatio), int(335.352 * m_yRatio),
            int(xScale57Buttons * width()), int(yScale57Buttons * height()));

    m_nextRect = QRect(int(735.448 * m_xRatio), int(49.028 * m_yRatio), int(206.142 * m_xRatio), int(117.537 * m_yRatio));
    m_configRect = QRect(int(735.448 * m_xRatio), int(188.264 * m_yRatio), int(206.142 * m_xRatio), int(117.537 * m_yRatio));
    m_helpRect = QRect(int(735.448 * m_xRatio), int(327.5 * m_yRatio), int(206.142 * m_xRatio), int(117.537 * m_yRatio));
    m_quitRect = QRect(int(697.549 * m_xRatio), int(542.337 * m_yRatio), int(279.935 * m_xRatio), int(160.68 * m_yRatio));

    update();
}

Generated by  Doxygen 1.6.0   Back to index