2017-12-06 03:31:43 +00:00
|
|
|
#ifndef MAINWINDOW_HPP
|
|
|
|
#define MAINWINDOW_HPP
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QProcess>
|
|
|
|
#include <memory>
|
2017-12-26 04:27:18 +00:00
|
|
|
#include "DownloadManager.hpp"
|
2017-12-27 00:48:34 +00:00
|
|
|
#include "Common.hpp"
|
2017-12-06 03:31:43 +00:00
|
|
|
class QTextEdit;
|
|
|
|
class QTextCharFormat;
|
2017-12-27 00:48:34 +00:00
|
|
|
class QPushButton;
|
2017-12-06 03:31:43 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Ui::MainWindow* m_ui;
|
|
|
|
QString m_ansiString;
|
|
|
|
QString m_path;
|
2018-01-02 00:58:38 +00:00
|
|
|
QString m_urdePath;
|
|
|
|
QString m_heclPath;
|
2017-12-06 03:31:43 +00:00
|
|
|
QProcess m_heclProc;
|
2017-12-26 04:27:18 +00:00
|
|
|
DownloadManager m_dlManager;
|
2017-12-27 00:48:34 +00:00
|
|
|
QSettings m_settings;
|
|
|
|
URDEVersion m_recommendedVersion;
|
|
|
|
QPushButton* m_updateURDEButton;
|
2018-01-02 00:58:38 +00:00
|
|
|
bool m_inContinueNote = false;
|
2017-12-06 03:31:43 +00:00
|
|
|
public:
|
|
|
|
explicit MainWindow(QWidget *parent = 0);
|
|
|
|
~MainWindow();
|
2018-01-02 00:58:38 +00:00
|
|
|
void setTextTermFormatting(const QString& text);
|
|
|
|
void insertContinueNote(const QString& text);
|
2017-12-28 05:27:41 +00:00
|
|
|
void parseEscapeSequence(int attribute, QListIterator<QString>& i, QTextCharFormat& textCharFormat,
|
|
|
|
const QTextCharFormat& defaultTextCharFormat);
|
2017-12-06 03:31:43 +00:00
|
|
|
private slots:
|
|
|
|
void onExtract();
|
2018-01-02 00:58:38 +00:00
|
|
|
void onExtractFinished(int exitCode);
|
|
|
|
void onPackage();
|
|
|
|
void onPackageFinished(int exitCode);
|
|
|
|
void onLaunch();
|
|
|
|
void onLaunchFinished(int exitCode);
|
|
|
|
void doHECLTerminate();
|
2017-12-06 03:31:43 +00:00
|
|
|
void onReturnPressed();
|
2017-12-27 00:48:34 +00:00
|
|
|
void onDownloadPressed();
|
|
|
|
void onUpdateURDEPressed();
|
2017-12-06 03:31:43 +00:00
|
|
|
private:
|
2018-01-02 00:58:38 +00:00
|
|
|
bool checkDownloadedBinary();
|
2017-12-27 00:48:34 +00:00
|
|
|
void setPath(const QString& path);
|
2017-12-06 03:31:43 +00:00
|
|
|
void initSlots();
|
2017-12-26 04:27:18 +00:00
|
|
|
void onIndexDownloaded(const QStringList& index);
|
|
|
|
void onBinaryDownloaded(const QString& file);
|
2018-01-02 00:58:38 +00:00
|
|
|
void onBinaryFailed(const QString& file);
|
|
|
|
void disableOperations();
|
|
|
|
void enableOperations();
|
2017-12-06 03:31:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_HPP
|