Changeset View
Changeset View
Standalone View
Standalone View
plugins/python/scripter/uicontroller.py
Context not available. | |||||
15 | along with this program; if not, write to the Free Software | 15 | along with this program; if not, write to the Free Software | ||
---|---|---|---|---|---|
16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | """ | 17 | """ | ||
18 | from PyQt5.QtGui import QTextCursor, QPalette, QFontInfo | 18 | from PyQt5.QtCore import Qt, QObject, QFileInfo, QRect | ||
19 | from PyQt5.QtGui import QTextCursor, QPalette | ||||
19 | from PyQt5.QtWidgets import (QToolBar, QMenuBar, QTabWidget, | 20 | from PyQt5.QtWidgets import (QToolBar, QMenuBar, QTabWidget, | ||
20 | QLabel, QVBoxLayout, QMessageBox, | 21 | QLabel, QVBoxLayout, QMessageBox, | ||
21 | QSplitter, QSizePolicy) | 22 | QSplitter, QSizePolicy) | ||
22 | from PyQt5.QtCore import Qt, QObject, QFileInfo, pyqtSlot, QRect | 23 | from .ui_scripter.syntax import syntax, syntaxstyles | ||
23 | from scripter.ui_scripter.syntax import syntax, syntaxstyles | 24 | from .ui_scripter.editor import pythoneditor | ||
24 | from scripter.ui_scripter.editor import pythoneditor | 25 | from . import scripterdialog | ||
25 | from scripter import scripterdialog | | |||
26 | import importlib | 26 | import importlib | ||
27 | 27 | | |||
28 | KEY_GEOMETRY = "geometry" | 28 | KEY_GEOMETRY = "geometry" | ||
Context not available. | |||||
122 | modules = [] | 122 | modules = [] | ||
123 | 123 | | |||
124 | for class_path in actions_module.action_classes: | 124 | for class_path in actions_module.action_classes: | ||
125 | _module, _klass = class_path.rsplit('.', maxsplit=1) | 125 | _module = class_path[:class_path.rfind(".")] | ||
126 | _klass = class_path[class_path.rfind(".") + 1:] | ||||
126 | modules.append(dict(module='{0}.{1}'.format(module_path, _module), | 127 | modules.append(dict(module='{0}.{1}'.format(module_path, _module), | ||
127 | klass=_klass)) | 128 | klass=_klass)) | ||
128 | 129 | | |||
Context not available. | |||||
141 | widgetsModule = importlib.import_module(modulePath) | 142 | widgetsModule = importlib.import_module(modulePath) | ||
142 | modules = [] | 143 | modules = [] | ||
143 | 144 | | |||
144 | for classPath in widgetsModule.widgetClasses: | 145 | for class_path in widgetsModule.widgetClasses: | ||
145 | _module, _klass = classPath.rsplit('.', maxsplit=1) | 146 | _module = class_path[:class_path.rfind(".")] | ||
147 | _klass = class_path[class_path.rfind(".") + 1:] | ||||
146 | modules.append(dict(module='{0}.{1}'.format(modulePath, _module), | 148 | modules.append(dict(module='{0}.{1}'.format(modulePath, _module), | ||
147 | klass=_klass)) | 149 | klass=_klass)) | ||
148 | 150 | | |||
Context not available. |