mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-07-21 18:51:02 -04:00
refactor: Restructure project into sources/tests layout and dissolve PluginLLMCore
This commit is contained in:
50
sources/settings/AgentRoleDialog.hpp
Normal file
50
sources/settings/AgentRoleDialog.hpp
Normal file
@@ -0,0 +1,50 @@
|
||||
// Copyright (C) 2024-2026 Petr Mironychev
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Additional attribution terms under GPLv3 §7(b) apply — see LICENSE
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "AgentRole.hpp"
|
||||
|
||||
class QLineEdit;
|
||||
class QTextEdit;
|
||||
class QDialogButtonBox;
|
||||
|
||||
namespace QodeAssist::Settings {
|
||||
|
||||
class AgentRoleDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum class Action {
|
||||
Add,
|
||||
Duplicate,
|
||||
Edit,
|
||||
};
|
||||
|
||||
explicit AgentRoleDialog(Action action, QWidget *parent = nullptr);
|
||||
explicit AgentRoleDialog(const AgentRole &role, Action action, QWidget *parent = nullptr)
|
||||
: AgentRoleDialog{action, parent}
|
||||
{
|
||||
setRole(role);
|
||||
}
|
||||
|
||||
AgentRole getRole() const;
|
||||
void setRole(const AgentRole &role);
|
||||
|
||||
private:
|
||||
void setupUI();
|
||||
void validateInput();
|
||||
|
||||
QLineEdit *m_nameEdit = nullptr;
|
||||
QLineEdit *m_idEdit = nullptr;
|
||||
QTextEdit *m_descriptionEdit = nullptr;
|
||||
QTextEdit *m_systemPromptEdit = nullptr;
|
||||
QDialogButtonBox *m_buttonBox = nullptr;
|
||||
Action m_action;
|
||||
};
|
||||
|
||||
} // namespace QodeAssist::Settings
|
||||
Reference in New Issue
Block a user