Class Ui::Qt4::Widgets::NotesBrowser
In: ui/qt/widgets/notesbrowser.rb
Parent: Qt::Widget

Methods

home   invalidate!   new   reload   show_notes  

Included Modules

NotesBrowserInterface

Public Class methods

[Source]

# File ui/qt/widgets/notesbrowser.rb, line 32
        def initialize(parent=nil)
          super(parent)
          @layout = Qt::GridLayout.new(self)
          @t = Qt::TextBrowser.new
          @layout.addWidget(@t, 0, 0, 1, 1)
          @layout.margin = @layout.spacing = 0
          
          @html_default='<center><br/><img src="ui/qt/images/dradis.jpg"><h1>dradis 1.0</h1>etdsoft \'07</center>'
          @html_bar='<div><div>actions: <a href="add/#type#/#uid#">add note</a></div><div>show:#catlist# (<a href="filter/all">all</a>)</div></div>'
          @html_invalid='<center><br/><img src="ui/qt/images/dradis.jpg"><p>please, wait until the new revision is downloaded from the server...</p></center>'
          
          #@t = self
          @t.html= @last_html = @html_default
          connect @t, SIGNAL('anchorClicked(QUrl)'), self, SLOT('anchor_clicked(QUrl)')
          #self.openExternalLinks=  false
        end

Public Instance methods

[Source]

# File ui/qt/widgets/notesbrowser.rb, line 126
        def home() @t.html = @html_default; end

[Source]

# File ui/qt/widgets/notesbrowser.rb, line 124
        def invalidate!() @t.html = @html_invalid; end

[Source]

# File ui/qt/widgets/notesbrowser.rb, line 125
        def reload() @t.reload; end

[Source]

# File ui/qt/widgets/notesbrowser.rb, line 128
        def show_notes(annotatable_type, annotatable_id, note_list)
          @type = annotatable_type
          @id = annotatable_id
          @notes = note_list
          
          filter_and_display()
        end

[Validate]