mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-14 20:28:41 +01:00
messages capture config output, still to find a way to capture all cerr output
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@95 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
@@ -64,8 +64,7 @@ qDetectorMain::qDetectorMain(int argc, char **argv, QApplication *app, QWidget *
|
||||
}
|
||||
|
||||
setupUi(this);
|
||||
SetUpDetector(configFName);
|
||||
SetUpWidgetWindow();
|
||||
SetUpWidgetWindow(configFName);
|
||||
Initialization();
|
||||
|
||||
}
|
||||
@@ -84,21 +83,29 @@ qDetectorMain::~qDetectorMain(){
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qDetectorMain::SetUpWidgetWindow(){
|
||||
void qDetectorMain::SetUpWidgetWindow(const string fName){
|
||||
|
||||
// Layout
|
||||
layoutTabs= new QGridLayout;
|
||||
centralwidget->setLayout(layoutTabs);
|
||||
|
||||
// plot setup
|
||||
myPlot = new qDrawPlot(dockWidgetPlot,myDet);cout<<"DockPlot ready"<<endl;
|
||||
dockWidgetPlot->setWidget(myPlot);
|
||||
|
||||
//tabs setup
|
||||
tabs = new MyTabWidget(this);
|
||||
layoutTabs->addWidget(tabs);
|
||||
// creating all the tab widgets
|
||||
tab_messages = new qTabMessages (this, myDet); cout<<"Messages ready"<<endl;
|
||||
|
||||
|
||||
// creating the messages tab before the plots and detector to catch config stdout
|
||||
tab_messages = new qTabMessages (this); cout<<"Messages ready"<<endl;
|
||||
// settings up detector
|
||||
SetUpDetector(fName);
|
||||
// plot setup
|
||||
myPlot = new qDrawPlot(dockWidgetPlot,myDet);cout<<"DockPlot ready"<<endl;
|
||||
dockWidgetPlot->setWidget(myPlot);
|
||||
|
||||
//settings messages to have the det reference
|
||||
tab_messages->SetDetectorReference(myDet);
|
||||
// creating all the other tab widgets
|
||||
tab_measurement = new qTabMeasurement (this, myDet,myPlot); cout<<"Measurement ready"<<endl;
|
||||
tab_dataoutput = new qTabDataOutput (this, myDet); cout<<"DataOutput ready"<<endl;
|
||||
tab_plot = new qTabPlot (this, myDet,myPlot); cout<<"Plot ready"<<endl;
|
||||
@@ -132,6 +139,7 @@ void qDetectorMain::SetUpWidgetWindow(){
|
||||
tabs->insertTab(Developer, scroll[Developer], "Developer");
|
||||
// Prefer this to expand and not have scroll buttons
|
||||
tabs->insertTab(Messages, tab_messages, "Messages");
|
||||
|
||||
// Default tab color
|
||||
defaultTabColor = tabs->tabBar()->tabTextColor(DataOutput);
|
||||
//Set the current tab(measurement) to blue as it is the current one
|
||||
@@ -267,7 +275,7 @@ void qDetectorMain::Initialization(){
|
||||
|
||||
|
||||
void qDetectorMain::LoadConfigFile(const string fName){
|
||||
#ifdef VERBOSe
|
||||
#ifdef VERBOSE
|
||||
cout << "Loading config file at start up:" << fName << endl;
|
||||
#endif
|
||||
QString file = QString(fName.c_str());//.section('/',-1);
|
||||
|
||||
Reference in New Issue
Block a user