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 class NDEVR_WIDGETS_API DockItem : public QObject
51 {
52 public:
53 explicit DockItem(RibbonArea ribbon_area, ContainerWidgetBase* container = nullptr);
54 explicit DockItem(ContainerWidgetBase* container = nullptr);
55 virtual ~DockItem();
56
57 void setRibbonArea(RibbonArea ribbon_area);
58 void setDockArea(DropArea drop_area, SectionWidget * section);
59 SectionIconTab* titleWidget() const;
60 ContainerWidgetBase* container() const;
61 SectionWidget* section() const;
62 FloatingWidget* floatingWidget() const;
63 virtual void setContainer(ContainerWidgetBase* container);
64 virtual void swapWith(DockItem* other_widget);
65 void setClosable(bool closable);
66 void setHidable(bool hidable);
67 void setWindowable(bool hidable);
68 void setShowTab(bool show_tab);
69 void setMoveable(bool movable);
70 bool isDocked() const;
71 bool isDockVisible() const;
72 void setTabFlat(bool flat);
73 void moveTabToEnd();
74 void moveTabToStart();
75 bool isClosable() const { return m_is_closable; }
76 bool isHidable() const { return m_is_hidable; }
77 bool isWindowable() const { return m_is_windowable; }
78 bool isMovable() const;
79 bool showTab() const;
80 bool useTabTitle() const;
81 virtual void setUseTabTitle(bool use_tab_title);
82 virtual void setDockSelected(bool selected);
83 bool isDockSelected() const { return m_is_selected; }
84 virtual void setIcon(const QIcon& icon);
85 virtual void setIconID(const String& icon);
86 virtual void setTitle(const TranslatedString& title);
87 virtual const TranslatedString& title() const { return m_title; }
88 protected:
89 virtual void createSectionContent();
90 virtual void initialize();
91
97
98 QPointer<ContainerWidgetBase> m_container;
100 QIcon m_icon;
109 };
110}
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:81
Definition ContainerWidget.h:85
Definition DockItem.h:51
bool isWindowable() const
Definition DockItem.h:77
bool isHidable() const
Definition DockItem.h:76
String m_icon_id
Definition DockItem.h:99
virtual const TranslatedString & title() const
Definition DockItem.h:87
QPointer< ContainerWidgetBase > m_container
Definition DockItem.h:98
SectionContent * m_section_content
Definition DockItem.h:94
QIcon m_icon
Definition DockItem.h:100
bool m_use_tab_title
Definition DockItem.h:108
TranslatedString m_title
Definition DockItem.h:101
RibbonArea m_prefered_ribbon_area
Definition DockItem.h:96
bool isClosable() const
Definition DockItem.h:75
bool isDockSelected() const
Definition DockItem.h:83
bool m_is_closable
Definition DockItem.h:102
bool m_is_movable
Definition DockItem.h:105
SectionIconTab * m_icon_title
Definition DockItem.h:93
SectionWidget * m_original_section
Definition DockItem.h:95
bool m_is_hidable
Definition DockItem.h:104
bool m_is_selected
Definition DockItem.h:106
bool m_show_tab
Definition DockItem.h:107
UUID m_uuid
Definition DockItem.h:92
bool m_is_windowable
Definition DockItem.h:103
Definition FloatingWidget.h:45
Definition SectionContent.h:47
Definition SectionIconTab.h:51
Definition SectionWidget.h:55
Definition String.h:40
Definition TranslatedString.h:9
Definition UUID.h:66
Definition ACIColor.h:37
RibbonArea
Definition RibbonArea.h:68
DropArea
Definition RibbonArea.h:47