8 #include <ModelAPI_Feature.h>
10 #include <boost/shared_ptr.hpp>
14 \brief Return directory part of the file path.
16 If the file path does not include directory part (the file is in the
17 current directory), null string is returned.
20 \param abs if true (default) \a path parameter is treated as absolute file path
21 \return directory part of the file path
25 QString XGUI_EXPORT dir(const QString& path, bool isAbs = true);
28 \brief Return file name part of the file path.
31 \param withExt if true (default) complete file name (with all
32 extension except the last) is returned, otherwise only base name
34 \return file name part of the file path
36 QString XGUI_EXPORT file(const QString& path, bool withExt = true);
39 \brief Return extension part of the file path.
42 \param full if true complete extension (all extensions, dot separated)
43 is returned, otherwise (default) only last extension is returned
44 \return extension part of the file path
46 QString XGUI_EXPORT extension(const QString& path, bool full = false);
49 \brief Add a slash (platform-specific) to the end of \a path
50 if it is not already there.
51 \param path directory path
52 \return modified path (with slash added to the end)
54 QString XGUI_EXPORT addSlash(const QString& path);
57 Creates a rect with TopLeft = ( min(x1,x2), min(y1,y2) )
58 and BottomRight = ( TopLeft + (x2-x1)(y2-y1) )
60 QRect XGUI_EXPORT makeRect(const int x1, const int y1, const int x2, const int y2);
62 /// The model concerning tools
65 Returns true if the feature is a model object
66 \param theFeature a feature
68 bool XGUI_EXPORT isModelObject(FeaturePtr theFeature);
71 Returns the string presentation of the given feature
72 \param theFeature a feature
74 std::string XGUI_EXPORT featureInfo(FeaturePtr theFeature);