API Documentation
Loading...
Searching...
No Matches
SectionTab.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: SectionTab
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/RibbonArea.h>
35#include <QWidget>
36#include <QIcon>
37namespace NDEVR
38{
39 class TranslatedString;
40 class SectionContent;
41 class String;
42 class FloatingWidget;
43 class NDEVR_WIDGETS_API SectionTab : public QWidget
44 {
45 Q_OBJECT
46 public:
47 SectionTab(SectionContent* content, QWidget* parent);
48 virtual ~SectionTab();
49 bool isActiveTab() const;
50 void setActiveTab(bool active);
51 virtual void setFloatingWidget(FloatingWidget* widget);
52 virtual void setFullscreen(bool fullscreen);
53 void setSectionContent(SectionContent* content);
54 protected:
55 virtual void mousePressEvent(QMouseEvent* event) override;
56 virtual void mouseReleaseEvent(QMouseEvent* ev) override;
57 virtual void mouseMoveEvent(QMouseEvent* ev) override;
58 virtual void leaveEvent(QEvent* event) override;
59 void recieveCloseButtonClicked();
60 void recieveFullScreenButtonClicked();
61 signals:
62 void moveableUpdated(bool is_moveable);
63 void closableUpdated(bool is_moveable);
64 void fullscreenUpdated(bool is_moveable);
65 void isShownUpdated(bool is_shown);
68 void fullscreenSignal(bool fullscreen);
72 public:
73 void updateRoundedCorners();
74 void setRoundedCorners(int radius_tl, int radius_tr, int radius_bl, int radius_br);
75 void setIsShown(bool shown);
76 bool event(QEvent* event) override;
77 virtual bool isMovable() const;
78 virtual bool isShown() const;
79 virtual QIcon getIcon() const { return QIcon(); };
80 virtual TranslatedString getTitle() const;
81 virtual void setLocation(RibbonArea area, bool is_docked) = 0;
82 virtual void setDocked(bool is_docked) = 0;
83 virtual void setSelected(bool is_selected) = 0;
84 protected:
86 int m_radius_tl = 0;
87 int m_radius_tr = 0;
88 int m_radius_bl = 0;
89 int m_radius_br = 0;
90 protected:
98 };
99}
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:81
Definition FloatingWidget.h:45
Definition SectionContent.h:47
Definition SectionTab.h:44
void updateClosableSignal()
virtual QIcon getIcon() const
Definition SectionTab.h:79
void clickedSignal(SectionContent *content)
void fullscreenUpdated(bool is_moveable)
void closableUpdated(bool is_moveable)
void isShownUpdated(bool is_shown)
void moveableUpdated(bool is_moveable)
virtual void setSelected(bool is_selected)=0
virtual void setLocation(RibbonArea area, bool is_docked)=0
bool m_tab_moving
Definition SectionTab.h:95
QPointF m_local_drag_pos
Definition SectionTab.h:94
bool m_is_fullscreen
Definition SectionTab.h:97
FloatingWidget * m_floating_widget
Definition SectionTab.h:92
SectionContent * m_content
Definition SectionTab.h:91
QPointF _dragStartPos
Definition SectionTab.h:93
bool m_active_tab
Definition SectionTab.h:96
bool m_is_shown
Definition SectionTab.h:85
void updateMoveableSignal()
virtual void setDocked(bool is_docked)=0
void closedSignal(SectionContent *content)
void fullscreenSignal(bool fullscreen)
Definition TranslatedString.h:9
Definition ACIColor.h:37
RibbonArea
Definition RibbonArea.h:68