-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaterm.h
74 lines (67 loc) · 2.29 KB
/
paterm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// ----------------------------------------------------------------------------
// Copyright (C) 2019 GrizzWorks, LLC
// ALL RIGHTS RESERVED
//
// This file is part of radcommlink software project under the GNU GPLv3
// license.
//
// radcommlink is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// Parts of radcommlink may contain source code from Open Source projects.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef PATERM_H
#define PATERM_H
#include <QMainWindow>
#include <QProcess>
#include <QSerialPort>
#include <QFileSystemModel>
#include <QSettings>
QT_BEGIN_NAMESPACE
namespace Ui { class PATerm; }
QT_END_NAMESPACE
class PATerm : public QMainWindow
{
Q_OBJECT
public:
PATerm(QWidget *parent = nullptr);
~PATerm();
void closeEvent(QCloseEvent *event);
private slots:
void on_actionE_xit_triggered();
void on_lineEdit_returnPressed();
void on_readyRead();
bool eventFilter(QObject *obj, QEvent *event);
void slot_showMsgQueueContextMenu(const QPoint &pos);
void on_msgDeleteButton_clicked();
void on_msgQueueTreeView_clicked(const QModelIndex &index);
QString loadStringFromFile(const QString filename);
void on_action_Compose_triggered();
void on_connectButton_clicked();
void on_clearButton_clicked();
void on_action_Station_List_triggered();
void on_action_Update_Station_List_triggered();
void expandAll();
void on_actionGetting_Started_triggered();
void on_action_About_PATerm_triggered();
void on_abortButton_clicked();
void on_msgArchiveButton_clicked();
private:
Ui::PATerm *ui;
QFileSystemModel *queue = nullptr;
QSettings *settings = nullptr;
QProcess *shell = nullptr;
QSerialPort *ptc = nullptr;
const QByteArray CRLF = QByteArrayLiteral("\r\n");
const QByteArray LF = QByteArrayLiteral("\n");
const QByteArray BG = QByteArrayLiteral(" &");
const QByteArray KILLPAT = QByteArrayLiteral("killall pat");
QString lastCmd;
bool b_connectMode = false;
void saveSettings();
};
#endif // PATERM_H