mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-03-26 09:59:52 +00:00
closes: #1374 . Use SPDX short-form identifiers instead of lengthy copyright header to document per-file license and copyright. This commit updates all files under src/ directory where applicable as well as org.flameshot.Flameshot.metainfo.xml.
36 lines
688 B
C++
36 lines
688 B
C++
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
// SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors
|
|
|
|
#pragma once
|
|
|
|
#include <QTextEdit>
|
|
|
|
class TextWidget : public QTextEdit
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit TextWidget(QWidget* parent = nullptr);
|
|
|
|
void adjustSize();
|
|
void setFont(const QFont& f);
|
|
|
|
protected:
|
|
void showEvent(QShowEvent* e);
|
|
void resizeEvent(QResizeEvent* e);
|
|
|
|
signals:
|
|
void textUpdated(const QString& s);
|
|
|
|
public slots:
|
|
void updateFont(const QFont& f);
|
|
void setTextColor(const QColor& c);
|
|
void setFontPointSize(qreal s);
|
|
|
|
private slots:
|
|
void emitTextUpdated();
|
|
|
|
private:
|
|
QSize m_baseSize;
|
|
QSize m_minSize;
|
|
};
|