From 8d2d59d4555566a3cc30d7dd8e04f29747261718 Mon Sep 17 00:00:00 2001 From: ami Date: Fri, 10 Jan 2025 23:13:01 -0500 Subject: [PATCH] Add TopBar --- src/app/MainWindow.hpp | 1 + src/gui/TopBar.cpp | 7 +++++++ src/gui/TopBar.hpp | 16 ++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 src/gui/TopBar.cpp create mode 100644 src/gui/TopBar.hpp diff --git a/src/app/MainWindow.hpp b/src/app/MainWindow.hpp index 6bd6040..847d7b5 100644 --- a/src/app/MainWindow.hpp +++ b/src/app/MainWindow.hpp @@ -23,6 +23,7 @@ class MainWindow : public QWidget QVBoxLayout* _layout = nullptr; TopBar* _topbar = nullptr; + }; #endif diff --git a/src/gui/TopBar.cpp b/src/gui/TopBar.cpp new file mode 100644 index 0000000..31cc71a --- /dev/null +++ b/src/gui/TopBar.cpp @@ -0,0 +1,7 @@ +#include "TopBar.hpp" + +TopBar::TopBar () +{ + _layout = new QHBoxLayout {}; + setLayout(_layout); +} diff --git a/src/gui/TopBar.hpp b/src/gui/TopBar.hpp new file mode 100644 index 0000000..b1aa752 --- /dev/null +++ b/src/gui/TopBar.hpp @@ -0,0 +1,16 @@ +#ifndef TOPBAR_HPP +#define TOPBAR_HPP + +#include +#include + +class TopBar : public QWidget +{ + public: + TopBar (); + + private: + QHBoxLayout* _layout = nullptr; +}; + +#endif