2012-05-22 13:09:48 -04:00
|
|
|
#ifndef DEVSETUP_H
|
|
|
|
#define DEVSETUP_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2013-03-24 08:55:13 -04:00
|
|
|
#include <QProcess>
|
|
|
|
#include <QMessageBox>
|
2012-05-22 13:09:48 -04:00
|
|
|
#include "ui_devsetup.h"
|
2013-04-30 14:54:11 -04:00
|
|
|
#include "rigclass.h"
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
class DevSetup : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
DevSetup(QWidget *parent=0);
|
|
|
|
~DevSetup();
|
|
|
|
|
|
|
|
void initDlg();
|
2013-03-25 15:13:49 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
qint32 m_idInt;
|
2013-03-24 08:55:13 -04:00
|
|
|
qint32 m_pttMethodIndex;
|
2013-05-20 14:33:06 -04:00
|
|
|
qint32 m_pttPort;
|
2012-05-22 13:09:48 -04:00
|
|
|
qint32 m_nDevIn;
|
|
|
|
qint32 m_nDevOut;
|
|
|
|
qint32 m_inDevList[100];
|
|
|
|
qint32 m_outDevList[100];
|
|
|
|
qint32 m_paInDevice;
|
|
|
|
qint32 m_paOutDevice;
|
2013-03-24 08:55:13 -04:00
|
|
|
qint32 m_catPortIndex;
|
|
|
|
qint32 m_rig;
|
|
|
|
qint32 m_rigIndex;
|
|
|
|
qint32 m_serialRate;
|
|
|
|
qint32 m_serialRateIndex;
|
|
|
|
qint32 m_dataBits;
|
|
|
|
qint32 m_dataBitsIndex;
|
|
|
|
qint32 m_stopBits;
|
|
|
|
qint32 m_stopBitsIndex;
|
|
|
|
qint32 m_handshakeIndex;
|
2013-04-24 13:55:33 -04:00
|
|
|
qint32 m_test;
|
2013-04-30 10:34:45 -04:00
|
|
|
qint32 m_poll;
|
2013-05-20 14:33:06 -04:00
|
|
|
qint32 m_tmp;
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
bool m_restartSoundIn;
|
|
|
|
bool m_restartSoundOut;
|
2013-03-09 21:45:12 -05:00
|
|
|
bool m_pskReporter;
|
2013-03-13 14:47:34 -04:00
|
|
|
bool m_firstCall;
|
2013-03-24 08:55:13 -04:00
|
|
|
bool m_catEnabled;
|
2013-03-24 21:24:47 -04:00
|
|
|
bool m_After73;
|
2013-04-23 16:46:04 -04:00
|
|
|
bool m_bRigOpen;
|
2013-07-23 13:32:59 -04:00
|
|
|
bool m_bDTR;
|
|
|
|
bool m_bRTS;
|
2013-04-25 18:57:08 -04:00
|
|
|
bool m_pttData;
|
2013-07-08 09:17:22 -04:00
|
|
|
bool m_bSplit;
|
|
|
|
bool m_bXIT;
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
QString m_myCall;
|
|
|
|
QString m_myGrid;
|
|
|
|
QString m_saveDir;
|
|
|
|
QString m_azelDir;
|
2013-03-24 08:55:13 -04:00
|
|
|
QString m_catPort;
|
|
|
|
QString m_handshake;
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2013-03-21 18:58:16 -04:00
|
|
|
QStringList m_macro;
|
2013-07-23 06:28:22 -04:00
|
|
|
QStringList m_dFreq; // per band frequency in MHz as a string
|
|
|
|
QStringList m_antDescription; // per band antenna description
|
|
|
|
QStringList m_bandDescription; // per band description
|
2013-03-21 18:58:16 -04:00
|
|
|
|
2013-03-24 08:55:13 -04:00
|
|
|
QProcess p4;
|
|
|
|
QMessageBox msgBox0;
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
public slots:
|
|
|
|
void accept();
|
2013-05-07 14:19:15 -04:00
|
|
|
void reject();
|
2013-03-24 08:55:13 -04:00
|
|
|
void p4ReadFromStdout();
|
|
|
|
void p4ReadFromStderr();
|
|
|
|
void p4Error();
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2012-11-24 11:30:39 -05:00
|
|
|
private slots:
|
|
|
|
void on_myCallEntry_editingFinished();
|
|
|
|
void on_myGridEntry_editingFinished();
|
2013-03-09 21:45:12 -05:00
|
|
|
void on_cbPSKReporter_clicked(bool checked);
|
2013-03-24 08:55:13 -04:00
|
|
|
void on_pttMethodComboBox_activated(int index);
|
|
|
|
void on_catPortComboBox_activated(int index);
|
|
|
|
void on_cbEnableCAT_toggled(bool checked);
|
|
|
|
void on_serialRateComboBox_activated(int index);
|
|
|
|
void on_handshakeComboBox_activated(int index);
|
2013-07-23 13:32:59 -04:00
|
|
|
void on_handshakeComboBox_currentIndexChanged(int index);
|
2013-03-24 08:55:13 -04:00
|
|
|
void on_dataBitsComboBox_activated(int index);
|
|
|
|
void on_stopBitsComboBox_activated(int index);
|
|
|
|
void on_rigComboBox_activated(int index);
|
2013-03-24 21:24:47 -04:00
|
|
|
void on_cbID73_toggled(bool checked);
|
2013-04-23 16:46:04 -04:00
|
|
|
void on_testCATButton_clicked();
|
|
|
|
void on_testPTTButton_clicked();
|
2013-07-23 13:32:59 -04:00
|
|
|
void on_DTRCheckBox_toggled(bool checked);
|
|
|
|
void on_RTSCheckBox_toggled(bool checked);
|
2013-04-25 18:57:08 -04:00
|
|
|
void on_rbData_toggled(bool checked);
|
2013-04-30 10:34:45 -04:00
|
|
|
void on_pollSpinBox_valueChanged(int n);
|
2013-05-20 14:33:06 -04:00
|
|
|
void on_pttComboBox_currentIndexChanged(int index);
|
|
|
|
void on_pttMethodComboBox_currentIndexChanged(int index);
|
2013-05-02 20:04:44 -04:00
|
|
|
|
2013-07-08 09:17:22 -04:00
|
|
|
void on_cbSplit_toggled(bool checked);
|
|
|
|
|
|
|
|
void on_cbXIT_toggled(bool checked);
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
private:
|
2013-04-24 15:41:58 -04:00
|
|
|
Rig* rig;
|
2013-03-24 08:55:13 -04:00
|
|
|
void msgBox(QString t);
|
2013-07-23 06:28:22 -04:00
|
|
|
void setEnableAntennaDescriptions(bool enable);
|
2013-05-21 20:31:53 -04:00
|
|
|
void enableWidgets();
|
2013-07-08 15:57:01 -04:00
|
|
|
void openRig();
|
2012-05-22 13:09:48 -04:00
|
|
|
Ui::DialogSndCard ui;
|
|
|
|
};
|
|
|
|
|
2013-05-20 14:33:06 -04:00
|
|
|
extern int ptt(int nport, int ntx, int* iptt, int* nopen);
|
2013-04-24 15:41:58 -04:00
|
|
|
|
2013-05-21 21:02:07 -04:00
|
|
|
#ifdef WIN32
|
2013-05-21 15:49:41 -04:00
|
|
|
extern "C" {
|
2013-05-23 13:25:52 -04:00
|
|
|
bool HRDInterfaceConnect(const wchar_t *host, const ushort);
|
2013-05-21 15:49:41 -04:00
|
|
|
void HRDInterfaceDisconnect();
|
2013-05-23 13:25:52 -04:00
|
|
|
bool HRDInterfaceIsConnected();
|
|
|
|
wchar_t* HRDInterfaceSendMessage(const wchar_t *msg);
|
2013-05-21 15:49:41 -04:00
|
|
|
void HRDInterfaceFreeString(const wchar_t *lstring);
|
|
|
|
}
|
2013-05-21 21:02:07 -04:00
|
|
|
#endif
|
2013-05-21 15:49:41 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
#endif // DEVSETUP_H
|