Add APP main window shell
This commit is contained in:
44
KeyBorad/KeyBorad/APP/AppMainWindow.cpp
Normal file
44
KeyBorad/KeyBorad/APP/AppMainWindow.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
#include "APP/AppMainWindow.h"
|
||||
|
||||
#include "APP/AppKeyboardPage.h"
|
||||
#include "APP/AppSettingsPage.h"
|
||||
#include "APP/AppTheme.h"
|
||||
|
||||
#include <QtWidgets/QTabWidget>
|
||||
#include <QtWidgets/QVBoxLayout>
|
||||
|
||||
namespace APP
|
||||
{
|
||||
|
||||
App_MainWindow::App_MainWindow(QWidget* p_Parent)
|
||||
: QWidget(p_Parent)
|
||||
{
|
||||
setWindowTitle(QStringLiteral("KeyBorad"));
|
||||
resize(860, 760);
|
||||
setStyleSheet(App_Theme_BuildWindowStyleSheet());
|
||||
|
||||
QVBoxLayout* const p_RootLayout = new QVBoxLayout(this);
|
||||
p_RootLayout->setContentsMargins(20, 20, 20, 20);
|
||||
p_RootLayout->setSpacing(12);
|
||||
|
||||
appTabWidget = new QTabWidget(this);
|
||||
appKeyboardPage = new App_KeyboardPage(appTabWidget);
|
||||
appSettingsPage = new App_SettingsPage(appTabWidget);
|
||||
|
||||
appTabWidget->addTab(appKeyboardPage, QStringLiteral("Keyboard"));
|
||||
appTabWidget->addTab(appSettingsPage, QStringLiteral("Settings"));
|
||||
|
||||
p_RootLayout->addWidget(appTabWidget);
|
||||
}
|
||||
|
||||
App_KeyboardPage* App_MainWindow::App_Func_GetKeyboardPage() const
|
||||
{
|
||||
return appKeyboardPage;
|
||||
}
|
||||
|
||||
App_SettingsPage* App_MainWindow::App_Func_GetSettingsPage() const
|
||||
{
|
||||
return appSettingsPage;
|
||||
}
|
||||
|
||||
} // namespace APP
|
||||
27
KeyBorad/KeyBorad/APP/AppMainWindow.h
Normal file
27
KeyBorad/KeyBorad/APP/AppMainWindow.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
class QTabWidget;
|
||||
|
||||
namespace APP
|
||||
{
|
||||
|
||||
class App_KeyboardPage;
|
||||
class App_SettingsPage;
|
||||
|
||||
class App_MainWindow : public QWidget
|
||||
{
|
||||
public:
|
||||
explicit App_MainWindow(QWidget* p_Parent = nullptr);
|
||||
|
||||
App_KeyboardPage* App_Func_GetKeyboardPage() const;
|
||||
App_SettingsPage* App_Func_GetSettingsPage() const;
|
||||
|
||||
private:
|
||||
QTabWidget* appTabWidget = nullptr;
|
||||
App_KeyboardPage* appKeyboardPage = nullptr;
|
||||
App_SettingsPage* appSettingsPage = nullptr;
|
||||
};
|
||||
|
||||
} // namespace APP
|
||||
Reference in New Issue
Block a user