mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-05-30 10:59:30 -04:00
feat: Add agents and agents settings
This commit is contained in:
39
settings/SettingsUiBuilders.hpp
Normal file
39
settings/SettingsUiBuilders.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright (C) 2024-2026 Petr Mironychev
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
class QGridLayout;
|
||||
class QHBoxLayout;
|
||||
class QLabel;
|
||||
class QLayout;
|
||||
class QWidget;
|
||||
|
||||
namespace QodeAssist::Settings {
|
||||
|
||||
void applyMutedSmallCaps(QLabel *label);
|
||||
|
||||
QLabel *makeSectionHeader(const QString &title, QWidget *parent);
|
||||
|
||||
QLabel *makeHintLabel(const QString &text, QWidget *parent = nullptr);
|
||||
|
||||
QHBoxLayout *singleField(QWidget *w);
|
||||
|
||||
class FormBuilder
|
||||
{
|
||||
public:
|
||||
explicit FormBuilder(QGridLayout *grid, int startRow = 0);
|
||||
|
||||
FormBuilder &row(const QString &label, QLayout *value, const QString &hint = {});
|
||||
FormBuilder &row(const QString &label, QWidget *value, const QString &hint = {});
|
||||
|
||||
int currentRow() const { return m_row; }
|
||||
|
||||
private:
|
||||
QGridLayout *m_grid;
|
||||
int m_row;
|
||||
};
|
||||
|
||||
} // namespace QodeAssist::Settings
|
||||
Reference in New Issue
Block a user