QElectroTech 0.100.0-dev
|
The ElementsLocation class This class represents the location, the location of an element or of a category, even of a collection ... in a collection. She encapsulates a virtual path. More...
#include <elementslocation.h>
Public Member Functions | |
ElementsLocation () | |
ElementsLocation::ElementsLocation Constructor. | |
ElementsLocation (const QString &path, QETProject *project=nullptr) | |
ElementsLocation::ElementsLocation. | |
ElementsLocation (const ElementsLocation &) | |
ElementsLocation::ElementsLocation The copy constructor. | |
ElementsLocation (const QMimeData *data) | |
ElementsLocation::ElementLocation Constructor, build an ElementLocation from a QMimeData, the mime data format must be "application/x-qet-element-uri" or "application/x-qet-category-uri". This location can be null even if format is valid. | |
virtual | ~ElementsLocation () |
ElementsLocation::~ElementsLocation Destructeur. | |
ElementsLocation & | operator= (const ElementsLocation &) |
ElementsLocation::operator = Assignment operator. | |
bool | operator== (const ElementsLocation &) const |
ElementsLocation::operator ==. | |
bool | operator!= (const ElementsLocation &) const |
ElementsLocation::operator != Operateur de comparaison. | |
QString | baseName () const |
ElementsLocation::baseName. | |
QString | collectionPath (bool protocol=true) const |
ElementsLocation::collectionPath Return the path of the represented element relative to collection if protocol is true the path is prepended by the collection type (common://, company://, custom:// or embed://) else if false, only the collection path is returned without the collection type. | |
QString | projectCollectionPath () const |
ElementsLocation::projectCollectionPath. | |
QString | fileSystemPath () const |
ElementsLocation::fileSystemPath. | |
QString | path () const |
ElementsLocation::path. | |
void | setPath (const QString &path) |
ElementsLocation::setPath Set the path of this item. The path can be relative to a collection (start by common://, company://, custom:// or embed://) or not. | |
bool | addToPath (const QString &) |
ElementsLocation::addToPath Add a string to the actual path of this location. | |
ElementsLocation | parent () const |
ElementsLocation::parent. | |
QETProject * | project () const |
ElementsLocation::project. | |
void | setProject (QETProject *) |
ElementsLocation::setProject. | |
bool | isNull () const |
ElementsLocation::isNull. | |
QString | toString () const |
ElementsLocation::toString. | |
bool | isElement () const |
ElementsLocation::isElement. | |
bool | isDirectory () const |
ElementsLocation::isDirectory. | |
bool | isFileSystem () const |
ElementsLocation::isFileSystem. | |
bool | isCommonCollection () const |
ElementsLocation::isCommonCollection. | |
bool | isCompanyCollection () const |
ElementsLocation::isCompanyCollection. | |
bool | isCustomCollection () const |
ElementsLocation::isCustomCollection. | |
bool | isProject () const |
ElementsLocation::isProject. | |
bool | exist () const |
ElementsLocation::exist. | |
bool | isWritable () const |
ElementsLocation::isWritable. | |
XmlElementCollection * | projectCollection () const |
ElementsLocation::projectCollection. | |
NamesList | nameList () |
ElementsLocation::nameList. | |
QDomElement | xml () const |
ElementsLocation::xml. | |
pugi::xml_document | pugiXml () const |
ElementsLocation::pugiXml. | |
bool | setXml (const QDomDocument &xml_document) const |
ElementsLocation::setXml Replace the current xml description by xml_document; The document element of xml_document must have tagname "definition" to be written This definition must be writable. | |
QUuid | uuid () const |
ElementsLocation::uuid. | |
QIcon | icon () const |
ElementLocation::icon. | |
QString | name () const |
ElementLocation::name. | |
QString | fileName () const |
ElementLocation::fileName. | |
DiagramContext | elementInformations () const |
ElementsLocation::elementInformations. | |
Static Public Attributes | |
static int | MetaTypeId = qRegisterMetaType<ElementsLocation>("ElementsLocation") |
Id of the corresponding Qt meta type. | |
Private Attributes | |
QString | m_collection_path |
QString | m_file_system_path |
QETProject * | m_project = nullptr |
std::stringstream | m_string_stream |
The ElementsLocation class This class represents the location, the location of an element or of a category, even of a collection ... in a collection. She encapsulates a virtual path.
ElementsLocation::ElementsLocation | ( | ) |
ElementsLocation::ElementsLocation Constructor.
ElementsLocation::ElementsLocation | ( | const QString & | path, |
QETProject * | project = nullptr |
||
) |
ElementsLocation::ElementsLocation.
path | : Item location path |
project | : Project of the location of the element |
ElementsLocation::ElementsLocation | ( | const ElementsLocation & | other | ) |
ElementsLocation::ElementsLocation The copy constructor.
other | : Alternate item location to copy |
ElementsLocation::ElementsLocation | ( | const QMimeData * | data | ) |
ElementsLocation::ElementLocation Constructor, build an ElementLocation from a QMimeData, the mime data format must be "application/x-qet-element-uri" or "application/x-qet-category-uri". This location can be null even if format is valid.
data |
|
virtual |
ElementsLocation::~ElementsLocation Destructeur.
bool ElementsLocation::addToPath | ( | const QString & | string | ) |
ElementsLocation::addToPath Add a string to the actual path of this location.
string |
QString ElementsLocation::baseName | ( | ) | const |
QString ElementsLocation::collectionPath | ( | bool | protocol = true | ) | const |
ElementsLocation::collectionPath Return the path of the represented element relative to collection if protocol is true the path is prepended by the collection type (common://, company://, custom:// or embed://) else if false, only the collection path is returned without the collection type.
protocol |
DiagramContext ElementsLocation::elementInformations | ( | ) | const |
ElementsLocation::elementInformations.
bool ElementsLocation::exist | ( | ) | const |
QString ElementsLocation::fileName | ( | ) | const |
ElementLocation::fileName.
QString ElementsLocation::fileSystemPath | ( | ) | const |
ElementsLocation::fileSystemPath.
QIcon ElementsLocation::icon | ( | ) | const |
ElementLocation::icon.
bool ElementsLocation::isCommonCollection | ( | ) | const |
ElementsLocation::isCommonCollection.
bool ElementsLocation::isCompanyCollection | ( | ) | const |
ElementsLocation::isCompanyCollection.
bool ElementsLocation::isCustomCollection | ( | ) | const |
ElementsLocation::isCustomCollection.
bool ElementsLocation::isDirectory | ( | ) | const |
ElementsLocation::isDirectory.
bool ElementsLocation::isElement | ( | ) | const |
bool ElementsLocation::isFileSystem | ( | ) | const |
bool ElementsLocation::isNull | ( | ) | const |
bool ElementsLocation::isProject | ( | ) | const |
bool ElementsLocation::isWritable | ( | ) | const |
QString ElementsLocation::name | ( | ) | const |
ElementLocation::name.
NamesList ElementsLocation::nameList | ( | ) |
bool ElementsLocation::operator!= | ( | const ElementsLocation & | other | ) | const |
ElementsLocation::operator != Operateur de comparaison.
other | Autre emplacement d'element a comparer |
ElementsLocation & ElementsLocation::operator= | ( | const ElementsLocation & | other | ) |
ElementsLocation::operator = Assignment operator.
other | : Other item location to assign |
bool ElementsLocation::operator== | ( | const ElementsLocation & | other | ) | const |
ElementsLocation::operator ==.
other | : other item location to compare |
ElementsLocation ElementsLocation::parent | ( | ) | const |
QString ElementsLocation::path | ( | ) | const |
QETProject * ElementsLocation::project | ( | ) | const |
XmlElementCollection * ElementsLocation::projectCollection | ( | ) | const |
ElementsLocation::projectCollection.
QString ElementsLocation::projectCollectionPath | ( | ) | const |
ElementsLocation::projectCollectionPath.
pugi::xml_document ElementsLocation::pugiXml | ( | ) | const |
void ElementsLocation::setPath | ( | const QString & | path | ) |
ElementsLocation::setPath Set the path of this item. The path can be relative to a collection (start by common://, company://, custom:// or embed://) or not.
path |
void ElementsLocation::setProject | ( | QETProject * | project | ) |
project | : the new project points to this location Indicate 0 so that this location is no longer linked to a project. |
bool ElementsLocation::setXml | ( | const QDomDocument & | xml_document | ) | const |
ElementsLocation::setXml Replace the current xml description by xml_document; The document element of xml_document must have tagname "definition" to be written This definition must be writable.
xml_document |
QString ElementsLocation::toString | ( | ) | const |
QUuid ElementsLocation::uuid | ( | ) | const |
QDomElement ElementsLocation::xml | ( | ) | const |
|
private |
|
private |
|
private |
|
mutableprivate |
|
static |
Id of the corresponding Qt meta type.