gsdview.qt4support

Utility functions and classes for Qt4 applicaions.

Functions

StringIO StringIO([s]) – Return a StringIO-like stream for reading or writing
actionGroupToMenu(actionGroup, label, mainwin)
actionGroupToToolbar(actionGroup, label[, name])
callExpensiveFunc(func, *args, **kwargs)
cfgToTextDocument(cfg[, doc])
clearTable(tablewidget) Remove contents from a table widget preserving labels.
copySelectedItems(itemview) Copy selected items of an QAbstractItemView to the clipboard and
coreprint(obj, printer)
exportTable(model[, parent])
geticon(name[, package]) Build and return requested icon.
geticonfile(name[, package]) Return the icon file path.
getuifile(name[, package]) Return the ui file path.
getuiform(name[, package]) Return the ui form class.
imgexport(obj[, parent])
modelToCsv(model[, dialect])
modelToIni(model[, section, cfg])
modelToTextDocument(model[, doc])
numpy2qimage(data) Convert a numpy array into a QImage.
overrideCursor(func)
printObject(obj[, printer, parent])
printPreview(obj[, printer, parent])
selectAllItems(itemview) Select all items in an QAbstractItemView.
setViewContextActions(widget)

Classes

ConfigParser([defaults, dict_type, ...])
gsdview.qt4support.actionGroupToMenu(actionGroup, label, mainwin)[source]
gsdview.qt4support.actionGroupToToolbar(actionGroup, label, name=None)[source]
gsdview.qt4support.callExpensiveFunc(func, *args, **kwargs)[source]
gsdview.qt4support.cfgToTextDocument(cfg, doc=None)[source]
gsdview.qt4support.clearTable(tablewidget)[source]

Remove contents from a table widget preserving labels.

gsdview.qt4support.copySelectedItems(itemview)[source]

Copy selected items of an QAbstractItemView to the clipboard and also return copied data.

gsdview.qt4support.coreprint(obj, printer)[source]
gsdview.qt4support.exportTable(model, parent=None)[source]
gsdview.qt4support.geticon(name, package=None)[source]

Build and return requested icon.

It is assumed that icon files are located in the “images” subfolder of the package.

gsdview.qt4support.geticonfile(name, package=None)[source]

Return the icon file path.

It is assumed that icon files are located in the “images” subfolder of the package.

gsdview.qt4support.getuifile(name, package=None)[source]

Return the ui file path.

It is assumed that Qt UI files are located in the “ui” subfolfer of the package.

gsdview.qt4support.getuiform(name, package=None)[source]

Return the ui form class.

If it is available a pre-built python module the form class is imported from it (assuming that the module contains a single UI class having a name that starts with Ui_).

If no pre-build python module is available than the form call is loaded directly from the ui file using the PyQt4.uic helper module.

Note

in the pyside packege is used to provide bindings for Qt4 then the uic module is not available and only pre-built modules are searched. When pyside is used an ImportError is raised if pre-built forms are not available.

Note

like gsdview.qt4support.getuifile() this function assumes that pre-build form modules and Qt UI files are located in the “ui” subfolfer of the package.

gsdview.qt4support.imgexport(obj, parent=None)[source]
gsdview.qt4support.modelToCsv(model, dialect='excel')[source]
gsdview.qt4support.modelToIni(model, section=None, cfg=None)[source]
gsdview.qt4support.modelToTextDocument(model, doc=None)[source]
gsdview.qt4support.numpy2qimage(data)[source]

Convert a numpy array into a QImage.

Note

requires sip >= 4.7.5.

gsdview.qt4support.overrideCursor(func)[source]
gsdview.qt4support.printObject(obj, printer=None, parent=None)[source]
gsdview.qt4support.printPreview(obj, printer=None, parent=None)[source]
gsdview.qt4support.selectAllItems(itemview)[source]

Select all items in an QAbstractItemView.

gsdview.qt4support.setViewContextActions(widget)[source]

Get GSDView at SourceForge.net. Fast, secure and Free Open Source software downloads

Previous topic

gsdview.qt4draw

Next topic

gsdview.qtwindowlistmenu

This Page