API Documentation
Loading...
Searching...
No Matches
MouseEditorWidget.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Widgets
28File: MouseEditorWidget
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#if NDEVR_VIEWPORT
35#include <NDEVR/MouseController.h>
36#include <NDEVR/Pointer.h>
37#include <QWidget>
38#include <QPixmap>
39namespace Ui
40{
41 class MouseSetupEditor;
42}
43namespace NDEVR
44{
45 class MouseController;
46 /**--------------------------------------------------------------------------------------------------
47 \brief Allows the end user to set default mouse buttons and behavior for navigating in a Viewport.
48 **/
49 class DESIGN_WIDGETS_API MouseEditorWidget : public QWidget
50 {
51 Q_OBJECT
52 public:
53 MouseEditorWidget(QWidget* parent = nullptr);
54 ~MouseEditorWidget();
55 void setMouseController(const DynamicPointer<MouseController>& controller);
56 void resizeEvent(QResizeEvent *resize_event) override;
57 signals:
58 void edited();
59 protected slots:
60 void updateFromDialog();
61 void updateFromController();
62 protected:
63 void setBackgroundImage(const String& image);
64 protected:
65 QPixmap m_background;
66 String m_background_resource;
67 DynamicPointer<MouseController> m_mouse_controller;
68 Ui::MouseSetupEditor* ui;
69 };
70}
71#endif
#define DESIGN_WIDGETS_API
Definition DLLInfo.h:56
Definition ACIColor.h:37
Definition FontEditor.h:6