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 96
        def initialize
          super
          @base = NotesBase.new
          @base.setupUi self
        end

Public Instance methods

[Source]

# File ui/qt/dialogs/note.rb, line 119
        def categories=(category_list)
          @base.comboBox.clear()
          category_list.each do |c|
            @base.comboBox.addItem c.name
          end
        end

[Source]

# File ui/qt/dialogs/note.rb, line 126
        def edit_note(note)
          @base.lineEdit.text = note.author
          @base.textEdit.text = note.text
          note_category = -1
          for i in 0..(@base.comboBox.count-1)
            if @base.comboBox.itemText(i) == note.category
              note_category = i
            end
          end
          @base.comboBox.setCurrentIndex(note_category)
        end

[Validate]