Navigation Menu

Skip to content

Commit

Permalink
[+] gui refactor + add tune form (blank)
Browse files Browse the repository at this point in the history
  • Loading branch information
amungo committed Jul 20, 2017
1 parent 3f0c597 commit bec3639
Show file tree
Hide file tree
Showing 10 changed files with 237 additions and 200 deletions.
9 changes: 6 additions & 3 deletions ItsFx3.pro
Expand Up @@ -65,7 +65,8 @@ SOURCES += main.cpp \
datastreams/singleevent.cpp \
gcacorr/etalometrfile.cpp \
hwfx3/fx3devifce.cpp \
hwfx3/fx3tuner.cpp
hwfx3/fx3tuner.cpp \
tuneform.cpp

HEADERS += itsmain.h \
hwfx3/FX3Dev.h \
Expand Down Expand Up @@ -139,14 +140,16 @@ HEADERS += itsmain.h \
datastreams/singleevent.h \
gcacorr/etalometrfile.h \
hwfx3/fx3commands.h \
hwfx3/fx3tuner.h
hwfx3/fx3tuner.h \
tuneform.h

FORMS += itsmain.ui \
rawsignalform.ui \
dialogconfig.ui \
gpscorrform.ui \
SpectrumForm.ui \
phaseform.ui
phaseform.ui \
tuneform.ui

INCLUDEPATH += $$PWD/fftw_inc

Expand Down
3 changes: 3 additions & 0 deletions hwmanager.cpp
Expand Up @@ -52,6 +52,7 @@ void HWManager::initHardware(DriverType_t drvType, const char* imageFileName , c
QString msg( "Device init error " );
msg += fx3_get_error_string( FX3_ERR_DRV_NOT_IMPLEMENTED );
emit informInitHWStatus( false, msg );;
emit newDevicePointer( nullptr );
return;
}

Expand All @@ -63,10 +64,12 @@ void HWManager::initHardware(DriverType_t drvType, const char* imageFileName , c
QString msg( "Device init error " );
msg += fx3_get_error_string( init_error );
emit informInitHWStatus( false, msg );
emit newDevicePointer( nullptr );

closeHardware();
} else {
emit informInitHWStatus( true, QString("Device was inited!") );
emit newDevicePointer( dev );
}
}

Expand Down
1 change: 1 addition & 0 deletions hwmanager.h
Expand Up @@ -34,6 +34,7 @@ public slots:
void getDebugInfo();

signals:
void newDevicePointer( FX3DevIfce* );
void informInitHWStatus( bool, QString );
void informCloseHWStatus( bool, QString );
void informStartHWStatus( bool, QString );
Expand Down
7 changes: 7 additions & 0 deletions itsmain.cpp
Expand Up @@ -34,6 +34,7 @@ ItsMain::ItsMain(FX3Config* cfg, QWidget *parent) :
QObject::connect(ui->buttonSpectrumForm, SIGNAL(clicked(bool)), this, SLOT(onSpectrumForm(bool)));
QObject::connect(ui->buttonPhaseForm, SIGNAL(clicked(bool)), this, SLOT(onPhaseForm(bool)));
QObject::connect(ui->buttonDeveloperCall, SIGNAL(clicked(bool)), this, SLOT(onButtonCallDeveloperFun(bool)));
QObject::connect(ui->buttonTuneForm, SIGNAL(clicked(bool)), this, SLOT(onTuneForm(bool)));

att.Clear();
att.AddBit(0, 4);
Expand Down Expand Up @@ -206,6 +207,12 @@ void ItsMain::onPhaseForm(bool) {
}
}

void ItsMain::onTuneForm(bool) {
if ( tuneForm ) {
tuneForm->show();
}
}

void ItsMain::hardwareInitStatus(bool hw_init_status, QString log_message ) {
AddHWLog( log_message );
SetHWButtonsGrey();
Expand Down
2 changes: 2 additions & 0 deletions itsmain.h
Expand Up @@ -23,6 +23,7 @@ class ItsMain : public QMainWindow
QWidget* gpsForm;
QWidget* specForm;
QWidget* phaseForm;
QWidget* tuneForm;
private:
Ui::ItsMain *ui;
QTimer* timer;
Expand Down Expand Up @@ -52,6 +53,7 @@ private slots:
void onGPSForm(bool);
void onSpectrumForm(bool);
void onPhaseForm(bool);
void onTuneForm(bool);
public slots:
void hardwareInitStatus( bool hw_init_status, QString log_message );
void hardwareCloseStatus( bool hw_close_status, QString log_message );
Expand Down

0 comments on commit bec3639

Please sign in to comment.