GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
QFitPrintWidget.cpp
Go to the documentation of this file.
1// $Id$
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
14#include "QFitPrintWidget.h"
15
16#include <iostream>
17#include <sstream>
18
19#include "TObject.h"
20
21QFitPrintWidget::QFitPrintWidget(QWidget *parent, const char *name)
22 : QFitWidget(parent, name)
23{
24 setupUi(this);
25}
26
27
28void QFitPrintWidget::SetDrawOption( const QString & option )
29{
30 fxDrawOption = option;
31}
32
34{
35 if (GetObject()) {
36
37 std::cout.flush();
38
39 std::ostringstream strout;
40
41 std::streambuf* ccc_buffer = std::cout.rdbuf();
42
43 std::cout.rdbuf(strout.rdbuf());
44
45 GetObject()->Print(fxDrawOption.toLatin1().constData());
46
47 std::cout << std::endl;
48
49 std::cout.flush();
50
51 std::cout.rdbuf(ccc_buffer);
52
53 PrintText->setText(strout.str().c_str());
54 }
55}
virtual void SetDrawOption(const QString &option)
QFitPrintWidget(QWidget *parent=nullptr, const char *name=nullptr)
void FillSpecificData() override
virtual TObject * GetObject()
QFitWidget(QWidget *parent=nullptr, const char *name=nullptr, Qt::WindowFlags fl=Qt::Widget)