mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-05-30 02:49:12 -04:00
36 lines
636 B
C++
36 lines
636 B
C++
// Copyright (C) 2024-2026 Petr Mironychev
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QQuickView>
|
|
#include <QShortcut>
|
|
|
|
namespace QodeAssist::Chat {
|
|
|
|
class ChatView : public QQuickView
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(bool isPin READ isPin WRITE setIsPin NOTIFY isPinChanged FINAL)
|
|
public:
|
|
ChatView();
|
|
|
|
bool isPin() const;
|
|
void setIsPin(bool newIsPin);
|
|
|
|
signals:
|
|
void isPinChanged();
|
|
|
|
protected:
|
|
void closeEvent(QCloseEvent *event) override;
|
|
|
|
private:
|
|
void saveSettings();
|
|
void restoreSettings();
|
|
|
|
bool m_isPin;
|
|
QShortcut *m_closeShortcut;
|
|
};
|
|
|
|
} // namespace QodeAssist::Chat
|