Source

codeaide / codeaide / ide / simple / help.py

Full commit
# -*- coding: utf-8 -*-
from PyQt4.QtCore import Qt, QUrl

from codeaide.interface import implements
from codeaide.ide import api
from codeaide.ide.base import i18n, DockBase
from codeaide.ide.simple.utils import call_on_idle


        
class HelpDock(DockBase):
    implements(api.Dock)

    title = i18n("Help")
    toggle_shortcut = "Alt+1"
    switch_shortcut = "Ctrl+1"
    icon = "help-browser"
    statusbar = True
    #toggle_menu = i18n("&View")
    #toolbar = i18n("Views")
    area = Qt.RightDockWidgetArea    


    def create_widget(self, parent):
        from PyQt4.QtWebKit import QWebView

        class HelpBrowser(QWebView):
            
            def __init__(self, parent):
                QWebView.__init__(self, parent)
                call_on_idle(self.load, QUrl("http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/classes.html"))
    

        browser = HelpBrowser(parent)
        browser.resize(300, 300)
        return browser