Wavelength
Privacy-focused, cross-platform, and open-source communication application
Loading...
Searching...
No Matches
navbar.h
Go to the documentation of this file.
1#ifndef NAVBAR_H
2#define NAVBAR_H
3
4#include <QToolBar>
5
6class QSoundEffect;
7class QSpacerItem;
10class QLabel;
11class QHBoxLayout;
12
23class Navbar final : public QToolBar {
24 Q_OBJECT
25
26public:
34 explicit Navbar(QWidget *parent = nullptr);
35
36public slots:
44 void SetChatMode(bool inChat) const;
45
50 void PlayClickSound() const;
51
52protected:
58 void contextMenuEvent(QContextMenuEvent *event) override;
59
60signals:
63
66
69
70private:
72 QHBoxLayout *main_layout_;
76 QLabel *logo_label_;
83
90
92 QSpacerItem *spacer1_;
94 QSpacerItem *spacer2_;
95
97 QSoundEffect *click_sound_;
98};
99
100#endif // NAVBAR_H
A custom QPushButton styled with a cyberpunk aesthetic, featuring animated glow effects.
Definition navbar_button.h:17
Navbar(QWidget *parent=nullptr)
Constructs the Navbar. Initializes the toolbar's appearance and behavior (non-movable,...
Definition navbar.cpp:13
QHBoxLayout * main_layout_
The main horizontal layout managing all elements within the Navbar.
Definition navbar.h:72
CyberpunkButton * settings_button_
Button to open the application settings.
Definition navbar.h:89
void joinWavelengthClicked()
Emitted when the "Merge Wavelength" button is clicked.
QLabel * corner_element_
Decorative label element placed at the far right in normal mode.
Definition navbar.h:82
void createWavelengthClicked()
Emitted when the "Generate Wavelength" button is clicked.
void PlayClickSound() const
Plays a predefined click sound effect. Triggered when any of the main action buttons are clicked.
Definition navbar.cpp:141
QWidget * logo_container_
Container widget holding the left corner element and the logo label.
Definition navbar.h:74
CyberpunkButton * join_button_
Button to trigger joining an existing wavelength.
Definition navbar.h:87
void SetChatMode(bool inChat) const
Switches the Navbar layout between normal mode and chat mode. In chat mode, the action buttons and ri...
Definition navbar.cpp:125
QLabel * logo_label_
Label displaying the "WAVELENGTH" logo text with glow effect.
Definition navbar.h:76
void contextMenuEvent(QContextMenuEvent *event) override
Overridden context menu event handler. Ignores the event to prevent the default toolbar context menu ...
Definition navbar.cpp:137
QWidget * buttons_container_
Container widget holding the action buttons (Create, Join, Settings).
Definition navbar.h:80
CyberpunkButton * create_button_
Button to trigger the creation of a new wavelength.
Definition navbar.h:85
QSpacerItem * spacer2_
Spacer item used to push elements apart in the main layout (right side). Its stretch factor changes i...
Definition navbar.h:94
QSpacerItem * spacer1_
Spacer item used to push elements apart in the main layout (left side).
Definition navbar.h:92
NetworkStatusWidget * network_status_
Widget displaying the current network connection status.
Definition navbar.h:78
void settingsClicked()
Emitted when the "Settings" button is clicked.
QSoundEffect * click_sound_
Sound effect played when action buttons are clicked.
Definition navbar.h:97
A widget displaying network connection status and ping time with cyberpunk aesthetics.
Definition network_status_widget.h:19