Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Edited some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MPIBR-kretschmerf committed Oct 18, 2016
1 parent 7f9c3ec commit 708c53f
Showing 5 changed files with 5 additions and 31 deletions.
9 changes: 0 additions & 9 deletions Mainwindow.cpp
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ MainWindow::MainWindow(QWidget *parent) :
ui(new Ui::MainWindow)

{

ui->setupUi(this);

/*Load defaults from settings*/
@@ -52,7 +51,6 @@ MainWindow::~MainWindow()
delete ui;
}


void MainWindow::on_pushButton_Run_clicked()
{
ui->pushButton_Run->setDisabled(true);
@@ -115,19 +113,14 @@ void MainWindow::on_pushButton_Stop_clicked()
ui->pushButton_Run->setDisabled(false);
ui->pushButton_Pause->setChecked(false);
ui->pushButton_Pause->setText("Pause");

}



void MainWindow::on_pushButton_selectOutputFolder_clicked()
{

selectedDirectory = QFileDialog::getExistingDirectory(this, tr("Select Directory"),
appSettings.value(DEFAULT_DIR_KEY).toString(),
QFileDialog::ShowDirsOnly
| QFileDialog::DontResolveSymlinks);

if (!selectedDirectory.isEmpty()) {
QDir currentDir;
// remember this directory next time the selector is opened
@@ -136,8 +129,6 @@ void MainWindow::on_pushButton_selectOutputFolder_clicked()

ui->lineEdit_outputFolder->setText(selectedDirectory);
}


}

void MainWindow::on_checkBox_autoFilename_clicked(bool checked)
5 changes: 0 additions & 5 deletions Mainwindow.h
Original file line number Diff line number Diff line change
@@ -20,9 +20,6 @@ class MainWindow : public QMainWindow
{
Q_OBJECT

// the state property that reflects whether the traffic light is currently paused
//Q_PROPERTY(bool paused READ paused WRITE setPaused NOTIFY pausedChanged)

public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
@@ -53,9 +50,7 @@ private slots:
void updateIti();
const double userReaction = 30; //sec

// default directory
const QString DEFAULT_DIR_KEY = "/home";
// Application settings to store last used directory for select dialog
QSettings appSettings;
TimerDialog *timerDialog;

1 change: 0 additions & 1 deletion StateMachineController.cpp
Original file line number Diff line number Diff line change
@@ -209,7 +209,6 @@ void StateMachineController::onStateSoundEntered()
emit(writeToLogFile("EXIT",0,0,timeString));
emit(closeLogFile());
}

}

void StateMachineController::onStatePauseEntered()
17 changes: 4 additions & 13 deletions StateMachineController.h
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
#include <QState>
#include <QHistoryState>
#include <QDebug>
#include <QAxObject>
#include <QTime>

#include <ctime>
@@ -18,10 +17,8 @@
#include "TimerDialog.h"
#include "NIDAQmxInterface.h"
#include "TDTInterface.h"
#include "LogFileWriter.h"

//#include "TDTInterface.h"
#include "rpcoxlib.h"
#include "LogFileWriter.h"

class StateMachineController : public QObject
{
@@ -36,26 +33,22 @@ class StateMachineController : public QObject
void stopStateMachine();

private:
// state machine
QStateMachine *stateMachine;
QStateMachine *stateMachine; /* state machine */
QState *state_preDelay;
QState *state_iti;
QState *state_userReaction;
QState *state_acquisitionBaseline;
QState *state_sound;

// the timer that triggers the state changes
QTimer *mainTimer;
QTimer *mainTimer; /*the timer that triggers the state changes*/
TimerDialog *timerDialog;

//RPCOXLib::RPcoX* rp;
NIDAQmxInterface* nidaq;
TDTInterface* tdt;
QThread* logFileThread;
LogFileWriter* logFileWriter;

int trialsTotal = -1;
int trialsCurrent = -1; // is gonna be 1-based, so first trial has index 1
int trialsCurrent = -1; /* is gonna be 1-based, so first trial has index 1 */

private slots:
void onStatePreDelayEntered();
@@ -75,8 +68,6 @@ private slots:
void openLogFile(QString fileName);
void closeLogFile();
void writeToLogFile(QString text, uint id, uint counter, QString stringTime);


};

#endif // STATEMACHINECONTROLLER_H
4 changes: 1 addition & 3 deletions TDTInterface.h
Original file line number Diff line number Diff line change
@@ -13,13 +13,11 @@ class TDTInterface
static const int TDT_STATUS_CIRCUIT_LOADED = 0x02;
static const int TDT_STATUS_CIRCUIT_RUNNING = 0x04;

///* funciton prototypes */
/* funciton prototypes */
void initializeInterface();
void loadRCXCircuit(QString fileName);
void destroyInterface();

/* global variables */
//RPCOXLib::RPcoX* rp;
RPCOXLib::RPcoX rp;
HRESULT hr;
long int tdt_status;

0 comments on commit 708c53f

Please sign in to comment.