Changeset View
Changeset View
Standalone View
Standalone View
libinput/device.h
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Line(s) | 42 | { | |||
---|---|---|---|---|---|
120 | Q_PROPERTY(bool scrollEdge READ isScrollEdge WRITE setScrollEdge NOTIFY scrollMethodChanged) | 120 | Q_PROPERTY(bool scrollEdge READ isScrollEdge WRITE setScrollEdge NOTIFY scrollMethodChanged) | ||
121 | 121 | | |||
122 | Q_PROPERTY(bool supportsScrollOnButtonDown READ supportsScrollOnButtonDown CONSTANT) | 122 | Q_PROPERTY(bool supportsScrollOnButtonDown READ supportsScrollOnButtonDown CONSTANT) | ||
123 | Q_PROPERTY(bool scrollOnButtonDownEnabledByDefault READ scrollOnButtonDownEnabledByDefault CONSTANT) | 123 | Q_PROPERTY(bool scrollOnButtonDownEnabledByDefault READ scrollOnButtonDownEnabledByDefault CONSTANT) | ||
124 | Q_PROPERTY(quint32 defaultScrollButton READ defaultScrollButton CONSTANT) | 124 | Q_PROPERTY(quint32 defaultScrollButton READ defaultScrollButton CONSTANT) | ||
125 | Q_PROPERTY(bool scrollOnButtonDown READ isScrollOnButtonDown WRITE setScrollOnButtonDown NOTIFY scrollMethodChanged) | 125 | Q_PROPERTY(bool scrollOnButtonDown READ isScrollOnButtonDown WRITE setScrollOnButtonDown NOTIFY scrollMethodChanged) | ||
126 | Q_PROPERTY(quint32 scrollButton READ scrollButton WRITE setScrollButton NOTIFY scrollButtonChanged) | 126 | Q_PROPERTY(quint32 scrollButton READ scrollButton WRITE setScrollButton NOTIFY scrollButtonChanged) | ||
127 | 127 | | |||
128 | Q_PROPERTY(qreal scrollFactor READ scrollFactor WRITE setScrollFactor NOTIFY scrollFactorChanged) | ||||
129 | | ||||
128 | // switches | 130 | // switches | ||
129 | Q_PROPERTY(bool switchDevice READ isSwitch CONSTANT) | 131 | Q_PROPERTY(bool switchDevice READ isSwitch CONSTANT) | ||
130 | Q_PROPERTY(bool lidSwitch READ isLidSwitch CONSTANT) | 132 | Q_PROPERTY(bool lidSwitch READ isLidSwitch CONSTANT) | ||
131 | Q_PROPERTY(bool tabletModeSwitch READ isTabletModeSwitch CONSTANT) | 133 | Q_PROPERTY(bool tabletModeSwitch READ isTabletModeSwitch CONSTANT) | ||
132 | 134 | | |||
133 | // Click Methods | 135 | // Click Methods | ||
134 | Q_PROPERTY(bool supportsClickMethodAreas READ supportsClickMethodAreas CONSTANT) | 136 | Q_PROPERTY(bool supportsClickMethodAreas READ supportsClickMethodAreas CONSTANT) | ||
135 | Q_PROPERTY(bool defaultClickMethodAreas READ defaultClickMethodAreas CONSTANT) | 137 | Q_PROPERTY(bool defaultClickMethodAreas READ defaultClickMethodAreas CONSTANT) | ||
▲ Show 20 Lines • Show All 189 Lines • ▼ Show 20 Line(s) | 144 | public: | |||
325 | void activateScrollMethodFromInt(quint32 method) { | 327 | void activateScrollMethodFromInt(quint32 method) { | ||
326 | setScrollMethod(true, (libinput_config_scroll_method) method); | 328 | setScrollMethod(true, (libinput_config_scroll_method) method); | ||
327 | } | 329 | } | ||
328 | quint32 scrollButton() const { | 330 | quint32 scrollButton() const { | ||
329 | return m_scrollButton; | 331 | return m_scrollButton; | ||
330 | } | 332 | } | ||
331 | void setScrollButton(quint32 button); | 333 | void setScrollButton(quint32 button); | ||
332 | 334 | | |||
335 | qreal scrollFactorDefault() const { | ||||
ervin: s/ScrollFactorDefault/scrollFactorDefault/ | |||||
336 | return 1.0; | ||||
337 | } | ||||
338 | qreal scrollFactor() const { | ||||
339 | return m_scrollFactor; | ||||
340 | } | ||||
341 | void setScrollFactor(qreal factor); | ||||
342 | | ||||
333 | void setDisableWhileTyping(bool set); | 343 | void setDisableWhileTyping(bool set); | ||
334 | bool isDisableWhileTyping() const { | 344 | bool isDisableWhileTyping() const { | ||
335 | return m_disableWhileTyping; | 345 | return m_disableWhileTyping; | ||
336 | } | 346 | } | ||
337 | bool isLeftHanded() const { | 347 | bool isLeftHanded() const { | ||
338 | return m_leftHanded; | 348 | return m_leftHanded; | ||
339 | } | 349 | } | ||
340 | /** | 350 | /** | ||
▲ Show 20 Lines • Show All 154 Lines • ▼ Show 20 Line(s) | 499 | Q_SIGNALS: | |||
495 | void enabledChanged(); | 505 | void enabledChanged(); | ||
496 | void tapToClickChanged(); | 506 | void tapToClickChanged(); | ||
497 | void tapAndDragChanged(); | 507 | void tapAndDragChanged(); | ||
498 | void tapDragLockChanged(); | 508 | void tapDragLockChanged(); | ||
499 | void middleEmulationChanged(); | 509 | void middleEmulationChanged(); | ||
500 | void naturalScrollChanged(); | 510 | void naturalScrollChanged(); | ||
501 | void scrollMethodChanged(); | 511 | void scrollMethodChanged(); | ||
502 | void scrollButtonChanged(); | 512 | void scrollButtonChanged(); | ||
513 | void scrollFactorChanged(); | ||||
503 | void clickMethodChanged(); | 514 | void clickMethodChanged(); | ||
504 | 515 | | |||
505 | private: | 516 | private: | ||
506 | template <typename T> | 517 | template <typename T> | ||
507 | void writeEntry(const ConfigKey &key, const T &value); | 518 | void writeEntry(const ConfigKey &key, const T &value); | ||
508 | template <typename T, typename Setter> | 519 | template <typename T, typename Setter> | ||
509 | void readEntry(const QByteArray &key, const Setter &s, const T &defaultValue = T()); | 520 | void readEntry(const QByteArray &key, const Setter &s, const T &defaultValue = T()); | ||
510 | libinput_device *m_device; | 521 | libinput_device *m_device; | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | |||||
554 | bool m_disableWhileTyping; | 565 | bool m_disableWhileTyping; | ||
555 | bool m_middleEmulation; | 566 | bool m_middleEmulation; | ||
556 | bool m_leftHanded; | 567 | bool m_leftHanded; | ||
557 | bool m_naturalScroll; | 568 | bool m_naturalScroll; | ||
558 | enum libinput_config_scroll_method m_scrollMethod; | 569 | enum libinput_config_scroll_method m_scrollMethod; | ||
559 | quint32 m_scrollButton; | 570 | quint32 m_scrollButton; | ||
560 | qreal m_defaultPointerAcceleration; | 571 | qreal m_defaultPointerAcceleration; | ||
561 | qreal m_pointerAcceleration; | 572 | qreal m_pointerAcceleration; | ||
573 | qreal m_scrollFactor; | ||||
562 | quint32 m_supportedPointerAccelerationProfiles; | 574 | quint32 m_supportedPointerAccelerationProfiles; | ||
563 | enum libinput_config_accel_profile m_defaultPointerAccelerationProfile; | 575 | enum libinput_config_accel_profile m_defaultPointerAccelerationProfile; | ||
564 | enum libinput_config_accel_profile m_pointerAccelerationProfile; | 576 | enum libinput_config_accel_profile m_pointerAccelerationProfile; | ||
565 | bool m_enabled; | 577 | bool m_enabled; | ||
566 | 578 | | |||
567 | KConfigGroup m_config; | 579 | KConfigGroup m_config; | ||
568 | bool m_loading = false; | 580 | bool m_loading = false; | ||
569 | 581 | | |||
Show All 16 Lines |
s/ScrollFactorDefault/scrollFactorDefault/