Version: 9.16.0
ContainerLogViewer Class Reference

#include <LogViewer.hxx>

Inheritance diagram for ContainerLogViewer:
Collaboration diagram for ContainerLogViewer:

Public Slots

virtual void onNext ()
 
virtual void onPrevious ()
 

Public Member Functions

 ContainerLogViewer (std::string label, QWidget *parent=0)
 
virtual void readFile (std::string fileName)
 
- Public Member Functions inherited from LogViewer
 LogViewer (std::string label, QWidget *parent=0)
 
virtual ~LogViewer ()
 
void setText (std::string text)
 
virtual void readFile (std::string fileName)
 

Additional Inherited Members

- Protected Attributes inherited from LogViewer
std::string _label
 

Detailed Description

Definition at line 40 of file LogViewer.hxx.

Constructor & Destructor Documentation

◆ ContainerLogViewer()

ContainerLogViewer::ContainerLogViewer ( std::string  label,
QWidget parent = 0 
)

Definition at line 56 of file LogViewer.cxx.

56 :LogViewer(label,parent)
57{
58 gridLayout->removeWidget(browser);
59 gridLayout->addWidget(browser, 0, 0, 1, 3);
60
61 QPushButton* next = new QPushButton("next execution",this);
62 gridLayout->addWidget(next, 1, 1, 1, 1);
63 connect(next,SIGNAL(clicked()),this, SLOT(onNext()));
64 QPushButton* previous = new QPushButton("previous execution",this);
65 gridLayout->addWidget(previous, 1, 2, 1, 1);
66 connect(previous,SIGNAL(clicked()),this, SLOT(onPrevious()));
67}
virtual void onNext()
Definition: LogViewer.cxx:79
virtual void onPrevious()
Definition: LogViewer.cxx:95
LogViewer(std::string label, QWidget *parent=0)
Definition: LogViewer.cxx:26

References onNext(), and onPrevious().

Member Function Documentation

◆ onNext

void ContainerLogViewer::onNext ( )
virtualslot

Definition at line 79 of file LogViewer.cxx.

80{
81 QTextCursor orig = browser->textCursor();
82 QTextCursor find_result = browser->document()->find("**************************Begin schema execution", orig);
83
84 if(find_result.isNull())
85 {
86 //Try to find from the beginning
87 find_result = browser->document()->find("**************************Begin schema execution",0);
88 }
89
90 if(!find_result.isNull())
91 browser->setTextCursor(find_result);
92}

Referenced by ContainerLogViewer().

◆ onPrevious

void ContainerLogViewer::onPrevious ( )
virtualslot

Definition at line 95 of file LogViewer.cxx.

96{
97 QTextCursor orig = browser->textCursor();
98 QTextCursor find_result = browser->document()->find("**************************Begin schema execution",
99 orig, QTextDocument::FindBackward);
100 if(find_result.isNull())
101 {
102 //Try to find from the end
103 find_result = browser->document()->find("**************************Begin schema execution",
104 browser->document()->characterCount()-1, QTextDocument::FindBackward);
105 }
106
107 if(!find_result.isNull())
108 browser->setTextCursor(find_result);
109}

Referenced by ContainerLogViewer().

◆ readFile()

void ContainerLogViewer::readFile ( std::string  fileName)
virtual

Reimplemented from LogViewer.

Definition at line 69 of file LogViewer.cxx.

70{
71 LogViewer::readFile(fileName);
72 //move cursor to the end
73 QTextCursor cursor=browser->textCursor();
74 cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor);
75 browser->setTextCursor(cursor);
76}
virtual void readFile(std::string fileName)
Definition: LogViewer.cxx:45

References LogViewer::readFile().

Referenced by YACS::HMI::GenericGui::onGetYacsContainerLog().


The documentation for this class was generated from the following files: