2022-06-22 11:37:38 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2020-06-24 09:07:32 +00:00
|
|
|
|
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
2020-07-07 09:10:53 +00:00
|
|
|
#include <QList>
|
2020-06-24 09:07:32 +00:00
|
|
|
#include <QMainWindow>
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QAction;
|
2020-07-09 10:14:40 +00:00
|
|
|
class QTextCodec;
|
2020-06-24 09:07:32 +00:00
|
|
|
class QPlainTextEdit;
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
class EncodingDialog;
|
|
|
|
class PreviewForm;
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
MainWindow();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void open();
|
|
|
|
void save();
|
|
|
|
void about();
|
|
|
|
void aboutToShowSaveAsMenu();
|
|
|
|
void encodingDialog();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void findCodecs();
|
|
|
|
void createMenus();
|
|
|
|
|
2020-07-07 09:10:53 +00:00
|
|
|
QList<QAction *> saveAsActs;
|
2020-06-24 09:07:32 +00:00
|
|
|
QPlainTextEdit *textEdit;
|
|
|
|
PreviewForm *previewForm;
|
2020-07-09 10:14:40 +00:00
|
|
|
QList<QTextCodec *> codecs;
|
2020-06-24 09:07:32 +00:00
|
|
|
EncodingDialog *m_encodingDialog = nullptr;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|