new chatlistview component, file attachments, performance & primitive test
This commit is contained in:
@@ -1,16 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <QColor>
|
||||
#include <QImage>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
#include <QtQml>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <jkqtmathtext/jkqtmathtext.h>
|
||||
|
||||
namespace ZShell::llm {
|
||||
|
||||
class LlmMathText : public QObject {
|
||||
@@ -25,14 +19,14 @@ class LlmMathText : public QObject {
|
||||
Q_PROPERTY(
|
||||
qreal devicePixelRatio READ devicePixelRatio WRITE setDevicePixelRatio
|
||||
NOTIFY changed)
|
||||
Q_PROPERTY(QImage image READ image NOTIFY changed)
|
||||
Q_PROPERTY(QUrl imageUrl READ imageUrl NOTIFY changed)
|
||||
Q_PROPERTY(QString imageId READ imageId NOTIFY changed)
|
||||
Q_PROPERTY(qreal width READ width NOTIFY changed)
|
||||
Q_PROPERTY(qreal height READ height NOTIFY changed)
|
||||
Q_PROPERTY(bool ok READ ok NOTIFY changed)
|
||||
|
||||
public:
|
||||
explicit LlmMathText(QObject* parent = nullptr);
|
||||
~LlmMathText() override;
|
||||
|
||||
[[nodiscard]] QString latex() const { return m_latex; }
|
||||
void setLatex(const QString& value);
|
||||
@@ -42,8 +36,7 @@ class LlmMathText : public QObject {
|
||||
void setFontPointSize(double value);
|
||||
[[nodiscard]] qreal devicePixelRatio() const { return m_devicePixelRatio; }
|
||||
void setDevicePixelRatio(qreal value);
|
||||
[[nodiscard]] QImage image() const { return m_image; }
|
||||
[[nodiscard]] QUrl imageUrl() const { return m_imageUrl; }
|
||||
[[nodiscard]] QString imageId() const { return m_imageId; }
|
||||
[[nodiscard]] qreal width() const { return m_width; }
|
||||
[[nodiscard]] qreal height() const { return m_height; }
|
||||
[[nodiscard]] bool ok() const { return m_ok; }
|
||||
@@ -54,13 +47,11 @@ class LlmMathText : public QObject {
|
||||
private:
|
||||
void reRender();
|
||||
|
||||
std::shared_ptr<JKQTMathText> m_renderer;
|
||||
QString m_latex;
|
||||
QColor m_color;
|
||||
double m_fontPointSize = 12.0;
|
||||
qreal m_devicePixelRatio = 1.0;
|
||||
QImage m_image;
|
||||
QUrl m_imageUrl;
|
||||
QString m_imageId;
|
||||
qreal m_width = 0;
|
||||
qreal m_height = 0;
|
||||
bool m_ok = false;
|
||||
|
||||
Reference in New Issue
Block a user