Class Ui::Qt4::Dialogs::NotesDialog
In: ui/qt/dialogs/note.rb
Parent: Qt::Dialog

Methods

categories=   edit_note   new  

Attributes

accepted  [R] 
author  [R] 
categories  [W] 
category  [R] 
text  [R] 

Public Class methods

[Source]

     # File ui/qt/dialogs/note.rb, line 99
 99:         def initialize
100:           super
101:           @base = NotesBase.new
102:           @base.setupUi self
103:         end

Public Instance methods

[Source]

     # File ui/qt/dialogs/note.rb, line 122
122:         def categories=(category_list)
123:           @base.comboBox.clear()
124:           category_list.each do |c|
125:             @base.comboBox.addItem c.name
126:           end
127:         end

[Source]

     # File ui/qt/dialogs/note.rb, line 129
129:         def edit_note(note)
130:           @base.lineEdit.text = note.author
131:           @base.textEdit.text = note.text
132:           note_category = -1
133:           for i in 0..(@base.comboBox.count-1)
134:             if @base.comboBox.itemText(i) == note.category
135:               note_category = i
136:             end
137:           end
138:           @base.comboBox.setCurrentIndex(note_category)
139:         end

[Validate]