1
0

Add Main Window class

This commit is contained in:
ami-sc 2024-01-14 20:13:05 -06:00
parent 79b9517ee7
commit 2bc5690bf7
2 changed files with 55 additions and 0 deletions

27
src/app/MainWindow.cpp Normal file
View File

@ -0,0 +1,27 @@
/**
* @file MainWindow.cpp
* @brief Implementation of the MainWindow class.
*
* @author Emilio Soriano Chávez
*/
#include "MainWindow.hpp"
/**
* @brief Constructs the main window of the application.
*/
MainWindow::MainWindow ()
{
/* Window Properties */
setWindowTitle("Ensemble");
setMinimumSize(850, 400);
/* Remove margins between widgets. */
setContentsMargins(0, 0, 0, 0);
_layout = new QVBoxLayout {};
setLayout(_layout);
_topbar = new TopBar {};
_layout -> addWidget(_topbar);
}

28
src/app/MainWindow.hpp Normal file
View File

@ -0,0 +1,28 @@
/**
* @file MainWindow.hpp
* @brief The main window for Ensemble, containing the Top Bar, the Sidebar,
* the Music Player, and the View Manager.
*
* @author Emilio Soriano Chávez
*/
#ifndef MAINWINDOW_HPP
#define MAINWINDOW_HPP
#include <QWidget>
#include <QVBoxLayout>
#include "TopBar.hpp"
class MainWindow : public QWidget
{
public:
MainWindow ();
private:
QVBoxLayout* _layout = nullptr;
TopBar* _topbar = nullptr;
};
#endif