equal
deleted
inserted
replaced
2141 qt_mac_dblclick.last_button = button; |
2141 qt_mac_dblclick.last_button = button; |
2142 qt_mac_dblclick.last_time = GetEventTime(event); |
2142 qt_mac_dblclick.last_time = GetEventTime(event); |
2143 } |
2143 } |
2144 |
2144 |
2145 if (wheel_deltaX || wheel_deltaY) { |
2145 if (wheel_deltaX || wheel_deltaY) { |
|
2146 #ifndef QT_NO_WHEELEVENT |
2146 if (wheel_deltaX) { |
2147 if (wheel_deltaX) { |
2147 QWheelEvent qwe(plocal, p, wheel_deltaX, buttons, modifiers, Qt::Horizontal); |
2148 QWheelEvent qwe(plocal, p, wheel_deltaX, buttons, modifiers, Qt::Horizontal); |
2148 QApplication::sendSpontaneousEvent(widget, &qwe); |
2149 QApplication::sendSpontaneousEvent(widget, &qwe); |
2149 if (!qwe.isAccepted() && QApplicationPrivate::focus_widget && QApplicationPrivate::focus_widget != widget) { |
2150 if (!qwe.isAccepted() && QApplicationPrivate::focus_widget && QApplicationPrivate::focus_widget != widget) { |
2150 QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(p), p, |
2151 QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(p), p, |
2163 QApplication::sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2); |
2164 QApplication::sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2); |
2164 if (!qwe2.isAccepted()) |
2165 if (!qwe2.isAccepted()) |
2165 handled_event = false; |
2166 handled_event = false; |
2166 } |
2167 } |
2167 } |
2168 } |
|
2169 #endif // QT_NO_WHEELEVENT |
2168 } else { |
2170 } else { |
2169 #ifdef QMAC_SPEAK_TO_ME |
2171 #ifdef QMAC_SPEAK_TO_ME |
2170 const int speak_keys = Qt::AltModifier | Qt::ShiftModifier; |
2172 const int speak_keys = Qt::AltModifier | Qt::ShiftModifier; |
2171 if(etype == QMouseEvent::MouseButtonDblClick && ((modifiers & speak_keys) == speak_keys)) { |
2173 if(etype == QMouseEvent::MouseButtonDblClick && ((modifiers & speak_keys) == speak_keys)) { |
2172 QVariant v = widget->property("displayText"); |
2174 QVariant v = widget->property("displayText"); |
2715 { |
2717 { |
2716 // FIXME: get from the system |
2718 // FIXME: get from the system |
2717 return QApplicationPrivate::keyboard_input_time; |
2719 return QApplicationPrivate::keyboard_input_time; |
2718 } |
2720 } |
2719 |
2721 |
|
2722 #ifndef QT_NO_WHEELEVENT |
2720 void QApplication::setWheelScrollLines(int n) |
2723 void QApplication::setWheelScrollLines(int n) |
2721 { |
2724 { |
2722 QApplicationPrivate::wheel_scroll_lines = n; |
2725 QApplicationPrivate::wheel_scroll_lines = n; |
2723 } |
2726 } |
2724 |
2727 |
2725 int QApplication::wheelScrollLines() |
2728 int QApplication::wheelScrollLines() |
2726 { |
2729 { |
2727 return QApplicationPrivate::wheel_scroll_lines; |
2730 return QApplicationPrivate::wheel_scroll_lines; |
2728 } |
2731 } |
|
2732 #endif |
2729 |
2733 |
2730 void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable) |
2734 void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable) |
2731 { |
2735 { |
2732 switch (effect) { |
2736 switch (effect) { |
2733 case Qt::UI_FadeMenu: |
2737 case Qt::UI_FadeMenu: |
2886 |
2890 |
2887 num = settings.value(QLatin1String("cursorFlashTime"), |
2891 num = settings.value(QLatin1String("cursorFlashTime"), |
2888 QApplication::cursorFlashTime()).toInt(); |
2892 QApplication::cursorFlashTime()).toInt(); |
2889 QApplication::setCursorFlashTime(num); |
2893 QApplication::setCursorFlashTime(num); |
2890 |
2894 |
|
2895 #ifndef QT_NO_WHEELEVENT |
2891 num = settings.value(QLatin1String("wheelScrollLines"), |
2896 num = settings.value(QLatin1String("wheelScrollLines"), |
2892 QApplication::wheelScrollLines()).toInt(); |
2897 QApplication::wheelScrollLines()).toInt(); |
2893 QApplication::setWheelScrollLines(num); |
2898 QApplication::setWheelScrollLines(num); |
|
2899 #endif |
2894 |
2900 |
2895 QString colorspec = settings.value(QLatin1String("colorSpec"), |
2901 QString colorspec = settings.value(QLatin1String("colorSpec"), |
2896 QVariant(QLatin1String("default"))).toString(); |
2902 QVariant(QLatin1String("default"))).toString(); |
2897 if (colorspec == QLatin1String("normal")) |
2903 if (colorspec == QLatin1String("normal")) |
2898 QApplication::setColorSpec(QApplication::NormalColor); |
2904 QApplication::setColorSpec(QApplication::NormalColor); |