Class: KDE::Application
Direct Known Subclasses
Class Method Summary collapse
-
.with_override_cursor(cursor = Qt::Cursor.new(Qt::WaitCursor)) ⇒ Object
Executes the block between calls to
set_override_cursor
andrestore_override_cursor
.
Instance Method Summary collapse
-
#with_override_cursor(cursor = Qt::Cursor.new(Qt::WaitCursor), &blk) ⇒ Object
The same as KDE::Application.with_override_cursor.
Class Method Details
.with_override_cursor(cursor = Qt::Cursor.new(Qt::WaitCursor)) ⇒ Object
Executes the block between calls to set_override_cursor
and restore_override_cursor
. The override cursor used is cursor.
This method returns the value returned by the block
259 260 261 262 263 264 265 266 |
# File 'lib/ruber/kde_sugar.rb', line 259 def self.with_override_cursor cursor = Qt::Cursor.new(Qt::WaitCursor) begin set_override_cursor cursor res = yield ensure restore_override_cursor end res end |
Instance Method Details
#with_override_cursor(cursor = Qt::Cursor.new(Qt::WaitCursor), &blk) ⇒ Object
The same as KDE::Application.with_override_cursor
271 272 273 |
# File 'lib/ruber/kde_sugar.rb', line 271 def with_override_cursor cursor = Qt::Cursor.new(Qt::WaitCursor), &blk KDE::Application.with_override_cursor cursor, &blk end |