mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 16:40:42 +08:00
41 lines
1.3 KiB
C++
41 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <QtWidgets/QWidget>
|
|
#include <QtGui/QTextCursor>
|
|
#include <QtCore/QString>
|
|
#include <QtCore/QSocketNotifier>
|
|
#include "ui_SeerConsoleWidget.h"
|
|
|
|
class SeerConsoleWidget : public QWidget, protected Ui::SeerConsoleWidgetForm {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SeerConsoleWidget (QWidget* parent = 0);
|
|
~SeerConsoleWidget ();
|
|
|
|
const QString& ttyDeviceName () const;
|
|
|
|
protected slots:
|
|
void handleClearButton ();
|
|
void handlePrintButton ();
|
|
void handleSaveButton ();
|
|
void handleWrapTextCheckBox ();
|
|
void handleStdinLineEdit ();
|
|
void handleConsoleOutput (int socketfd);
|
|
|
|
protected:
|
|
void handleText (const char* buffer, int count);
|
|
void createConsole ();
|
|
void connectConsole ();
|
|
void disconnectConsole ();
|
|
void deleteConsole ();
|
|
|
|
private:
|
|
QTextCursor _cursor;
|
|
QString _ttyDeviceName;
|
|
int _ptsFD;
|
|
QSocketNotifier* _ptsListener;
|
|
};
|
|
|