QElectroTech
0.70
|
Namespaces | |
Icons | |
QetMessageBox | |
Functions | |
QString | license () |
QString | qetCollectionToString (const QetCollection &c) |
QET::qetCollectionToString. More... | |
QetCollection | qetCollectionFromString (const QString &str) |
QET::qetCollectionFromString. More... | |
bool | lineContainsPoint (const QLineF &, const QPointF &) |
bool | orthogonalProjection (const QPointF &, const QLineF &, QPointF *=nullptr) |
bool | attributeIsAnInteger (const QDomElement &, const QString &, int *=nullptr) |
bool | attributeIsAReal (const QDomElement &, const QString &, qreal *=nullptr) |
QString | ElementsAndConductorsSentence (int, int, int=0, int=0, int=0, int=0) |
QList< QDomElement > | findInDomElement (const QDomElement &, const QString &) |
QList< QDomElement > | findInDomElement (const QDomElement &, const QString &, const QString &) |
QList< QChar > | forbiddenCharacters () |
QString | stringToFileName (const QString &) |
QString | escapeSpaces (const QString &) |
QString | unescapeSpaces (const QString &) |
QString | joinWithSpaces (const QStringList &) |
QStringList | splitWithSpaces (const QString &) |
QString | diagramAreaToString (const QET::DiagramArea &) |
QET::DiagramArea | diagramAreaFromString (const QString &) |
qreal | round (qreal, qreal) |
qreal | correctAngle (const qreal &) |
bool | compareCanonicalFilePaths (const QString &, const QString &) |
bool | writeXmlFile (QDomDocument &xml_doc, const QString &filepath, QString *error_message=nullptr) |
bool | writeToFile (QDomDocument &xml_doc, QFile *file, QString *error_message=nullptr) |
bool | eachStrIsEqual (const QStringList &qsl) |
QET::eachStrIsEqual. More... | |
QActionGroup * | depthActionGroup (QObject *parent=nullptr) |
QET::depthActionGroup. More... | |
Variables | |
const QString | version = "0.70" |
QElectroTech version (as string, used to mark projects and elements XML documents) More... | |
const QString | displayedVersion = "0.70" |
QElectroTech displayed version. More... | |
This file provides useful functions and enums that may be used from anywhere else within the QElectroTech application.
This namespace is meant to delare icons used within the QElectroTech application.
enum QET::Action |
This enums lists the various ways to handle a standard problem when copying or moving element items (collections, categories, elements).
enum QET::DepthOption |
List the various kind of changes for the zValue.
enum QET::DiagramArea |
enum QET::Filtering |
enum QET::ItemType |
enum QET::OperationAreas |
List areas related to some common operations.
enum QET::QetCollection |
enum QET::ScalingMethod |
Supported types of interactive scaling, typically for a single element primitive.
bool QET::attributeIsAnInteger | ( | const QDomElement & | e, |
const QString & | nom_attribut, | ||
int * | entier = nullptr |
||
) |
Permet de savoir si l'attribut nom_attribut d'un element XML e est bien un entier. Si oui, sa valeur est copiee dans entier.
e | Element XML |
nom_attribut | Nom de l'attribut a analyser |
entier | Pointeur facultatif vers un entier |
Definition at line 200 of file qet.cpp.
Referenced by ElementPictureFactory::build(), Element::buildFromXml(), TitleBlockTemplate::checkCell(), TitleBlockCell::loadContentFromXml(), Element::parseInput(), TitleBlockTemplateView::pastedCells(), and QETProject::readDiagramsXml().
bool QET::attributeIsAReal | ( | const QDomElement & | e, |
const QString & | nom_attribut, | ||
qreal * | reel = nullptr |
||
) |
Permet de savoir si l'attribut nom_attribut d'un element XML e est bien un reel. Si oui, sa valeur est copiee dans reel.
e | Element XML |
nom_attribut | Nom de l'attribut a analyser |
reel | Pointeur facultatif vers un double |
Definition at line 219 of file qet.cpp.
Referenced by PartTerminal::fromXml(), PartPolygon::fromXml(), ElementPictureFactory::parseArc(), ElementPictureFactory::parseCircle(), ElementPictureFactory::parseEllipse(), Element::parseInput(), ElementPictureFactory::parseLine(), ElementPictureFactory::parsePolygon(), ElementPictureFactory::parseRect(), and Element::parseTerminal().
bool QET::compareCanonicalFilePaths | ( | const QString & | first, |
const QString & | second | ||
) |
first | Un premier chemin vers un fichier |
second | Un second chemin vers un fichier |
Definition at line 519 of file qet.cpp.
Referenced by QETTitleBlockTemplateEditor::isEditing(), and QETElementEditor::isEditing().
qreal QET::correctAngle | ( | const qreal & | angle | ) |
angle | Un angle quelconque |
Definition at line 505 of file qet.cpp.
Referenced by DiagramTextItem::applyRotation(), Element::orientation(), PartText::setRotation(), IndependentTextItem::toXml(), DiagramImageItem::toXml(), PartDynamicTextField::toXml(), DynamicElementTextItem::toXml(), DynamicElementTextModel::undoForEditedText(), and DynamicTextFieldEditor::updateForm().
QActionGroup * QET::depthActionGroup | ( | QObject * | parent = nullptr | ) |
parent |
Definition at line 636 of file qet.cpp.
References QET::Icons::BringForward, BringForward, Lower, QET::Icons::Lower, Raise, QET::Icons::Raise, SendBackward, QET::Icons::SendBackward, and QET::Icons::tr.
Referenced by QETElementEditor::setupActions(), and QETDiagramEditor::setUpActions().
QET::DiagramArea QET::diagramAreaFromString | ( | const QString & | string | ) |
string | une chaine representant un type de zone de schema |
Definition at line 488 of file qet.cpp.
References BorderArea, and ElementsArea.
Referenced by ExportProperties::fromSettings().
QString QET::diagramAreaToString | ( | const QET::DiagramArea & | diagram_area | ) |
diagram_area | un type de zone de schema |
Definition at line 478 of file qet.cpp.
References ElementsArea.
Referenced by ExportProperties::toSettings().
bool QET::eachStrIsEqual | ( | const QStringList & | qsl | ) |
qsl | list of string to compare |
Definition at line 584 of file qet.cpp.
Referenced by ConductorAutoNumerotation::numeratePotential(), and LinkElementCommand::redo().
QString QET::ElementsAndConductorsSentence | ( | int | elements_count, |
int | conductors_count, | ||
int | texts_count = 0 , |
||
int | images_count = 0 , |
||
int | shapes_count = 0 , |
||
int | element_text_count = 0 |
||
) |
Permet de composer rapidement la proposition "x elements et y conducteurs" ou encore "x elements, y conducteurs et z champs de texte".
elements_count | nombre d'elements |
conductors_count | nombre de conducteurs |
texts_count | nombre de champs de texte |
images_count | nombre d'images |
Definition at line 240 of file qet.cpp.
References QET::Icons::tr.
Referenced by MoveConductorsTextsCommand::regenerateTextLabel(), ResetConductorCommand::ResetConductorCommand(), and DiagramContent::sentence().
QString QET::escapeSpaces | ( | const QString & | string | ) |
string | une chaine de caracteres |
Definition at line 398 of file qet.cpp.
Referenced by joinWithSpaces().
QList< QDomElement > QET::findInDomElement | ( | const QDomElement & | e, |
const QString & | tag_name | ||
) |
Definition at line 300 of file qet.cpp.
Referenced by ImportElementTextPattern::apply(), Diagram::folioSequentialsFromXml(), TitleBlockProperties::fromXml(), NumerotationContext::fromXml(), DiagramContext::fromXml(), QetShapeItem::fromXml(), ElementTextItemGroup::fromXml(), TitleBlockTemplatesProjectCollection::fromXml(), Element::fromXml(), Diagram::fromXml(), QETProject::readDefaultPropertiesXml(), QETProject::readProjectPropertiesXml(), and ElementsLocation::uuid().
QList< QDomElement > QET::findInDomElement | ( | const QDomElement & | e, |
const QString & | parent, | ||
const QString & | children | ||
) |
Etant donne un element XML e, renvoie la liste de tous les elements children imbriques dans les elements parent, eux-memes enfants de l'elememt e
e | Element XML a explorer |
parent | tag XML intermediaire |
children | tag XML a rechercher |
QList< QChar > QET::forbiddenCharacters | ( | ) |
Definition at line 366 of file qet.cpp.
Referenced by stringToFileName().
QString QET::joinWithSpaces | ( | const QStringList & | string_list | ) |
Assemble une liste de chaines en une seule. Un espace separe chaque chaine. Les espaces et backslashes des chaines sont echappes.
string_list | une liste de chaine |
Definition at line 417 of file qet.cpp.
References escapeSpaces().
Referenced by main().
QString QET::license | ( | ) |
Definition at line 338 of file qet.cpp.
References QET::Icons::tr.
Referenced by AboutQET::licenseTab(), and QETApp::printLicense().
bool QET::lineContainsPoint | ( | const QLineF & | line, |
const QPointF & | point | ||
) |
line | Un segment de droite |
point | Un point |
Definition at line 149 of file qet.cpp.
Referenced by Terminal::alignedWithTerminal(), and orthogonalProjection().
bool QET::orthogonalProjection | ( | const QPointF & | point, |
const QLineF & | line, | ||
QPointF * | intersection = nullptr |
||
) |
point | Un point donne |
line | Un segment de droite donnee |
intersection | si ce pointeur est different de 0, le QPointF ainsi designe contiendra les coordonnees du projete orthogonal, meme si celui-ci n'appartient pas au segment de droite |
Definition at line 165 of file qet.cpp.
References QET::Icons::it, and lineContainsPoint().
Referenced by Conductor::movePointIntoPolygon().
QET::QetCollection QET::qetCollectionFromString | ( | const QString & | str | ) |
str | string to convert |
Definition at line 618 of file qet.cpp.
References Common, Custom, and Embedded.
Referenced by TitleBlockProperties::fromSettings(), and TitleBlockProperties::fromXml().
QString QET::qetCollectionToString | ( | const QetCollection & | c | ) |
c | QetCollection value to convert |
Definition at line 597 of file qet.cpp.
References Common, Custom, and Embedded.
Referenced by TitleBlockProperties::toSettings(), and TitleBlockProperties::toXml().
qreal QET::round | ( | qreal | x, |
qreal | epsilon | ||
) |
Round x to the nearest multiple of the invert of epsilon. For instance, epsilon = 10 will round to 1/10 = 0.1
Definition at line 497 of file qet.cpp.
Referenced by ElementPrimitiveDecorator::deltaForRoundScaling().
QStringList QET::splitWithSpaces | ( | const QString & | string | ) |
string | Une chaine de caracteres contenant des sous-chaines a extraire separees par des espaces non echappes. Les espaces des sous-chaines sont echappes. |
Definition at line 434 of file qet.cpp.
References unescapeSpaces().
Referenced by QETApp::receiveMessage().
QString QET::stringToFileName | ( | const QString & | name | ) |
Cette fonction transforme une chaine de caracteres (typiquement : un nom de schema, de projet, d'element) en un nom de fichier potable. Par nom de fichier potable, on entend un nom : ne comprenant pas de caracteres interdits sous Windows ne comprenant pas d'espace
name | Chaine de caractere a transformer en nom de fichier potable |
Definition at line 379 of file qet.cpp.
References forbiddenCharacters().
Referenced by ExportDialog::ExportDiagramLine::ExportDiagramLine(), and ProjectView::printProject().
QString QET::unescapeSpaces | ( | const QString & | string | ) |
string | une chaine de caracteres |
Definition at line 407 of file qet.cpp.
Referenced by splitWithSpaces().
bool QET::writeToFile | ( | QDomDocument & | xml_doc, |
QFile * | file, | ||
QString * | error_message = nullptr |
||
) |
Definition at line 663 of file qet.cpp.
References QET::Icons::tr.
Referenced by QETProject::writeBackup().
bool QET::writeXmlFile | ( | QDomDocument & | xml_doc, |
const QString & | filepath, | ||
QString * | error_message = nullptr |
||
) |
Export an XML document to an UTF-8 text file indented with 4 spaces, with LF end of lines and no BOM.
xml_doc | An XML document to be exported |
filepath | Path to the file to be written |
error_message | If non-zero, will contain an error message explaining what happened when this function returns false. |
Definition at line 544 of file qet.cpp.
References QET::Icons::tr.
Referenced by ECHSXmlToFile::copyDirectory(), ECHSXmlToFile::copyElement(), ElementCollectionHandler::createDir(), ExportElementTextPattern::ExportElementTextPattern(), TitleBlockTemplate::saveToXmlFile(), ElementCollectionHandler::setNames(), TitleBlockTemplatesFilesCollection::setTemplateXmlDescription(), QETElementEditor::toFile(), and QETProject::write().
const QString QET::displayedVersion = "0.70" |
QElectroTech displayed version.
Definition at line 32 of file qet.h.
Referenced by DiagramPrintDialog::exec(), BorderTitleBlock::importTitleBlock(), QETApp::printVersion(), and AboutQET::titleTab().
const QString QET::version = "0.70" |
QElectroTech version (as string, used to mark projects and elements XML documents)
Definition at line 30 of file qet.h.
Referenced by ElementPictureFactory::build(), Element::buildFromXml(), QETProject::readProjectXml(), ElementScene::toXml(), QETProject::toXml(), and Diagram::toXml().