1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef MOUSEWHEEL_INPUT_H
16 #define MOUSEWHEEL_INPUT_H
17 
18 #include <QMouseEvent>
19 #include "config.h"
20 #include "dock/rotate_input_device.h"
21 
22 namespace OHOS {
23 #if defined(USE_MOUSEWHEEL) && USE_MOUSEWHEEL
24 #if ENABLE_ROTATE_INPUT
25 class MousewheelInput : public RotateInputDevice {
26 public:
MousewheelInput()27     MousewheelInput() {}
~MousewheelInput()28     virtual ~MousewheelInput() {}
29     static MousewheelInput* GetInstance();
30     bool Read(DeviceData& data) override;
31     void MousewheelHandler(QWheelEvent* event);
32 };
33 #endif // USE_MOUSEWHEEL
34 #endif
35 } // namespace OHOS
36 #endif // MOUSEWHEEL_INPUT_H
37