mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-05-30 02:49:12 -04:00
feat: Add settings page for providers (#353)
This commit is contained in:
31
settings/SectionBox.cpp
Normal file
31
settings/SectionBox.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
// Copyright (C) 2024-2026 Petr Mironychev
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "SectionBox.hpp"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace QodeAssist::Settings {
|
||||
|
||||
SectionBox::SectionBox(const QString &title, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
m_title = new QLabel(title, this);
|
||||
QFont tf = m_title->font();
|
||||
tf.setBold(true);
|
||||
m_title->setFont(tf);
|
||||
|
||||
m_body = new QWidget(this);
|
||||
m_bodyLayout = new QVBoxLayout(m_body);
|
||||
m_bodyLayout->setContentsMargins(0, 0, 0, 0);
|
||||
m_bodyLayout->setSpacing(4);
|
||||
|
||||
auto *outer = new QVBoxLayout(this);
|
||||
outer->setContentsMargins(0, 4, 0, 4);
|
||||
outer->setSpacing(4);
|
||||
outer->addWidget(m_title);
|
||||
outer->addWidget(m_body, 1);
|
||||
}
|
||||
|
||||
} // namespace QodeAssist::Settings
|
||||
Reference in New Issue
Block a user