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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
|
#ifndef TXWIDGET_H
#define TXWIDGET_H
#include "imageviewer.h"
#include "sstvparam.h"
#include "txfunctions.h"
#include "drmtransmitter.h"
#include "ui_txwidget.h"
#include "ftpfunctions.h"
#include "qglobal.h"
#include <QWidget>
enum etxMode {TXUPLOAD,TXBINARY,TXNORMAL};
#define NOTIFYCHECKINTERVAL 15*1000
#define NUMBEROFNOTIFYCHECKS 4
//#define DRMMAXSIZE 100000
//#define DRMMINSIZE 3000
class drmTransmitter;
namespace Ui {
class txWidget;
}
class txWidget : public QWidget
{
Q_OBJECT
public:
explicit txWidget(QWidget *parent = 0);
~txWidget();
void init();
// void startTX(bool st, bool check=true);
void prepareTx();
void prepareTxComplete(bool ok);
void writeSettings();
void readSettings();
imageViewer *getImagePtr();
// void repeat(QImage *im,esstvMode sm);
void sendRepeaterImage(esstvMode rxMode=NOTVALID);
void setImage(QImage *ima);
void setImage(QString fn);
void setProgress(uint prg);
void setupTemplatesComboBox();
void setPreviewWidget(QString fn);
void setSettingsTab();
txFunctions *functionsPtr() {return txFunctionsPtr;}
imageViewer *getImageViewerPtr(){ return imageViewerPtr;}
QString getPreviewFilename();
void txTestPattern(etpSelect sel);
void startNotifyCheck(QString tmask);
void setDRMNotifyText(QString txt)
{
ui->txNotificationList->setPlainText(txt);
}
void appendDRMNotifyText(QString txt)
{
ui->txNotificationList->appendPlainText(txt);
}
// bool prepareHybrid(QString fn);
bool prepareText(QString txt);
void copyProfile(drmTxParams d);
void setProfileNames();
void reloadProfiles();
void changeTransmissionMode(int rxtxMode);
// void test();
// void sendFIX();
void sendBSR();
void sendWfText();
void sendWFID();
void sendCWID();
public slots:
void slotGetTXParams();
void slotGetParams();
void slotStart();
void slotUpload();
void slotStop();
// void slotDisplayStatusMessage(QString);
void slotGenerateSignal();
void slotSweepSignal();
void slotGenerateRepeaterTone();
void slotEdit();
// void slotReplay();
void slotRepeaterTimer();
void slotFileOpen();
void slotSnapshot();
void slotSize(int fsize);
void slotSizeApply();
void slotTransmissionMode(int rxtxMode);
void slotProfileChanged(int );
void slotModeChanged(int);
void slotResizeChanged(int);
void slotBinary();
void slotHybridToggled();
void slotNotifyTimeout();
void slotListingDone(bool err);
private slots:
void slotRepaterDelay();
void slotImageChanged();
signals:
void modeSwitch(int);
private:
void initView();
void setParams();
void sendHybrid(QString fn);
void applyTemplate();
void updateTxTime();
void startTxImage();
void enableButtons(bool enable);
Ui::txWidget *ui;
txFunctions *txFunctionsPtr;
editor *ed;
QTimer *repeaterTimer;
QTimer repeaterTxDelayTimer;
int repeaterIndex;
QImage origImage;
QImage resultImage;
imageViewer *imageViewerPtr;
etransmissionMode currentTXMode;
uint maxSize;
uint compressedSize;
bool sizeChanged;
int drmProfileIdx;
QString previewFilename;
etxMode doTx;
ftpFunctions ff;
QTimer notifyTimer;
int numberOfNotifyChecks;
QString mask;
esstvMode txMode;
bool notifyBusy;
bool repeaterIdleImage;
float fileSize;
};
#endif // TXWIDGET_H
|