mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-30 17:24:56 +01:00
Version 1 with the action tab working
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@6 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
@@ -9,8 +9,11 @@
|
||||
/** Project Class Headers */
|
||||
#include "slsDetector.h"
|
||||
#include "multiSlsDetector.h"
|
||||
/** Qt Include Headers */
|
||||
#include <QFileDialog>
|
||||
/** C++ Include Headers */
|
||||
#include<iostream>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -18,7 +21,8 @@ using namespace std;
|
||||
|
||||
|
||||
|
||||
qTabDataOutput::qTabDataOutput(QWidget *parent,slsDetectorUtils*& detector):QWidget(parent),myDet(detector){
|
||||
qTabDataOutput::qTabDataOutput(QWidget *parent,slsDetectorUtils*& detector):
|
||||
QWidget(parent),myDet(detector){
|
||||
setupUi(this);
|
||||
if(myDet)
|
||||
{
|
||||
@@ -38,18 +42,39 @@ qTabDataOutput::~qTabDataOutput(){
|
||||
|
||||
|
||||
void qTabDataOutput::SetupWidgetWindow(){
|
||||
outputDir= QString(myDet->getFilePath().c_str());
|
||||
dispOutputDir->setText(outputDir);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void qTabDataOutput::Initialization(){
|
||||
connect(dispOutputDir, SIGNAL(textChanged(const QString&)), this, SLOT(setOutputDir(const QString&)));
|
||||
connect(btnOutputBrowse, SIGNAL(clicked()), this, SLOT(browseOutputDir()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void qTabDataOutput::Enable(bool enable){
|
||||
//this->setEnabled(enable);
|
||||
|
||||
layoutOutput->setEnabled(enable);
|
||||
boxCorrection->setEnabled(enable);
|
||||
}
|
||||
|
||||
|
||||
void qTabDataOutput::setOutputDir(const QString& path){
|
||||
outputDir = path;
|
||||
myDet->setFilePath(string(outputDir.toAscii().constData()));
|
||||
#ifdef VERBOSE
|
||||
cout<<"Output Directory changed to :"<<myDet->getFilePath()<<endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void qTabDataOutput::browseOutputDir()
|
||||
{
|
||||
QString directory = QFileDialog::getExistingDirectory(this,tr("Choose Output Directory "),dispOutputDir->text());
|
||||
if (!directory.isEmpty())
|
||||
dispOutputDir->setText(directory);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user