mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Merge Qt5 branch sources folder to trunk
-Cette ligne, et les suivantes ci-dessous, seront ignorées-- M sources/aboutqet.cpp M sources/bordertitleblock.cpp M sources/conductorproperties.h M sources/configdialog.cpp M sources/configpages.cpp M sources/configpages.h M sources/createdxf.h M sources/diagram.cpp M sources/diagram.h M sources/diagramcommands.cpp M sources/diagramcommands.h M sources/diagramprintdialog.cpp M sources/diagramprintdialog.h M sources/diagramschooser.cpp M sources/diagramschooser.h M sources/diagramview.cpp M sources/diagramview.h M sources/dvevent/dveventaddimage.cpp M sources/dvevent/dveventaddshape.cpp M sources/editor/arceditor.cpp M sources/editor/arceditor.h M sources/editor/editorcommands.cpp M sources/editor/editorcommands.h M sources/editor/elementitemeditor.h M sources/editor/elementprimitivedecorator.cpp M sources/editor/elementscene.cpp M sources/editor/elementscene.h M sources/editor/elementview.cpp M sources/editor/ellipseeditor.cpp M sources/editor/ellipseeditor.h M sources/editor/esevent/eseventaddtext.cpp M sources/editor/esevent/eseventaddtextfield.cpp M sources/editor/esevent/eseventinterface.cpp M sources/editor/graphicspart/customelementpart.h M sources/editor/graphicspart/parttext.cpp M sources/editor/graphicspart/parttext.h M sources/editor/graphicspart/parttextfield.cpp M sources/editor/graphicspart/parttextfield.h M sources/editor/lineeditor.cpp M sources/editor/lineeditor.h M sources/editor/polygoneditor.cpp M sources/editor/qetelementeditor.cpp M sources/editor/qetelementeditor.h M sources/editor/rectangleeditor.cpp M sources/editor/rectangleeditor.h M sources/editor/styleeditor.cpp M sources/editor/styleeditor.h M sources/editor/terminaleditor.cpp M sources/editor/terminaleditor.h M sources/editor/texteditor.cpp M sources/editor/texteditor.h M sources/editor/textfieldeditor.cpp M sources/editor/textfieldeditor.h M sources/editor/ui/elementpropertieseditorwidget.cpp M sources/elementdefinition.cpp M sources/elementdeleter.cpp M sources/elementdeleter.h M sources/elementdialog.cpp M sources/elementscategorieslist.h M sources/elementscategorieswidget.cpp M sources/elementscategorieswidget.h M sources/elementscategory.cpp M sources/elementscategorydeleter.cpp M sources/elementscategorydeleter.h M sources/elementscategoryeditor.cpp M sources/elementscategoryeditor.h M sources/elementscollection.cpp M sources/elementscollectioncache.cpp M sources/elementspanel.cpp M sources/elementspanel.h M sources/elementspanelwidget.cpp M sources/elementspanelwidget.h M sources/elementtextsmover.h M sources/exportdialog.cpp M sources/exportdialog.h M sources/exportproperties.cpp M sources/exportpropertieswidget.cpp M sources/exportpropertieswidget.h M sources/genericpanel.cpp M sources/integrationmoveelementshandler.cpp M sources/integrationmoveelementshandler.h M sources/interactivemoveelementshandler.cpp M sources/nameslistwidget.cpp M sources/nameslistwidget.h M sources/newelementwizard.cpp M sources/newelementwizard.h M sources/nomenclature.cpp M sources/nomenclature.h M sources/projectconfigpages.cpp M sources/projectview.cpp M sources/projectview.h M sources/qet.cpp M sources/qetapp.cpp M sources/qetapp.h M sources/qetdiagrameditor.cpp M sources/qetdiagrameditor.h M sources/qetgraphicsitem/conductor.cpp M sources/qetgraphicsitem/conductortextitem.cpp M sources/qetgraphicsitem/customelement.cpp M sources/qetgraphicsitem/diagramimageitem.cpp M sources/qetgraphicsitem/diagramtextitem.cpp M sources/qetgraphicsitem/diagramtextitem.h M sources/qetgraphicsitem/element.cpp M sources/qetgraphicsitem/ghostelement.cpp M sources/qetgraphicsitem/qetshapeitem.cpp M sources/qetgraphicsitem/terminal.cpp M sources/qetgraphicsitem/terminal.h M sources/qeticons.cpp M sources/qeticons.h M sources/qetmainwindow.cpp M sources/qetmessagebox.cpp M sources/qetmessagebox.h M sources/qetprintpreviewdialog.cpp M sources/qetprintpreviewdialog.h M sources/qetproject.cpp M sources/qetsingleapplication.cpp M sources/qettabbar.h M sources/qfilenameedit.cpp M sources/qtextorientationspinboxwidget.cpp M sources/qtextorientationspinboxwidget.h M sources/qtextorientationwidget.cpp M sources/qtextorientationwidget.h M sources/richtext/richtexteditor.cpp M sources/richtext/richtexteditor_p.h M sources/richtext/ui_addlinkdialog.h M sources/titleblock/dimensionwidget.h M sources/titleblock/gridlayoutanimation.h M sources/titleblock/helpercell.h M sources/titleblock/integrationmovetemplateshandler.cpp M sources/titleblock/integrationmovetemplateshandler.h M sources/titleblock/qettemplateeditor.cpp M sources/titleblock/qettemplateeditor.h M sources/titleblock/templatecellsset.h M sources/titleblock/templatecellwidget.cpp M sources/titleblock/templatecellwidget.h M sources/titleblock/templatecommands.cpp M sources/titleblock/templatedeleter.cpp M sources/titleblock/templatedeleter.h M sources/titleblock/templatelocationchooser.cpp M sources/titleblock/templatelocationchooser.h M sources/titleblock/templatelocationsaver.cpp M sources/titleblock/templatelocationsaver.h M sources/titleblock/templatelogomanager.cpp M sources/titleblock/templatelogomanager.h M sources/titleblock/templateview.cpp M sources/titleblock/templatevisualcell.h M sources/titleblockcell.cpp M sources/titleblocktemplate.cpp M sources/treecoloranimation.h M sources/ui/conductorpropertieswidget.cpp M sources/ui/diagrampropertiesdialog.cpp M sources/ui/diagramselection.cpp M sources/ui/dialogautonum.cpp M sources/ui/dialogwaiting.cpp M sources/ui/elementpropertieswidget.cpp M sources/ui/elementselectorwidget.cpp M sources/ui/linksingleelementwidget.cpp M sources/ui/masterpropertieswidget.cpp M sources/ui/potentialtextsdialog.cpp M sources/ui/projectpropertiesdialog.cpp M sources/ui/selectautonumw.cpp M sources/ui/titleblockpropertieswidget.cpp M sources/ui/xrefpropertieswidget.cpp M sources/undocommand/changeelementinformationcommand.cpp git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3783 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
#include "numerotationcontext.h"
|
||||
#include "reportproperties.h"
|
||||
|
||||
#include <QStandardPaths>
|
||||
|
||||
QString QETProject::integration_category_name = "import";
|
||||
|
||||
/**
|
||||
@@ -255,7 +257,7 @@ void QETProject::setFilePath(const QString &filepath) {
|
||||
QString QETProject::currentDir() const {
|
||||
QString current_directory;
|
||||
if (file_path_.isEmpty()) {
|
||||
current_directory = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
|
||||
current_directory = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
|
||||
} else {
|
||||
current_directory = QFileInfo(file_path_).absoluteDir().absolutePath();
|
||||
}
|
||||
@@ -277,7 +279,7 @@ QString QETProject::pathNameTitle() const {
|
||||
if (!project_title_.isEmpty()) {
|
||||
final_title = QString(
|
||||
tr(
|
||||
"Projet \253\240%1\240\273",
|
||||
"Projet « %1 »",
|
||||
"displayed title for a ProjectView - %1 is the project title"
|
||||
)
|
||||
).arg(project_title_);
|
||||
@@ -308,7 +310,7 @@ QString QETProject::pathNameTitle() const {
|
||||
if (modified_) {
|
||||
final_title = QString(
|
||||
tr(
|
||||
"%1 [modifi\351]",
|
||||
"%1 [modifié]",
|
||||
"displayed title for a modified project - %1 is a displayable title"
|
||||
)
|
||||
).arg(final_title);
|
||||
@@ -738,7 +740,7 @@ QString QETProject::integrateElement(const QString &elmt_location, QString &erro
|
||||
QString QETProject::integrateElement(const QString &elmt_path, MoveElementsHandler *handler, QString &error_message) {
|
||||
// on s'assure que le projet a une categorie dediee aux elements importes automatiquement
|
||||
if (!ensureIntegrationCategoryExists()) {
|
||||
error_message = tr("Impossible de cr\351er la cat\351gorie pour l'int\351gration des \351l\351ments");
|
||||
error_message = tr("Impossible de créer la catégorie pour l'intégration des éléments");
|
||||
return(QString());
|
||||
}
|
||||
|
||||
@@ -749,7 +751,7 @@ QString QETProject::integrateElement(const QString &elmt_path, MoveElementsHandl
|
||||
ElementsCollectionItem *integ_item = QETApp::collectionItem(ElementsLocation::locationFromString(elmt_path));
|
||||
ElementDefinition *integ_elmt = integ_item ? integ_item -> toElement() : 0;
|
||||
if (!integ_item || !integ_elmt) {
|
||||
error_message = tr("Impossible d'acc\351der \340 l'\351l\351ment \340 int\351grer");
|
||||
error_message = tr("Impossible d'accéder à l'élément à intégrer");
|
||||
return(QString());
|
||||
}
|
||||
|
||||
@@ -766,7 +768,7 @@ QString QETProject::integrateElement(const QString &elmt_path, MoveElementsHandl
|
||||
// la categorie cible n'existe pas : on la cree par recopie
|
||||
ElementsCollectionItem *result_cat = par_cat -> copy(target_cat, handler, false);
|
||||
if (!result_cat || !result_cat -> isCategory()) {
|
||||
error_message = QString(tr("Un probl\350me s'est produit pendant la copie de la cat\351gorie %1")).arg(par_cat -> location().toString());
|
||||
error_message = QString(tr("Un problème s'est produit pendant la copie de la catégorie %1")).arg(par_cat -> location().toString());
|
||||
return(QString());
|
||||
}
|
||||
target_cat = result_cat -> toCategory();
|
||||
@@ -840,7 +842,7 @@ QString QETProject::integrateTitleBlockTemplate(const TitleBlockTemplateLocation
|
||||
src_tbt.getTemplateXmlDescription()
|
||||
);
|
||||
if (!integration) {
|
||||
handler -> errorWithATemplate(src_tbt, tr("Une erreur s'est produite durant l'int\351gration du mod\350le.", "error message"));
|
||||
handler -> errorWithATemplate(src_tbt, tr("Une erreur s'est produite durant l'intégration du modèle.", "error message"));
|
||||
target_name = QString();
|
||||
}
|
||||
return(target_name);
|
||||
@@ -961,7 +963,7 @@ QList <Diagram *> QETProject::addNewDiagramFolioList() {
|
||||
diagram_folio_list -> border_and_titleblock.importTitleBlock(defaultTitleBlockProperties());
|
||||
diagram_folio_list -> defaultConductorProperties = defaultConductorProperties();
|
||||
|
||||
diagram_folio_list -> border_and_titleblock.setTitle(tr("Liste des Sch\351mas"));
|
||||
diagram_folio_list -> border_and_titleblock.setTitle(tr("Liste des Schémas"));
|
||||
// no need to display rows and columns
|
||||
diagram_folio_list -> border_and_titleblock.displayRows(false);
|
||||
diagram_folio_list -> border_and_titleblock.displayColumns(false);
|
||||
@@ -1070,15 +1072,15 @@ void QETProject::readProjectXml() {
|
||||
project_qet_version_ = root_elmt.attribute("version").toDouble(&conv_ok);
|
||||
if (conv_ok && QET::version.toDouble() < project_qet_version_) {
|
||||
|
||||
int ret = QET::MessageBox::warning(
|
||||
int ret = QET::QetMessageBox::warning(
|
||||
0,
|
||||
tr("Avertissement", "message box title"),
|
||||
tr(
|
||||
"Ce document semble avoir \351t\351 enregistr\351 avec "
|
||||
"une version ult\351rieure de QElectroTech. Il est "
|
||||
"Ce document semble avoir été enregistré avec "
|
||||
"une version ultérieure de QElectroTech. Il est "
|
||||
"possible que l'ouverture de tout ou partie de ce "
|
||||
"document \351choue.\n"
|
||||
"Que d\351sirez vous faire ?",
|
||||
"document échoue.\n"
|
||||
"Que désirez vous faire ?",
|
||||
"message box content"
|
||||
),
|
||||
QMessageBox::Open | QMessageBox::Cancel
|
||||
@@ -1129,6 +1131,7 @@ void QETProject::readDiagramsXml() {
|
||||
// map destinee a accueillir les schemas
|
||||
QMultiMap<int, Diagram *> loaded_diagrams;
|
||||
|
||||
//@TODO try to solve a weird bug (dialog is black) since port to Qt5 with the DialogWaiting
|
||||
//show DialogWaiting
|
||||
DialogWaiting* dlgWaiting = new DialogWaiting();
|
||||
dlgWaiting -> setModal(true);
|
||||
@@ -1138,19 +1141,24 @@ void QETProject::readDiagramsXml() {
|
||||
// recherche les schemas dans le projet
|
||||
QDomNodeList diagram_nodes = document_root_.elementsByTagName("diagram");
|
||||
dlgWaiting->setProgressBarRange(0, diagram_nodes.length());
|
||||
for (uint i = 0 ; i < diagram_nodes.length() ; ++ i) {
|
||||
for (int i = 0 ; i < diagram_nodes.length() ; ++ i)
|
||||
{
|
||||
dlgWaiting->setProgressBar(i+1);
|
||||
if (diagram_nodes.at(i).isElement()) {
|
||||
if (diagram_nodes.at(i).isElement())
|
||||
{
|
||||
QDomElement diagram_xml_element = diagram_nodes.at(i).toElement();
|
||||
Diagram *diagram = new Diagram(this);
|
||||
bool diagram_loading = diagram -> initFromXml(diagram_xml_element);
|
||||
if (diagram_loading) {
|
||||
if (diagram_loading)
|
||||
{
|
||||
dlgWaiting->setDetail( diagram->title() );
|
||||
// recupere l'attribut order du schema
|
||||
int diagram_order = -1;
|
||||
if (!QET::attributeIsAnInteger(diagram_xml_element, "order", &diagram_order)) diagram_order = 500000;
|
||||
loaded_diagrams.insert(diagram_order, diagram);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
delete diagram;
|
||||
}
|
||||
}
|
||||
@@ -1378,17 +1386,17 @@ NamesList QETProject::namesListForIntegrationCategory() {
|
||||
const QChar russian_data[24] = { 0x0418, 0x043C, 0x043F, 0x043E, 0x0440, 0x0442, 0x0438, 0x0440, 0x043E, 0x0432, 0x0430, 0x043D, 0x043D, 0x044B, 0x0435, 0x0020, 0x044D, 0x043B, 0x0435, 0x043C, 0x0435, 0x043D, 0x0442, 0x044B };
|
||||
const QChar greek_data[18] = { 0x0395, 0x03b9, 0x03c3, 0x03b7, 0x03b3, 0x03bc, 0x03ad, 0x03bd, 0x03b1, 0x0020, 0x03c3, 0x03c4, 0x03bf, 0x03b9, 0x03c7, 0x03b5, 0x03af, 0x03b1 };
|
||||
|
||||
names.addName("fr", "\311l\351ments import\351s");
|
||||
names.addName("fr", "Éléments importés");
|
||||
names.addName("en", "Imported elements");
|
||||
names.addName("de", "Importierte elemente");
|
||||
names.addName("es", "Elementos importados");
|
||||
names.addName("ru", QString(russian_data, 24));
|
||||
names.addName("cs", "Zaveden\351 prvky");
|
||||
names.addName("cs", "Zavedené prvky");
|
||||
names.addName("pl", "Elementy importowane");
|
||||
names.addName("pt", "elementos importados");
|
||||
names.addName("it", "Elementi importati");
|
||||
names.addName("el", QString(greek_data, 18));
|
||||
names.addName("nl", "Elementen ge\357mporteerd");
|
||||
names.addName("nl", "Elementen geïmporteerd");
|
||||
names.addName("hr", "Uvezeni elementi");
|
||||
names.addName("ca", "Elements importats");
|
||||
names.addName("ro", "Elemente importate");
|
||||
@@ -1549,7 +1557,7 @@ ElementsLocation QETProject::copyElementWithHandler(
|
||||
ElementsCollectionItem *result_item = integ_elmt -> copy(target_cat, handler);
|
||||
ElementDefinition *result_elmt = result_item ? result_item -> toElement() : 0;
|
||||
if (!result_item || !result_elmt) {
|
||||
error_message = QString(tr("Un probl\350me s'est produit pendant la copie de l'\351l\351ment %1")).arg(integ_elmt -> location().toString());
|
||||
error_message = QString(tr("Un problème s'est produit pendant la copie de l'élément %1")).arg(integ_elmt -> location().toString());
|
||||
return(ElementsLocation());
|
||||
}
|
||||
return(result_elmt -> location());
|
||||
|
||||
Reference in New Issue
Block a user