12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/previewwin.rb', line 12
def createWidget
@titleLabel = Qt::Label.new('')
@textEditor = KTextEditor::EditorChooser::editor
@closeBtn = KDE::PushButton.new(KDE::Icon.new('dialog-close'), \
i18n('Close')) do |w|
connect(w, SIGNAL(:clicked), self, SLOT(:hide))
end
@document = @textEditor.createDocument(nil)
@textView = @document.createView(self)
lo = Qt::VBoxLayout.new
lo.addWidgets('File Name:', @titleLabel, nil)
lo.addWidget(@textView)
lo.addWidgets(nil, @closeBtn)
setLayout(lo)
end
|