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



243
244
245
246
247
248
249
250
# File 'lib/ruber/kde_sugar.rb', line 243

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



255
256
257
# File 'lib/ruber/kde_sugar.rb', line 255

def with_override_cursor cursor = Qt::Cursor.new(Qt::WaitCursor), &blk
  KDE::Application.with_override_cursor cursor, &blk
end