Exemplo n.º 1
0
void RazorTaskButton::btnClicked(bool checked)
{
    if (checked)
        minimizeApplication();
    else
        raiseApplication();
}
Exemplo n.º 2
0
void LXQtTaskButton::mouseReleaseEvent(QMouseEvent* event)
{
    if (event->button() == Qt::LeftButton)
    {
        if (isChecked())
            minimizeApplication();
        else
            raiseApplication();
    }
    QToolButton::mouseReleaseEvent(event);
}
Exemplo n.º 3
0
void RazorTaskButton::mousePressEvent(QMouseEvent *event)
{
    if (event->button() == Qt::LeftButton)
    {
        if (this->isChecked())
        {
            minimizeApplication();
        }
        else
        {
            raiseApplication();
        }
    }
    else if (mCloseOnMiddleClick && event->button() == Qt::MidButton)
    {
        closeApplication();
    }
}
Exemplo n.º 4
0
    QObject::connect(&filter, SIGNAL(rotationChanged(const QVariant&)),
                     rootObject, SLOT(handleRotation(const QVariant&)));

    QObject::connect(&settings, SIGNAL(correctionAngle(const QVariant&)),
                     rootObject, SLOT(setCorrectionAngle(const QVariant&)));

    QObject::connect((QObject*)view.engine(), SIGNAL(quit()),
                     &app, SLOT(quit()));
    //! [2]

    //! [3]
#ifdef Q_WS_MAEMO_5
    TaskSwitcher taskSwitcher;

    QObject::connect(rootObject, SIGNAL(minimizeApplication()),
                     &taskSwitcher, SLOT(minimizeApplication()));

    // Show the task switcher button
    rootObject->setProperty("taskSwitcherVisible", true);
#endif
    //! [3]

    //! [4]
    // Read correction factor from permanent storage and emit it to QML side
    settings.loadAndEmitCorrectionAngle();

    // Begin measuring of the accelerometer sensor
    sensor.start();
    //! [4]