mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-07-20 10:10:56 -04:00
refactor: Restructure project into sources/tests layout and dissolve PluginLLMCore
This commit is contained in:
45
sources/widgets/ProgressWidget.hpp
Normal file
45
sources/widgets/ProgressWidget.hpp
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (C) 2025-2026 Petr Mironychev
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Additional attribution terms under GPLv3 §7(b) apply — see LICENSE
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QPainter>
|
||||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
#include <functional>
|
||||
|
||||
#include <utils/progressindicator.h>
|
||||
#include <utils/theme/theme.h>
|
||||
|
||||
namespace QodeAssist {
|
||||
|
||||
class ProgressWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ProgressWidget(QWidget *parent = nullptr);
|
||||
~ProgressWidget();
|
||||
|
||||
void setCancelCallback(std::function<void()> callback);
|
||||
|
||||
signals:
|
||||
void cancelRequested();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
void enterEvent(QEnterEvent *event) override;
|
||||
void leaveEvent(QEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
QTimer m_timer;
|
||||
int m_dotPosition;
|
||||
QColor m_textColor;
|
||||
QColor m_backgroundColor;
|
||||
QPixmap m_logoPixmap;
|
||||
bool m_isHovered;
|
||||
std::function<void()> m_cancelCallback;
|
||||
};
|
||||
|
||||
} // namespace QodeAssist
|
||||
Reference in New Issue
Block a user