bugfix: catching config count at the beginning caused it to crash. now it works without crashing. still to catch cerr output

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@96 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d 2012-10-16 09:44:09 +00:00
parent e104b1d529
commit 34b3a8b01b
2 changed files with 16 additions and 9 deletions

View File

@ -95,12 +95,16 @@ void qDetectorMain::SetUpWidgetWindow(const string fName){
layoutTabs->addWidget(tabs);
// creating the messages tab before the plots and detector to catch config stdout
// creating the messages tab before the plots and detector to catch config stdout
tab_messages = new qTabMessages (this); cout<<"Messages ready"<<endl;
//no scroll buttons this way
tabs->insertTab(Messages, tab_messages, "Messages");
// settings up detector
SetUpDetector(fName);
// plot setup
myPlot = new qDrawPlot(dockWidgetPlot,myDet);cout<<"DockPlot ready"<<endl;
myPlot = new qDrawPlot(dockWidgetPlot,myDet); cout<<"DockPlot ready"<<endl;
dockWidgetPlot->setWidget(myPlot);
//settings messages to have the det reference
@ -137,9 +141,12 @@ void qDetectorMain::SetUpWidgetWindow(const string fName){
tabs->insertTab(Advanced, scroll[Advanced], "Advanced");
tabs->insertTab(Debugging, scroll[Debugging], "Debugging");
tabs->insertTab(Developer, scroll[Developer], "Developer");
// Prefer this to expand and not have scroll buttons
tabs->insertTab(Messages, tab_messages, "Messages");
//swap tabs so that messages is last tab
tabs->tabBar()->moveTab(tabs->indexOf(tab_messages),Messages);
tabs->setCurrentIndex(Measurement);
//other tab properties
// Default tab color
defaultTabColor = tabs->tabBar()->tabTextColor(DataOutput);
//Set the current tab(measurement) to blue as it is the current one

View File

@ -25,7 +25,7 @@ using namespace std;
//-------------------------------------------------------------------------------------------------------------------------------------------------
qTabMessages::qTabMessages(QWidget *parent):QWidget(parent),myDet(0){
qTabMessages::qTabMessages(QWidget *parent):QWidget(parent),myDet(0),qout(NULL){
SetupWidgetWindow();
Initialization();
}
@ -65,7 +65,7 @@ void qTabMessages::SetupWidgetWindow(){
gridLayout->addItem(new QSpacerItem(15,10,QSizePolicy::Fixed,QSizePolicy::Fixed),2,0);
gridLayout->addWidget(dispLog,3,0,1,5);
qout=new qDebugStream(cout,cerr, this);cout<<"working!"<<endl;
qout=new qDebugStream(cout,cerr, this);
//qerr=new qDebugStream(cerr,this);
//qerr=NULL;