Class: KDE::Application

Inherits:
Object show all
Defined in:
lib/ruber/kde_sugar.rb

Direct Known Subclasses

Ruber::Application

Class Method Summary collapse

Instance Method Summary collapse

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