Class: OkCancelDialog
- Inherits:
-
KDE::Dialog
- Object
- KDE::Dialog
- OkCancelDialog
- Defined in:
- lib/download.rb
Overview
Instance Attribute Summary collapse
-
#textEdit ⇒ Object
readonly
Returns the value of attribute textEdit.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(parent) ⇒ OkCancelDialog
constructor
A new instance of OkCancelDialog.
Constructor Details
#initialize(parent) ⇒ OkCancelDialog
Returns a new instance of OkCancelDialog.
9 10 11 12 13 14 15 16 |
# File 'lib/download.rb', line 9 def initialize(parent) super(parent) setButtons( KDE::Dialog::Ok | KDE::Dialog::Cancel ) @textEdit = Qt::Label.new do |w| w.wordWrap= true end setMainWidget(@textEdit) end |
Instance Attribute Details
#textEdit ⇒ Object (readonly)
Returns the value of attribute textEdit.
18 19 20 |
# File 'lib/download.rb', line 18 def textEdit @textEdit end |
Class Method Details
.ask(parent, text, title = text) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/download.rb', line 20 def self.ask(parent, text, title = text) @@dialog ||= self.new(parent) @@dialog.textEdit.text = text @@dialog. = title @@dialog.exec end |