Class: Smagacor::LogWindow
- Defined in:
- lib/smagacor/smagacor-ui.rb
Overview
Log window for viewing the log statements (information, error descriptions, etc ).
Defined Under Namespace
Classes: Logdev
Instance Attribute Summary collapse
-
#logdev ⇒ Object
readonly
Returns the value of attribute logdev.
Instance Method Summary collapse
-
#initialize(p) ⇒ LogWindow
constructor
Create a LogWindow.
-
#write(message) ⇒ Object
Invoked by the logger library for writing log messages.
Constructor Details
#initialize(p) ⇒ LogWindow
Create a LogWindow
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/smagacor/smagacor-ui.rb', line 187 def initialize( p ) super( p ) setMinimumSize( 400, 400 ) setCaption( "Log Window" ) @log = Qt::TextEdit.new( self ) @log.setTextFormat( Qt::LogText ) = Qt::PushButton.new( "Close", self ) connect( , SIGNAL('clicked()'), self, SLOT('hide()') ) verticalLayout = Qt::VBoxLayout.new( self ) verticalLayout.addWidget( @log ) verticalLayout.addWidget( ) @logdev = Logdev.new( self ) end |
Instance Attribute Details
#logdev ⇒ Object (readonly)
Returns the value of attribute logdev.
170 171 172 |
# File 'lib/smagacor/smagacor-ui.rb', line 170 def logdev @logdev end |
Instance Method Details
#write(message) ⇒ Object
Invoked by the logger library for writing log messages. The message
is appended to log.
204 205 206 |
# File 'lib/smagacor/smagacor-ui.rb', line 204 def write( ) @log.append( ) end |