mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Implementing ExportCabrillo. Some work still to do.
(cherry picked from commit 1e5c416cc3
)
This commit is contained in:
parent
a221de3c9d
commit
b72e8bd846
@ -310,6 +310,7 @@ set (wsjtx_CXXSRCS
|
||||
main.cpp
|
||||
wsprnet.cpp
|
||||
WSPRBandHopping.cpp
|
||||
ExportCabrillo.cpp
|
||||
)
|
||||
|
||||
set (wsjt_CXXSRCS
|
||||
@ -649,6 +650,7 @@ set (wsjtx_UISRCS
|
||||
widegraph.ui
|
||||
logqso.ui
|
||||
Configuration.ui
|
||||
ExportCabrillo.ui
|
||||
)
|
||||
|
||||
set (UDP_library_CXXSRCS
|
||||
|
44
ExportCabrillo.cpp
Normal file
44
ExportCabrillo.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#include "ExportCabrillo.h"
|
||||
#include "ui_exportCabrillo.h"
|
||||
#include "SettingsGroup.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QFileDialog>
|
||||
|
||||
ExportCabrillo::ExportCabrillo(QSettings *settings, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
settings_ {settings},
|
||||
ui(new Ui::ExportCabrillo)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
read_settings();
|
||||
setWindowTitle(QApplication::applicationName() + " - Export Cabrillo");
|
||||
}
|
||||
|
||||
ExportCabrillo::~ExportCabrillo()
|
||||
{
|
||||
if (isVisible ()) write_settings();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ExportCabrillo::read_settings ()
|
||||
{
|
||||
SettingsGroup group {settings_, "ExportCabrillo"};
|
||||
restoreGeometry (settings_->value ("window/geometry").toByteArray ());
|
||||
}
|
||||
|
||||
void ExportCabrillo::write_settings ()
|
||||
{
|
||||
SettingsGroup group {settings_, "ExportCabrillo"};
|
||||
settings_->setValue ("window/geometry", saveGeometry ());
|
||||
}
|
||||
|
||||
void ExportCabrillo::on_pbSaveAs_clicked()
|
||||
{
|
||||
QString fname;
|
||||
QFileDialog saveAs(this);
|
||||
saveAs.setFileMode(QFileDialog::AnyFile);
|
||||
fname=saveAs.getSaveFileName(this, "Save File", "","Cabrillo Log (*.log)");
|
||||
qDebug() << "AA" << fname;
|
||||
}
|
29
ExportCabrillo.h
Normal file
29
ExportCabrillo.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef EXPORTCABRILLO_H
|
||||
#define EXPORTCABRILLO_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QSettings>
|
||||
|
||||
namespace Ui {
|
||||
class ExportCabrillo;
|
||||
}
|
||||
|
||||
class ExportCabrillo : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ExportCabrillo(QSettings *settings, QWidget *parent = 0);
|
||||
~ExportCabrillo();
|
||||
|
||||
private slots:
|
||||
void on_pbSaveAs_clicked();
|
||||
|
||||
private:
|
||||
QSettings * settings_;
|
||||
void read_settings();
|
||||
void write_settings();
|
||||
Ui::ExportCabrillo *ui;
|
||||
};
|
||||
|
||||
#endif // EXPORTCABRILLO_H
|
304
ExportCabrillo.ui
Normal file
304
ExportCabrillo.ui
Normal file
@ -0,0 +1,304 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ExportCabrillo</class>
|
||||
<widget class="QDialog" name="ExportCabrillo">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>330</width>
|
||||
<height>407</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Location:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="text">
|
||||
<string>SNJ</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Contest:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="text">
|
||||
<string>ARRL-RTTY</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Callsign:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Category-Operator: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_4">
|
||||
<property name="text">
|
||||
<string>SINGLE-OP</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Category-Transmitter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_5">
|
||||
<property name="text">
|
||||
<string>ONE</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Category-Power:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_6">
|
||||
<property name="text">
|
||||
<string>LOW</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Category-Assisted:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_7">
|
||||
<property name="text">
|
||||
<string>NON-ASSISTED</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Category-Band:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_8">
|
||||
<property name="text">
|
||||
<string>ALL</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Claimed-Score:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_9">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Operators:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_10">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Club:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_11">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_12">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_13">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>Address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_14">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pbSaveAs">
|
||||
<property name="text">
|
||||
<string>Save As</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>ExportCabrillo</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>ExportCabrillo</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
@ -5971,6 +5971,16 @@ void MainWindow::on_actionErase_cabrillo_log_triggered()
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_actionExport_Cabrillo_log_triggered()
|
||||
{
|
||||
if(!m_exportCabrillo) {
|
||||
m_exportCabrillo.reset(new ExportCabrillo{m_settings});
|
||||
}
|
||||
bool ret=m_exportCabrillo->exec();
|
||||
qDebug() << "aa" << ret;
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_actionErase_wsjtx_log_adi_triggered()
|
||||
{
|
||||
int ret = MessageBox::query_message (this, tr ("Confirm Erase"),
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "astro.h"
|
||||
#include "MessageBox.hpp"
|
||||
#include "NetworkAccessManager.hpp"
|
||||
#include "exportCabrillo.h"
|
||||
|
||||
#define NUM_JT4_SYMBOLS 206 //(72+31)*2, embedded sync
|
||||
#define NUM_JT65_SYMBOLS 126 //63 data + 63 sync
|
||||
@ -202,6 +203,7 @@ private slots:
|
||||
void on_actionErase_FoxQSO_txt_triggered();
|
||||
void on_actionErase_cabrillo_log_triggered();
|
||||
void on_actionErase_wsjtx_log_adi_triggered();
|
||||
void on_actionExport_Cabrillo_log_triggered();
|
||||
void startTx2();
|
||||
void startP1();
|
||||
void stopTx();
|
||||
@ -358,6 +360,7 @@ private:
|
||||
QScopedPointer<HelpTextWindow> m_mouseCmnds;
|
||||
QScopedPointer<MessageAveraging> m_msgAvgWidget;
|
||||
QScopedPointer<ColorHighlighting> m_colorHighlighting;
|
||||
QScopedPointer<ExportCabrillo> m_exportCabrillo;
|
||||
Transceiver::TransceiverState m_rigState;
|
||||
Frequency m_lastDialFreq;
|
||||
QString m_lastBand;
|
||||
|
@ -2637,6 +2637,8 @@ QPushButton[state="ok"] {
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionSettings"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionExport_Cabrillo_log"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionExit"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuView">
|
||||
@ -3321,6 +3323,11 @@ QPushButton[state="ok"] {
|
||||
<string>Contest Log</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionExport_Cabrillo_log">
|
||||
<property name="text">
|
||||
<string>Export Cabrillo log</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
@ -68,7 +68,7 @@ SOURCES += \
|
||||
WSPRBandHopping.cpp MessageAggregator.cpp SampleDownloader.cpp qt_helpers.cpp\
|
||||
MultiSettings.cpp PhaseEqualizationDialog.cpp IARURegions.cpp MessageBox.cpp \
|
||||
EqualizationToolsDialog.cpp CallsignValidator.cpp ExchangeValidator.cpp \
|
||||
colorhighlighting.cpp
|
||||
colorhighlighting.cpp ExportCabrillo.cpp
|
||||
|
||||
HEADERS += qt_helpers.hpp \
|
||||
pimpl_h.hpp pimpl_impl.hpp \
|
||||
@ -85,7 +85,7 @@ HEADERS += qt_helpers.hpp \
|
||||
messageaveraging.h echoplot.h echograph.h fastgraph.h fastplot.h Modes.hpp WSPRBandHopping.hpp \
|
||||
WsprTxScheduler.h SampleDownloader.hpp MultiSettings.hpp PhaseEqualizationDialog.hpp \
|
||||
IARURegions.hpp MessageBox.hpp EqualizationToolsDialog.hpp CallsignValidator.hpp \
|
||||
ExchangeValidator.hpp colorhighlighting.h
|
||||
ExchangeValidator.hpp colorhighlighting.h ExportCabrillo.h
|
||||
|
||||
|
||||
INCLUDEPATH += qmake_only
|
||||
@ -97,8 +97,7 @@ HEADERS += OmniRigTransceiver.hpp
|
||||
|
||||
FORMS += mainwindow.ui about.ui Configuration.ui widegraph.ui astro.ui \
|
||||
logqso.ui wf_palette_design_dialog.ui messageaveraging.ui echograph.ui \
|
||||
fastgraph.ui \
|
||||
colorhighlighting.ui
|
||||
fastgraph.ui colorhighlighting.ui ExportCabrillo.ui
|
||||
|
||||
RC_FILE = wsjtx.rc
|
||||
RESOURCES = wsjtx.qrc
|
||||
|
Loading…
Reference in New Issue
Block a user