API Documentation
Loading...
Searching...
No Matches
SectionIconTab.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: SectionIconTab
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/RibbonArea.h>
35#include <NDEVR/SectionTab.h>
36#include <QIcon>
37class QPushButton;
38class QLabel;
39class QPropertyAnimation;
40class QGraphicsOpacityEffect;
41class QFrame;
42namespace NDEVR
43{
44 class ImageView;
45 class Button;
46 class VerticalLabel;
47 class DockItem;
48 class QCustomLabel;
49 class TranslatedString;
51 {
52 Q_OBJECT
53 Q_PROPERTY(QColor background_color READ backgroundColor WRITE setBackgroundColor)
54 public:
55 explicit SectionIconTab(SectionContent* content, DockItem* widget);
56 void init();
57 virtual ~SectionIconTab();
58 void setFlat(bool flat);
59 void setFloatingWidget(FloatingWidget* widget) override;
60 void setSelected(bool is_selected) override;
61 void paintEvent(QPaintEvent *) override;
62 void resizeEvent(QResizeEvent *event) override;
63 void setFullscreen(bool fullscreen) override;
64 QSize sizeHint() const override;
65 QSize minimumSizeHint() const override;
66 QIcon getIcon() const override;
67 QColor backgroundColor();
68 virtual TranslatedString getTitle() const override;
69 void setBackgroundColor(QColor color);
70 void mouseDoubleClickEvent(QMouseEvent* e) override;
71 void setIconID(const String& icon);
72 bool isDocked() { return m_is_docked; }
73 void setDocked(bool is_docked) override { m_is_docked = is_docked; }
74 void setLocation(RibbonArea area, bool is_docked) override;
75 public slots:
76 void setIcon(const QIcon& icon);
77 void setTitle(const TranslatedString& title);
78 void contextMenu(const QPoint& point);
79 void onVisible(bool is_visible);
80 void updateClosedButton();
81 void updateFullscreenButton();
82 void updateMovable();
83 void updateShowTab();
84 protected:
85 QPalette::ColorRole preferredColorRoll() const;
86 void updateBackgroundColor();
87 bool event(QEvent *event) override;
88 void updateIconSizes();
89 void updateRoundedCorners();
90 void updateOpacity();
91 protected:
95 QPropertyAnimation* m_color_animation;
99 QGraphicsOpacityEffect* m_opacity_effect;
104 };
105}
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:81
Definition Button.h:60
Definition DockItem.h:51
Definition FloatingWidget.h:45
Definition ImageView.h:40
Definition QCustomLabel.h:42
Definition SectionContent.h:47
Definition SectionIconTab.h:51
void setDocked(bool is_docked) override
Definition SectionIconTab.h:73
ImageView * m_icon_label
Definition SectionIconTab.h:93
bool isDocked()
Definition SectionIconTab.h:72
bool m_is_hovering
Definition SectionIconTab.h:103
DockItem * m_widget
Definition SectionIconTab.h:92
QGraphicsOpacityEffect * m_opacity_effect
Definition SectionIconTab.h:99
bool m_is_flat
Definition SectionIconTab.h:101
Button * m_fullscreen_button
Definition SectionIconTab.h:97
bool m_is_docked
Definition SectionIconTab.h:100
RibbonArea m_ribbon_area
Definition SectionIconTab.h:98
QPropertyAnimation * m_color_animation
Definition SectionIconTab.h:95
bool m_is_selected
Definition SectionIconTab.h:102
Button * m_close_button
Definition SectionIconTab.h:96
QCustomLabel * m_title_label
Definition SectionIconTab.h:94
Definition SectionTab.h:44
Definition String.h:40
Definition TranslatedString.h:9
Definition ACIColor.h:37
RibbonArea
Definition RibbonArea.h:68