API Documentation
Loading...
Searching...
No Matches
DockItem.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: DockItem
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/RibbonArea.h>
35
36#include <NDEVR/UUID.h>
37#include <NDEVR/TranslatedString.h>
38#include <QObject>
39#include <QIcon>
40#include <QPointer>
41namespace NDEVR
42{
43 class ContainerWidgetBase;
44 class SectionWidget;
45 class SectionContent;
46 class SectionIconTab;
47 class FloatingWidget;
48 class Button;
49
50 /**--------------------------------------------------------------------------------------------------
51 \brief The root class that allows iterface with the NDEVR API Widget Docking system.
52 **/
53 class NDEVR_WIDGETS_API DockItem : public QObject
54 {
55 public:
56 explicit DockItem(RibbonArea ribbon_area, ContainerWidgetBase* container = nullptr);
57 explicit DockItem(ContainerWidgetBase* container = nullptr);
58 virtual ~DockItem();
59
60 void setRibbonArea(RibbonArea ribbon_area);
61 void setDockArea(DropArea drop_area, SectionWidget * section);
66 virtual void setContainer(ContainerWidgetBase* container);
67 virtual void swapWith(DockItem* other_widget);
68 void setClosable(bool closable);
69 void setHidable(bool hidable);
70 void setWindowable(bool hidable);
71 void setShowTab(bool show_tab);
72 void setMoveable(bool movable);
73 bool isDocked() const;
74 bool isDockVisible() const;
75 void setTabFlat(bool flat);
78 bool isClosable() const { return m_is_closable; }
79 bool isHidable() const { return m_is_hidable; }
80 bool isWindowable() const { return m_is_windowable; }
81 bool isMovable() const;
82 bool showTab() const;
83 bool useTabTitle() const;
84 virtual void setUseTabTitle(bool use_tab_title);
85 virtual void setDockSelected(bool selected);
86 bool isDockSelected() const { return m_is_selected; }
87 virtual void setIcon(const QIcon& icon);
88 virtual void setIconID(const String& icon);
89 virtual void setTitle(const TranslatedString& title);
90 virtual const TranslatedString& title() const { return m_title; }
91 protected:
92 virtual void createSectionContent();
93 virtual void initialize();
94
100
101 QPointer<ContainerWidgetBase> m_container;
103 QIcon m_icon;
112 };
113}
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:59
The root class that manages a series of SectionContent that can share the same space or lay out in va...
Definition ContainerWidget.h:66
The root class that allows iterface with the NDEVR API Widget Docking system.
Definition DockItem.h:54
SectionIconTab * titleWidget() const
virtual void setIconID(const String &icon)
bool isWindowable() const
Definition DockItem.h:80
bool isMovable() const
bool isHidable() const
Definition DockItem.h:79
String m_icon_id
Definition DockItem.h:102
void setTabFlat(bool flat)
virtual const TranslatedString & title() const
Definition DockItem.h:90
void setDockArea(DropArea drop_area, SectionWidget *section)
QPointer< ContainerWidgetBase > m_container
Definition DockItem.h:101
SectionContent * m_section_content
Definition DockItem.h:97
virtual void setUseTabTitle(bool use_tab_title)
DockItem(ContainerWidgetBase *container=nullptr)
DockItem(RibbonArea ribbon_area, ContainerWidgetBase *container=nullptr)
virtual void setContainer(ContainerWidgetBase *container)
QIcon m_icon
Definition DockItem.h:103
void moveTabToStart()
bool m_use_tab_title
Definition DockItem.h:111
TranslatedString m_title
Definition DockItem.h:104
void setMoveable(bool movable)
virtual void initialize()
RibbonArea m_prefered_ribbon_area
Definition DockItem.h:99
bool isClosable() const
Definition DockItem.h:78
virtual ~DockItem()
void setWindowable(bool hidable)
bool useTabTitle() const
bool isDockSelected() const
Definition DockItem.h:86
void setHidable(bool hidable)
void setShowTab(bool show_tab)
void setRibbonArea(RibbonArea ribbon_area)
bool m_is_closable
Definition DockItem.h:105
bool m_is_movable
Definition DockItem.h:108
virtual void createSectionContent()
virtual void setIcon(const QIcon &icon)
bool isDockVisible() const
SectionIconTab * m_icon_title
Definition DockItem.h:96
SectionWidget * m_original_section
Definition DockItem.h:98
bool showTab() const
void setClosable(bool closable)
virtual void setTitle(const TranslatedString &title)
bool m_is_hidable
Definition DockItem.h:107
FloatingWidget * floatingWidget() const
bool isDocked() const
ContainerWidgetBase * container() const
bool m_is_selected
Definition DockItem.h:109
bool m_show_tab
Definition DockItem.h:110
virtual void swapWith(DockItem *other_widget)
virtual void setDockSelected(bool selected)
SectionWidget * section() const
UUID m_uuid
Definition DockItem.h:95
bool m_is_windowable
Definition DockItem.h:106
Used with the NDEVR API Widget Docking system for widgets that are floating. These widgets appear as ...
Definition FloatingWidget.h:49
The core container for objects using the NDEVR API Widget Docking system. Contains information used t...
Definition SectionContent.h:51
Provides a tab that contains an icon and some buttons used for either a tab if the section content is...
Definition SectionIconTab.h:55
SectionWidget manages multiple instances of SectionContent. It displays a title TAB,...
Definition SectionWidget.h:55
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
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
Definition ACIColor.h:37
RibbonArea
Requests a ribbon or tab area to be in a certain location and orientation relative to another widget.
Definition RibbonArea.h:71
DropArea
relates where a widget should be dropped relative to another.
Definition RibbonArea.h:46