- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
137 lines
3.0 KiB
C++
Executable File
137 lines
3.0 KiB
C++
Executable File
|
|
|
|
#pragma once
|
|
#include <QObject>
|
|
|
|
|
|
#include "ltswidgets_export.h"
|
|
|
|
#include <QMainWindow>
|
|
#include <QMap>
|
|
#include <QPointer>
|
|
#include <QHBoxLayout>
|
|
#include <QGridLayout>
|
|
#include <QtPrintSupport/QPrinter>
|
|
#include <QtPrintSupport/QPrintPreviewDialog>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
class QAction;
|
|
class QComboBox;
|
|
class QFontComboBox;
|
|
class QTextEdit;
|
|
class QTextCharFormat;
|
|
class QMenu;
|
|
class QPrinter;
|
|
QT_END_NAMESPACE
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
|
|
class LTSWIDGETS_EXPORT LtsTextEditor2 : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit LtsTextEditor2(QWidget *parent = nullptr);
|
|
~LtsTextEditor2();
|
|
|
|
static QString rsrcPath(){return (QStringLiteral(":/images/win"));}
|
|
|
|
QColor m_backgroundColor{Qt::white};
|
|
QColor m_foregroundColor{Qt::black};
|
|
|
|
QTextEdit *textEdit();
|
|
QColor backgroundColor() const;
|
|
void enableBackgroundColor(bool onOff);
|
|
void setInitialBackgroundColor(const QColor &bgColor);
|
|
bool load(const QString &f);
|
|
|
|
|
|
Q_SIGNALS:
|
|
void backgroundColorChanged(const QColor &bgColor);
|
|
|
|
public slots:
|
|
|
|
private slots:
|
|
void onFileNew();
|
|
void onFileOpen();
|
|
bool onFileSave();
|
|
bool onFileSaveAs();
|
|
void onFilePrint();
|
|
void onFilePrintPreview();
|
|
void onFilePrintPdf();
|
|
|
|
void onTextBold();
|
|
void onTextUnderline();
|
|
void onTextItalic();
|
|
void onTextFamily(const QString &f);
|
|
void onTextSize(const QString &p);
|
|
void onTextStyle(int styleIndex);
|
|
void onTextColor();
|
|
void onTextAlign(QAction *a);
|
|
void setChecked(bool checked);
|
|
void indent();
|
|
void unindent();
|
|
void slotBackgroundColorChanged(const QColor &bgColor);
|
|
void slotBackgroundColor();
|
|
|
|
void currentCharFormatChanged(const QTextCharFormat &format);
|
|
void cursorPositionChanged();
|
|
|
|
void clipboardDataChanged();
|
|
void about();
|
|
void printPreview(QPrinter *);
|
|
|
|
private:
|
|
void setupFileActions();
|
|
void setupEditActions();
|
|
void setupTextActions();
|
|
bool maybeSave();
|
|
void setCurrentFileName(const QString &fileName);
|
|
void modifyIndentation(int amount);
|
|
|
|
void mergeFormatOnWordOrSelection(const QTextCharFormat &format);
|
|
void fontChanged(const QFont &f);
|
|
void colorChanged(const QColor &c);
|
|
void alignmentChanged(Qt::Alignment a);
|
|
|
|
QAction *m_actionSave;
|
|
QAction *m_actionOpen;
|
|
QAction *m_actionQuit;
|
|
QAction *m_actionSaveAs;
|
|
QAction *m_actionNew;
|
|
QAction *m_actionPrint;
|
|
QAction *m_actionPreview;
|
|
QAction *m_actionExport;
|
|
QAction *m_actionTextBold;
|
|
QAction *m_actionTextUnderline;
|
|
QAction *m_actionTextItalic;
|
|
QAction *m_actionTextColor;
|
|
QAction *m_actionBackgroundColor;
|
|
QAction *m_actionAlignLeft;
|
|
QAction *m_actionAlignCenter;
|
|
QAction *m_actionAlignRight;
|
|
QAction *m_actionAlignJustify;
|
|
QAction *m_actionIndentLess;
|
|
QAction *m_actionIndentMore;
|
|
QAction *m_actionToggleCheckState;
|
|
QAction *m_actionUndo;
|
|
QAction *m_actionRedo;
|
|
#ifndef QT_NO_CLIPBOARD
|
|
QAction *m_actionCut;
|
|
QAction *m_actionCopy;
|
|
QAction *m_actionPaste;
|
|
#endif
|
|
|
|
QComboBox *m_comboStyle;
|
|
QAction *m_comboStyleAction;
|
|
QFontComboBox *m_comboFont;
|
|
QComboBox *m_comboSize;
|
|
|
|
QToolBar *m_tb;
|
|
QString m_fileName;
|
|
QTextEdit *m_textEdit;
|
|
};
|
|
|
|
}
|