Add Main Window class
This commit is contained in:
parent
79b9517ee7
commit
2bc5690bf7
27
src/app/MainWindow.cpp
Normal file
27
src/app/MainWindow.cpp
Normal 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
28
src/app/MainWindow.hpp
Normal 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
|
Loading…
Reference in New Issue
Block a user