Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
app = Qt.QApplication(sys.argv)
w = ReflectionsList()
w.show()
sys.exit(app.exec_())
ret = TaurusWidget.getQtDesignerPluginInfo()
ret['module'] = 'taurus.qt.qtgui.extra_nexus'
ret['icon'] = ":/designer/listview.png"
ret['container'] = False
ret['group'] = 'Taurus Views'
return ret
if __name__ == "__main__":
import sys
if len(sys.argv) >1:
fname = sys.argv[1]
else:
fname=None
app = Qt.QApplication(sys.argv)
w = TaurusNeXusBrowser()
w.openFile(fname)
w.show()
sys.exit(app.exec_())
import sys
from taurus.external.qt import Qt
from taurus.qt.qtgui.display import TaurusStateLabel
app = Qt.QApplication(sys.argv)
panel = Qt.QWidget()
w = TaurusStateLabel(panel)
w.setModel('sys/taurustest/1/state')
panel.show()
sys.exit(app.exec_())
def main():
import sys
app = Qt.QApplication([])
window = Qt.QWidget()
layout = Qt.QHBoxLayout(window)
goButton = Qt.QPushButton("Activate help", window)
terminateButton = Qt.QPushButton("Close help", window)
textEdit = Qt.QLineEdit(window)
layout.addWidget(textEdit)
layout.addWidget(goButton)
layout.addWidget(terminateButton)
def go():
assistant = Assistant(textEdit.text(), parent=window)
assistant.start()
assistant.waitForStarted()
assistant.assistantShow(Widgets.bookmarks)
def terminate():
def tr(self, string):
return Qt.QApplication.translate("Led", string, None, Qt.QApplication.UnicodeUTF8)
def main():
"""hello"""
app = Qt.QApplication.instance()
owns_app = app is None
if owns_app:
app = Qt.QApplication(sys.argv)
w = Qt.QWidget()
layout = Qt.QGridLayout()
layout.setContentsMargins(2, 2, 2, 2)
layout.setSpacing(2)
w.setLayout(layout)
for i, color in enumerate(LedColor.keys()):
led = QLed()
led.ledColor = color
led.ledStatus = True
layout.addWidget(led, i, 0)
led = QLed()
led.ledColor = color
led.ledStatus = False
layout.addWidget(led, i, 1)
led = QLed()
panelLayout.setMargin(0)
self.setLayout(panelLayout)
self._titleBar = titleBar = Qt.QFrame()
panelLayout.addWidget(titleBar, 0)
l = Qt.QHBoxLayout()
l.setMargin(2)
l.setSpacing(2)
self._titleBar.setLayout(l)
self._titleButton = Qt.QToolButton()
self._titleButton.setStyleSheet("border: 0px")
styleOption = Qt.QStyleOption()
styleOption.initFrom(self._titleButton)
style = Qt.QApplication.style()
icon = style.standardIcon(
Qt.QStyle.SP_DesktopIcon, styleOption, self._titleButton)
self._titleButton.setIcon(icon)
self._titleLabel = Qt.QLabel()
self._upDownButton = Qt.QToolButton()
self._upDownButton.setStyleSheet("border: 0px")
self._upDownButton.clicked.connect(self.switchContentVisible)
l.addWidget(self._titleButton, 0)
l.addWidget(self._titleLabel, 1)
l.addWidget(self._upDownButton, 0)
self._content = content = ContentFrame()
l = Qt.QHBoxLayout()
l.setContentsMargins(0, 0, 0, 0)
content.setLayout(l)
panelLayout.addWidget(content, 1)
def main():
import sys
import taurus.core.tango.img
taurus.core.tango.img.registerExtensions()
app = Qt.QApplication(sys.argv)
models = sys.argv[1:]
panel = Qt.QWidget()
l = Qt.QHBoxLayout()
panel.setLayout(l)
if not models:
from taurus.qt.qtgui.panel import TaurusModelChooser
models, ok = TaurusModelChooser.modelChooserDlg(
panel, [taurus.core.taurusbasetypes.TaurusElementType.Attribute])
if not ok:
models = []
for model in models:
w = TaurusQubDataImageDisplay()
w.setModel(model)
l.addWidget(w)
panel.setVisible(True)
def _buildWidgets(self, module_name, path, recursive=True):
import taurus.qt.qtgui.base
if Qt.QApplication.instance() is None:
app = Qt.QApplication([])
elems = os.listdir(path)
taurus_ret, qt_ret = {}, {}
if not '__init__.py' in elems:
return taurus_ret, qt_ret
try:
m = __import__(module_name, fromlist=['*'], level=0)
dir_names = dir(m)
for dir_name in dir_names:
if dir_name.startswith("_"):
continue
try:
attr = getattr(m, dir_name)
if issubclass(attr, Qt.QWidget):
return None
#-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
# QT properties
#-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
model = Qt.pyqtProperty("QStringList", getModel, setModel, resetModel)
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if __name__ == "__main__":
import sys
app = Qt.QApplication(sys.argv)
form = Qt.QMainWindow()
#ly=Qt.QVBoxLayout(form)
#container=Qt.QWidget()
# container = TaurusValuesFrame()
from taurus.qt.qtgui.panel import TaurusForm
container = TaurusForm()
#ly.addWidget(container)
form.setCentralWidget(container)
try:
from taurus.qt.qtgui.extra_pool import PoolMotorSlim, PoolChannel
container.setCustomWidgetMap({'SimuMotor':PoolMotorSlim,
'Motor':PoolMotorSlim,
'PseudoMotor':PoolMotorSlim,
'PseudoCounter':PoolChannel,
'CTExpChannel':PoolChannel,