CCIMXDesktop
 
Loading...
Searching...
No Matches
TopSideBarWidget.h
1#ifndef TOPSIDEBARWIDGET_H
2#define TOPSIDEBARWIDGET_H
3
4#include <QWidget>
5class IconEvent;
9namespace Ui {
11}
12
18class TopSideBarWidget : public QWidget {
19 Q_OBJECT
20
21public:
26 explicit TopSideBarWidget(QWidget* parent = nullptr);
27
32
37 void installHookedWindow(DesktopMainWindow* mainWindow);
38
42 enum class AcceptPosition {
43 LeftSide,
45 };
46
53
58 void handle_possibleEvent(IconEvent* events);
59
65 StatusBarIconWidget* queryFromName(const QString& name);
66
71 void setHeight(const int height);
72
77 int height_min() const;
78
83 int height_max() const;
84
89 int height() const {
90 return selfHeight;
91 }
92
93private:
94 Ui::TopSideBarWidget* ui;
95
97 void initLeftHandside();
98
100 void initRightHandside();
101
102 int selfHeight;
103 QList<StatusBarIconWidget*> iconsWidgets;
104 DesktopMainWindow* mainWindow;
105};
106
107#endif // TOPSIDEBARWIDGET_H
DesktopMainWindow is the main frontend window of the application. For beginners, this is the starting...
Definition desktopmainwindow.h:33
Network status indicator widget for status bar.
Definition NetStatusStatusBarIconWidget.h:17
Abstract base widget class representing an icon in the status bar.
Definition StatusBarIconWidget.h:47
Top sidebar container widget.
Definition TopSideBarWidget.h:18
~TopSideBarWidget()
Destroys the top sidebar widget.
Definition TopSideBarWidget.cpp:14
int height_min() const
Gets the minimum allowed height.
Definition TopSideBarWidget.cpp:59
AcceptPosition
Append position specifier.
Definition TopSideBarWidget.h:42
@ LeftSide
Left side of the sidebar.
@ RightSide
Right side of the sidebar.
int height_max() const
Gets the maximum allowed height.
Definition TopSideBarWidget.cpp:63
void append_to_toolside(StatusBarIconWidget *src, AcceptPosition position)
Appends a status bar widget to the sidebar.
Definition TopSideBarWidget.cpp:24
int height() const
Gets the current height.
Definition TopSideBarWidget.h:89
void installHookedWindow(DesktopMainWindow *mainWindow)
Installs the main window reference for event handling.
Definition TopSideBarWidget.cpp:18
void handle_possibleEvent(IconEvent *events)
Processes icon events.
Definition TopSideBarWidget.cpp:37
StatusBarIconWidget * queryFromName(const QString &name)
Queries status icon widget by name.
Definition TopSideBarWidget.cpp:45
void setHeight(const int height)
Sets the sidebar height.
Definition TopSideBarWidget.cpp:54
Represents a custom event targeting a specific StatusBarIconWidget.
Definition StatusBarIconWidget.h:20