7 Module implementing a widget to show some source code information provided by |
7 Module implementing a widget to show some source code information provided by |
8 plug-ins. |
8 plug-ins. |
9 """ |
9 """ |
10 |
10 |
11 from __future__ import unicode_literals |
11 from __future__ import unicode_literals |
|
12 try: |
|
13 basestring # __IGNORE_WARNING__ |
|
14 except NameError: |
|
15 basestring = str |
12 |
16 |
13 from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QUrl |
17 from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QUrl |
14 from PyQt5.QtGui import QCursor |
18 from PyQt5.QtGui import QCursor |
15 from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QLabel, \ |
19 from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QLabel, \ |
16 QComboBox, QSizePolicy, QLineEdit, QTextEdit, QToolTip, QToolButton, \ |
20 QComboBox, QSizePolicy, QLineEdit, QTextEdit, QToolTip, QToolButton, \ |
454 documentationInfo) |
458 documentationInfo) |
455 else: |
459 else: |
456 html = documentationInfo |
460 html = documentationInfo |
457 self.__setHtml(html) |
461 self.__setHtml(html) |
458 else: |
462 else: |
459 if isinstance(documentationInfo, str): |
463 if isinstance(documentationInfo, basestring): |
460 fullText = documentationInfo |
464 fullText = documentationInfo |
461 elif isinstance(documentationInfo, dict): |
465 elif isinstance(documentationInfo, dict): |
462 name = documentationInfo["name"] |
466 name = documentationInfo["name"] |
463 if name: |
467 if name: |
464 title = "".join([name, "\n", |
468 title = "".join([name, "\n", |