'''
Accessible Access Control 1.0
2012-2104 Michigan Technological University
Supported in part by NSF grants: DUE-1140512, DUE-1245310 and IIS-1319363
Developer: Man Wang
Advisors:Dr. Steve Carr, Dr. Jean Mayo, Dr. Ching-Kuang Shene and Dr. Chaoli Wang
'''
'''
Created on Apr 27, 2012

@author: yifli
'''

from PyQt4.QtGui import QTextBrowser, QDialog
from PyQt4.QtCore import QVariant, QUrl
from Ui_helpDialog import Ui_HelpDlg
'''
class HelpBrowser(QSplitter):
    def __init__(self, parent=None):
        QSplitter.__init__(self, Qt.Horizontal, parent)
        self.help_engine = QHelpEngine('DTEVis.qhc', self)
        self.help_engine.setupData()
        self.browser = QTextBrowser(self)
        
        self.insertWidget(0, self.help_engine.contentWidget())
        self.insertWidget(1, self.browser)
'''
'''
class HelpBrowser(QTextBrowser):
    def __init__(self, helpEngine, parent=None):
        QTextBrowser.__init__(self, parent)
        self.help_engine = helpEngine
        self.setSource(QUrl('qthelp://edu.mtu.cs.dtevis/doc/index.html'))
    
    def loadResource(self, type, url):
        if url.scheme() == 'qthelp':
            return QVariant(self.help_engine.fileData(url))
        else:
            return QTextBrowser.loadResource(type, url)
'''
class HelpBrowser(QDialog):
    
    def __init__(self, scene):
        QDialog.__init__(self)
        self.scene = scene
        self.ui = Ui_HelpDlg()
        self.ui.setupUi(self)
        #self.setLayout(self.ui.verticalLayout)
        self.ui.label.setWordWrap(True)
        self.ui.label_2.setWordWrap(True)
        self.ui.label_3.setWordWrap(True)
        self.ui.pushButton.clicked.connect(self.hide)
        
        

