2023-02-19 03:25:02 +00:00
|
|
|
#ifndef SETTINGSWIDGET_H
|
|
|
|
#define SETTINGSWIDGET_H
|
|
|
|
|
2023-02-19 18:39:05 +00:00
|
|
|
#include <QStandardItemModel>
|
2023-02-19 03:25:02 +00:00
|
|
|
#include <QWidget>
|
2023-02-20 06:11:48 +00:00
|
|
|
#include <QInputDialog>
|
2023-02-19 18:39:05 +00:00
|
|
|
#include <QFile>
|
2023-02-19 03:25:02 +00:00
|
|
|
#include <QSlider>
|
2023-02-19 07:26:58 +00:00
|
|
|
#include <QSpinBox>
|
2023-02-19 03:25:02 +00:00
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QRadioButton>
|
2023-02-19 07:26:58 +00:00
|
|
|
#include <QStringList>
|
2023-02-19 03:25:02 +00:00
|
|
|
|
|
|
|
#include "logcategories.h"
|
|
|
|
#include "prefs.h"
|
|
|
|
#include "colorprefs.h"
|
|
|
|
#include "udpbase.h" // for udp preferences
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class settingswidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
class settingswidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit settingswidget(QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
~settingswidget();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void acceptPreferencesPtr(preferences *pptr);
|
|
|
|
void acceptUdpPreferencesPtr(udpPreferences *upptr);
|
|
|
|
|
|
|
|
void updateIfPrefs(int items);
|
|
|
|
void updateRaPrefs(int items);
|
|
|
|
void updateCtPrefs(int items);
|
|
|
|
void updateLanPrefs(int items);
|
|
|
|
void updateClusterPrefs(int items);
|
|
|
|
|
|
|
|
void updateIfPref(prefIfItem pif);
|
|
|
|
void updateRaPref(prefRaItem pra);
|
|
|
|
void updateCtPref(prefCtItem pct);
|
|
|
|
void updateLanPref(prefLanItem plan);
|
|
|
|
void updateClusterPref(prefClusterItem pcl);
|
|
|
|
|
|
|
|
void updateUdpPref(udpPrefsItem upi);
|
|
|
|
void updateUdpPrefs(int items);
|
|
|
|
|
2023-02-19 07:26:58 +00:00
|
|
|
void updateAudioInputs(QStringList deviceList, int currentIndex, int chars);
|
|
|
|
void updateAudioOutputs(QStringList deviceList, int currentIndex, int chars);
|
|
|
|
void updateServerRXAudioInputs(QStringList deviceList, int currentIndex, int chars);
|
|
|
|
void updateServerTXAudioOutputs(QStringList deviceList, int currentIndex, int chars);
|
|
|
|
|
2023-02-19 07:51:01 +00:00
|
|
|
void updateSerialPortList(QStringList deviceList, QVector<int> data);
|
2023-02-19 18:39:05 +00:00
|
|
|
void updateVSPList(QStringList deviceList, QVector<int> data);
|
|
|
|
|
2023-02-19 03:25:02 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
// Not sure if we should do it this way,
|
|
|
|
// since many of these changes are not thought
|
|
|
|
// of as merely "preferences"... although they generally are...
|
|
|
|
// ...hmm
|
2023-02-20 02:29:22 +00:00
|
|
|
void changedIfPrefs(int items);
|
|
|
|
void changedRaPrefs(int items);
|
2023-02-19 03:25:02 +00:00
|
|
|
void changedCtPrefs(int items);
|
|
|
|
void changedLanPrefs(int items);
|
|
|
|
void changedClusterPrefs(int items);
|
2023-02-20 02:29:22 +00:00
|
|
|
void changedUdpPrefs(int items);
|
|
|
|
|
|
|
|
void changedIfPref(prefIfItem i);
|
|
|
|
void changedRaPref(prefRaItem i);
|
|
|
|
void changedCtPref(prefCtItem i);
|
|
|
|
void changedLanPref(prefLanItem i);
|
|
|
|
void changedClusterPref(prefClusterItem i);
|
|
|
|
void changedUdpPref(udpPrefsItem i);
|
2023-02-19 03:25:02 +00:00
|
|
|
|
2023-02-20 06:11:48 +00:00
|
|
|
void showUSBControllerSetup();
|
|
|
|
|
2023-02-19 03:25:02 +00:00
|
|
|
private slots:
|
|
|
|
void on_settingsList_currentRowChanged(int currentRow);
|
|
|
|
|
|
|
|
void on_lanEnableBtn_clicked(bool checked);
|
|
|
|
|
2023-02-19 07:26:58 +00:00
|
|
|
void on_autoSSBchk_clicked(bool checked);
|
|
|
|
|
2023-02-20 02:29:22 +00:00
|
|
|
void on_useSystemThemeChk_clicked(bool checked);
|
|
|
|
|
2023-02-20 06:11:48 +00:00
|
|
|
void on_enableUsbChk_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_usbControllerBtn_clicked();
|
|
|
|
|
|
|
|
void on_autoPollBtn_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_manualPollBtn_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_pollTimeMsSpin_valueChanged(int arg1);
|
|
|
|
|
|
|
|
void on_serialDeviceListCombo_activated(const QString &arg1);
|
|
|
|
|
|
|
|
void on_baudRateCombo_activated(int index);
|
|
|
|
|
|
|
|
void on_vspCombo_activated(int index);
|
|
|
|
|
|
|
|
void on_audioSystemCombo_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_audioSystemServerCombo_currentIndexChanged(int index);
|
|
|
|
|
2023-02-20 06:34:42 +00:00
|
|
|
void on_meter2selectionCombo_currentIndexChanged(int index);
|
|
|
|
|
2023-02-20 07:12:36 +00:00
|
|
|
void on_tuningFloorZerosChk_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_fullScreenChk_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_wfAntiAliasChk_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_wfInterpolateChk_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_underlayNone_clicked(bool checked);
|
|
|
|
|
|
|
|
|
|
|
|
void on_underlayPeakHold_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_underlayPeakBuffer_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_underlayAverageBuffer_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_underlayBufferSlider_valueChanged(int value);
|
|
|
|
|
|
|
|
void on_pttEnableChk_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_clickDragTuningEnableChk_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_serialEnableBtn_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_enableRigctldChk_clicked(bool checked);
|
|
|
|
|
|
|
|
void on_rigctldPortTxt_editingFinished();
|
|
|
|
|
|
|
|
void on_tcpServerPortTxt_editingFinished();
|
|
|
|
|
2023-02-19 03:25:02 +00:00
|
|
|
private:
|
|
|
|
Ui::settingswidget *ui;
|
|
|
|
void createSettingsListItems();
|
|
|
|
void populateComboBoxes();
|
|
|
|
void updateAllPrefs();
|
|
|
|
void updateUnderlayMode();
|
|
|
|
void quietlyUpdateSlider(QSlider* sl, int val);
|
2023-02-19 07:26:58 +00:00
|
|
|
void quietlyUpdateSpinbox(QSpinBox *sb, int val);
|
2023-02-19 03:25:02 +00:00
|
|
|
void quietlyUpdateCheckbox(QCheckBox *cb, bool isChecked);
|
|
|
|
void quietlyUpdateRadiobutton(QRadioButton *rb, bool isChecked);
|
|
|
|
|
|
|
|
preferences *prefs = NULL;
|
|
|
|
udpPreferences *udpPrefs = NULL;
|
|
|
|
bool havePrefs = false;
|
|
|
|
bool haveUdpPrefs = false;
|
2023-02-19 07:26:58 +00:00
|
|
|
bool haveSerialDevices = false;
|
2023-02-19 18:39:05 +00:00
|
|
|
bool haveVspDevices = false;
|
2023-02-19 07:26:58 +00:00
|
|
|
bool haveAudioInputs = false;
|
|
|
|
bool haveAudioOutputs = false;
|
|
|
|
bool haveServerAudioInputs = false;
|
|
|
|
bool haveServerAudioOutputs = false;
|
2023-02-19 03:25:02 +00:00
|
|
|
bool updatingUIFromPrefs = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SETTINGSWIDGET_H
|