itom 1.3.0
|
Public Types | |
enum | IOFilter { IOInput = 0x001, IOOutput = 0x002, IOPlugin = 0x004, IOAllFiles = 0x008, IOWorkspace = 0x010, IOMimeDataObject = 0x020, IOMimePointCloud = 0x040, IOMimePolygonMesh = 0x080, IOMimeAll = IOMimeDataObject | IOMimePointCloud | IOMimePolygonMesh } |
Static Public Member Functions | |
static RetVal | openGeneralFile (const QString &generalFileName, bool openUnknownsWithExternalApp=true, bool showMessages=false, QWidget *parent=NULL, const char *errorSlotMemberOfParent=NULL, bool globalNotLocalWorkspace=true) |
static RetVal | uiExportPyWorkspaceVars (bool globalNotLocal, const QStringList &varNames, QVector< int > compatibleParamBaseTypes, QString defaultPath=QString::Null(), QWidget *parent=NULL) |
static RetVal | exportPyWorkspaceVars (const QString &filename, bool globalNotLocal, const QStringList &varNames) |
static RetVal | uiImportPyWorkspaceVars (bool globalNotLocal, IOFilters IOfilters, QString defaultPath=QString::Null(), QWidget *parent=NULL) |
static RetVal | importPyWorkspaceVars (const QString &filename, bool globalNotLocal) |
static RetVal | uiOpenPythonScript (QString defaultPath=QString::Null(), QWidget *parent=NULL) |
static RetVal | openPythonScript (const QString &filename) |
static RetVal | uiOpenFileWithFilter (const ito::AddInAlgo::FilterDef *filter, const QString &filename, QWidget *parent=NULL, bool globalNotLocal=true) |
static RetVal | uiSaveFileWithFilter (QSharedPointer< ito::ParamBase > &value, const QString &filename, QWidget *parent=NULL) |
static RetVal | openUIFile (const QString &filename, QWidget *parent=NULL, const char *errorSlotMemberOfParent=NULL) |
static QString | getFileFilters (const IOFilters &IOfilters, QStringList *allPatterns=NULL) |
Returns a list of all file endings that correspond to itom. | |
static bool | fileFitsToFileFilters (const QString &filename, const IOFilters &IOfilters) |
Checks if a file fits to a filter. | |
static void | elideFilepathMiddle (QString &path, int pixelLength) |
Shortens paths so that menus can display them without becoming too big. | |
Private Member Functions | |
IOHelper (const IOHelper &) |
void ito::IOHelper::elideFilepathMiddle | ( | QString & | path, |
int | pixelLength | ||
) | [static] |
Shortens paths so that menus can display them without becoming too big.
This functio is used to shorten paths so they fit into a menu or something compareable.
Example: D:/testdir1/testdir2/file.py becomes D:/...ir2/file.py
If the pixelLength is shorter than the filename a minimum is returned: D:/...file.py Even if the minimum is longer than the pixelLength.
path | The path that is supposed to be shortened |
pixelLength | The length the path has to have after shortening |
bool ito::IOHelper::fileFitsToFileFilters | ( | const QString & | filename, |
const IOFilters & | IOfilters | ||
) | [static] |
Checks if a file fits to a filter.
This function checks if a fileending of a file fits to a given set of filters.
filename | pass the filename as a QString |
IOfilters | pass the filterset that the filename shopuld be checked against |
QString ito::IOHelper::getFileFilters | ( | const IOFilters & | IOfilters, |
QStringList * | allPatterns = NULL |
||
) | [static] |
Returns a list of all file endings that correspond to itom.
This function returns a QString that contains a semicolon separated list of all fileendings that were passed by the iofilters parameter
IOfilters | filters that contain the filenendings |
allPatterns | Pointer to QStringList (standard = 0) |