Scaffold Qt6 Widgets app for Milestone 0

This commit is contained in:
Keith Smith
2026-03-01 08:56:10 -07:00
parent da11b96dab
commit 285a81d9b5
6 changed files with 279 additions and 0 deletions

45
src/session_window.cpp Normal file
View File

@@ -0,0 +1,45 @@
#include "session_window.h"
#include <QFont>
#include <QLabel>
#include <QTabWidget>
#include <QVBoxLayout>
#include <QWidget>
SessionWindow::SessionWindow(const QString& profileName, QWidget* parent)
: QMainWindow(parent), m_tabs(new QTabWidget(this))
{
setWindowTitle(QStringLiteral("OrbitHub Session - %1").arg(profileName));
resize(900, 600);
setCentralWidget(m_tabs);
addPlaceholderTab(profileName);
}
void SessionWindow::addPlaceholderTab(const QString& profileName)
{
auto* container = new QWidget(this);
auto* layout = new QVBoxLayout(container);
auto* titleLabel = new QLabel(QStringLiteral("Profile: %1").arg(profileName), container);
auto* surfaceLabel = new QLabel(QStringLiteral("OrbitHub Native Surface"), container);
QFont titleFont = titleLabel->font();
titleFont.setBold(true);
titleLabel->setFont(titleFont);
QFont surfaceFont = surfaceLabel->font();
surfaceFont.setPointSize(surfaceFont.pointSize() + 6);
surfaceFont.setBold(true);
surfaceLabel->setFont(surfaceFont);
surfaceLabel->setAlignment(Qt::AlignCenter);
surfaceLabel->setMinimumHeight(200);
surfaceLabel->setStyleSheet(
QStringLiteral("border: 1px solid #8a8a8a; background-color: #f5f5f5;"));
layout->addWidget(titleLabel);
layout->addWidget(surfaceLabel, 1);
m_tabs->addTab(container, profileName);
}