API Documentation
Loading...
Searching...
No Matches
Editor.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: NDEVR
28File: Editor
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/QTDesignObject.h>
35#include <NDEVR/Pointer.h>
36#include <NDEVR/Buffer.h>
37#include <QWidget>
38namespace NDEVR
39{
40 class Log;
41 class QTModelManager;
42 class DesignObjectDialog;
43 class InterfaceOrientationController;
44 /**--------------------------------------------------------------------------------------------------
45 \brief A base class for displaying options for editing a single DesignObject, typically a Model
46 **/
47 class NDEVR_API Editor : public QWidget
48 {
49 Q_OBJECT
50 public:
51 Editor(QWidget* parent = nullptr);
52 Editor(const DynamicPointer<QTDesignObject>& object, QWidget* parent = nullptr);
53 virtual void updateValues() = 0;
54 virtual bool fullscreenTouch() const;
55 virtual bool allowDocking() const;
57 virtual String customDialogIcon() const { return String(); };
59 virtual Buffer<QWidget*> printableWidgets() { return { this }; }
61 virtual Buffer<QWidget*> bottomOptions() { return {}; }
62#if NDEVR_VIEWPORT
63 virtual void moveTargetWithMouse();
64#endif
65 virtual void setTarget(const DynamicPointer<QTDesignObject>& object);
66 virtual void setHorizontal(bool horizontal);
67 virtual void requestScrollEnabled(bool enabled);
68 const DynamicPointer<QTDesignObject>& target() const { return m_design_object; };
70 virtual bool isBusy() const { return false; }
71 protected slots:
73 signals:
76 protected:
79 };
80}
#define NDEVR_API
Definition DLLInfo.h:50
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A popup dialog for showing options or information to the user for a particular DesignObject....
Definition DesignObjectDialog.h:75
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:320
A base class for displaying options for editing a single DesignObject, typically a Model.
Definition Editor.h:48
DynamicPointer< QTDesignObject > m_design_object
Definition Editor.h:78
void onDesignObjectUpdateSlot()
Editor(QWidget *parent=nullptr)
virtual Buffer< QWidget * > printableWidgetOptions()
Definition Editor.h:60
virtual void updateValues()=0
virtual bool fullscreenTouch() const
InterfaceOrientationController * m_orientation_controller
Definition Editor.h:77
Editor(const DynamicPointer< QTDesignObject > &object, QWidget *parent=nullptr)
virtual void setHorizontal(bool horizontal)
virtual bool allowDocking() const
virtual Buffer< QWidget * > bottomOptions()
Definition Editor.h:61
virtual void setTarget(const DynamicPointer< QTDesignObject > &object)
const DynamicPointer< QTDesignObject > & target() const
Definition Editor.h:68
virtual void requestScrollEnabled(bool enabled)
void objectUpdatedSignal()
virtual Buffer< QWidget * > printableWidgets()
Definition Editor.h:59
virtual String customDialogIcon() const
Definition Editor.h:57
void isBusyStatusChanged()
virtual bool isBusy() const
Definition Editor.h:70
virtual void setup(DesignObjectDialog *, const ShowPropertiesSettings &)
Definition Editor.h:69
virtual TranslatedString customDialogTitle() const
Definition Editor.h:56
virtual InterfaceOrientationController * orientationController() const
This class is responsible for notifying and providing default layout logic when the orientation of th...
Definition InterfaceOrientationController.h:27
The core String class for the NDEVR API.
Definition String.h:69
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
Definition ACIColor.h:37
Stores settings for setting up and displaying a DesignObjectDialog such as whether the dialog is part...
Definition ShowPropertySettings.h:25