mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-06-30 01:59:11 -04:00
refactor: Move to agent architecture
This commit is contained in:
32
sources/settings/Pill.hpp
Normal file
32
sources/settings/Pill.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
// 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 <QLabel>
|
||||
#include <QString>
|
||||
|
||||
namespace QodeAssist::Settings {
|
||||
|
||||
// Small rounded chip. Theme-aware: recolors itself on palette/style changes.
|
||||
// All colors derive from the active Qt Creator theme (Utils::Theme).
|
||||
class Pill : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum Kind { Neutral, Accent, On, Off, User, Tag, Active, Match };
|
||||
|
||||
explicit Pill(Kind kind, const QString &text = {}, QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *event) override;
|
||||
|
||||
private:
|
||||
void applyTheme();
|
||||
|
||||
Kind m_kind;
|
||||
bool m_inApplyTheme = false;
|
||||
};
|
||||
|
||||
} // namespace QodeAssist::Settings
|
||||
Reference in New Issue
Block a user