It includes
- the object explorer
- the script editor with interactive console
- the error handler
- the source checker
- and an example script which shows to main window in full-screen mode
name =
title =
description =
icon =
menu = ScripterNG
shortcut = # A valid QKeySequence as a string, see Qt4-docs
filename = # name of script file
subroutine = # additional entry point?
author =
contact =
homepage =
version =
copyright = # GPL2
scribus_version =
redraw = True
mode = interactive # allowed: batch, interactive, extension
language = python # allowed: python, qtscript
separator_before = False # in menu
separator_after = False # in menu
background_mode = False # threaded execution only for non-gui scripts
# -*- coding: utf-8 -*-
## name = about
## title = About ScripterNG
## shortcut = Esc,a
# ScripterNG is a builtin and does not need to be imported
ScripterNG.aboutScripterNG()
/// name = aboutqts
/// title = About ScripterNG from QtScript
ScripterNG.aboutScripter();
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class DockDialog(QDockWidget):
def __init__(self, dlg, area=Qt.RightDockWidgetArea):
QDockWidget.__init__(self, dlg.windowTitle())
self.setObjectName(dlg.objectName() or i18n(dlg.windowTitle()))
self.resize(dlg.size())
dlg.parent().addDockWidget(area, self)
dlg.setParent(self)
dlg.move(0, 0)
self.setWidget(dlg)
self.show()
dlg.installEventFilter(self)
def eventFilter(self, obj, event):
return False
if isinstance(event, QCloseEvent) or isinstance(event, QHideEvent):
obj.hide()
self.hide()
return True
elif isinstance(event, QShowEvent):
self.show()
return QDockWidget.eventFilter(self, obj, event)
dockables = ["Properties", "Outline", "Layers", "Arrange Pages",
"Scrapbook", "Bookmarks", "Align and Distribute"]
docks = qApp.docks = {}
for tlw in qApp.topLevelWidgets():
if isinstance(tlw, QDialog):
title = str(tlw.windowTitle())
if i18n(title) in dockables:
docks[title] = DockDialog(tlw)