---
This commit is contained in:
66
mainwindow.h
66
mainwindow.h
@@ -1,7 +1,12 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QUdpSocket>
|
||||
#include <QMainWindow>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "RecordQuery.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
@@ -9,6 +14,20 @@ class MainWindow;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
||||
enum class CallStatus{
|
||||
Idle,
|
||||
Calling,
|
||||
Incoming,
|
||||
Talking,
|
||||
};
|
||||
|
||||
|
||||
class QPolarChart;
|
||||
class QChart;
|
||||
class QBarCategoryAxis;
|
||||
class QValueAxis;
|
||||
class QTableWidgetItem;
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -16,8 +35,55 @@ class MainWindow : public QMainWindow
|
||||
public:
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
private slots:
|
||||
void on_rdbChannelUHF_clicked();
|
||||
|
||||
void on_rdbChannelS_clicked();
|
||||
|
||||
void on_rdbChannelBeiDou_clicked();
|
||||
|
||||
void on_rdbChannelAuto_clicked();
|
||||
|
||||
void on_btnCallAnswer_clicked();
|
||||
|
||||
void on_btnCallReject_clicked();
|
||||
|
||||
void on_btnSendMessage_clicked();
|
||||
|
||||
void on_btnRecordQuery_clicked();
|
||||
|
||||
void on_tblMessageList_currentItemChanged(QTableWidgetItem *current, QTableWidgetItem *previous);
|
||||
|
||||
private:
|
||||
void createBeiDouSignalStrengthChart();
|
||||
void createAzimuthMapChart();
|
||||
void setSignalStrengthValues(const QStringList& categories,const QList<qreal> &yValues);
|
||||
void setAzimuthValues(const QList<QPointF> &points);
|
||||
//-------------------------------------------------
|
||||
// 消息列表操作
|
||||
//-------------------------------------------------
|
||||
void UpdateMessageList();
|
||||
//-------------------------------------------------
|
||||
// 与底层消息交互
|
||||
//-------------------------------------------------
|
||||
bool sendUdpMessage(const QByteArray &udpMessage);
|
||||
bool call(const QString& number);
|
||||
bool hangUpCall();
|
||||
bool acceptCall();
|
||||
bool rejectCall();
|
||||
bool sendShortMessage(const QString &number,const QString& message);
|
||||
|
||||
void test();
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
CallStatus m_callStatus = CallStatus::Idle;
|
||||
std::shared_ptr<QUdpSocket> m_udpSocket;
|
||||
std::shared_ptr<RecordQuery> m_recordQueryWidget;
|
||||
QChart* m_signalStrengthChart;
|
||||
QPolarChart* m_azimuthChart;
|
||||
QBarCategoryAxis* m_signalStrengthChartXAxis;
|
||||
QValueAxis* m_signalStrengthChartYAxis;
|
||||
|
||||
std::vector<Record> m_msgList;
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user