Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Common/LtsWidgets/lts_text_editor.h
T
torsten 418443c841 LtsWidgets: Qt6 API fixes complete
- QComboBox::activated signal: QString→int parameter (lts_text_editor)
- qAsConst→std::as_const (5 files)
- localPos()→position() (lts_height_plot_widget)
- setMargin→setContentsMargins (tests/window.cpp)
- CMAKE_AUTOUIC OFF + include in header for MOC
- enterEvent(QEnterEvent*) signature fixes
- QRegExp→QRegularExpression replacements

All LtsWidgets module files now Qt6-compatible.
2026-08-21 11:08:24 +02:00

62 lines
1.4 KiB
C++

#pragma once
#include <LtsWidgets/lts_widgets_export.h>
#include <QWidget>
namespace Ui
{
class LtsTextEditor;
}
class QTextEdit;
class QTextCharFormat;
namespace LtsWidgets
{
class LTSWIDGETS_EXPORT LtsTextEditor : public QWidget
{
Q_OBJECT
public:
LtsTextEditor(QWidget *parent = nullptr);
~LtsTextEditor();
void enableBackgroundColor(bool onOff);
void setInitialBackgroundColor(const QColor &bgColor);
QTextEdit *textEdit();
QColor backgroundColor() const;
Q_SIGNALS:
void backgroundColorChanged(const QColor &bgColor);
private:
Ui::LtsTextEditor *m_ui;
QColor m_backgroundColor{Qt::white};
QColor m_foregroundColor{Qt::black};
private slots:
void slotCurrentCharFormatChanged(const QTextCharFormat &format);
void slotFontChanged(const QFont &f);
void slotTextColorChanged(const QColor &c);
void slotBackgroundColorChanged(const QColor &bgColor);
void slotAlignmentChanged();
void slotMergeFormatOnWordOrSelection(const QTextCharFormat &format);
void slotClipboardDataChanged();
void slotTextColor();
void slotBackgroundColor();
void slotTextSize(int index);
void slotTextSizeEditingFinished();
void slotTextFamily(int index);
void slotTextItalic();
void slotTextUnderline();
void slotTextBold();
//void slotTextStyle(int styleIndex);
void slotTextAlign();
};
} // namespace LtsWidgets