├── .gitattributes ├── .gitignore ├── AboutData.cpp ├── ICD_Creator.pro ├── ICD_Creator.pro.user ├── SchemaInterface.h ├── StartParams.h ├── Untitled Diagram.xml ├── aboutdialog.cpp ├── aboutdialog.h ├── addprivate.cpp ├── addprivate.h ├── addtext.cpp ├── addtext.h ├── addval.cpp ├── addval.h ├── alloweditemsinsert.cpp ├── alloweditemsinsert.h ├── appendldthread.cpp ├── appendldthread.h ├── authorinfo.h ├── balsamiqsrc ├── balsamiqbasedialog.cpp ├── balsamiqbasedialog.h ├── balsamiqcontrol.cpp ├── balsamiqcontrol.h ├── balsamiqplugin.cpp ├── balsamiqplugin.h ├── balsamiqproxy.cpp ├── balsamiqproxy.h ├── balsamiqtree.cpp ├── balsamiqtree.h ├── balsamiqwork.cpp └── balsamiqwork.h ├── compare.cpp ├── compare.h ├── config.cpp ├── config.h ├── config ├── configurationgeneraloptions.cpp ├── configurationgeneraloptions.h ├── configurestyle.cpp ├── configurestyle.h ├── configvalidation.cpp └── configvalidation.h ├── configurationdialog.cpp ├── configurationdialog.h ├── controlBlock.h ├── datatypeitem.cpp ├── datatypeitem.h ├── datatypemodel.cpp ├── datatypemodel.h ├── documenttype.cpp ├── documenttype.h ├── domitem.cpp ├── domitem.h ├── dommodel.cpp ├── dommodel.h ├── editattribute.cpp ├── editattribute.h ├── editcomment.cpp ├── editcomment.h ├── editdataset.cpp ├── editdataset.h ├── editelement.cpp ├── editelement.h ├── editlnode.cpp ├── editlnode.h ├── editprocessinginstruction.cpp ├── editprocessinginstruction.h ├── editreportcontrol.cpp ├── editreportcontrol.h ├── editservices.cpp ├── editservices.h ├── editsnippet.cpp ├── editsnippet.h ├── edittextnode.cpp ├── edittextnode.h ├── findtextparams.cpp ├── findtextparams.h ├── global.h ├── icdCommunicationPage.ui ├── icdCreator.h ├── icdDataTypeTemplate.ui ├── icdDataTypeTemplateNewPage.ui ├── icdHeaderPage.ui ├── icdIedServicesPage.ui ├── icdSubstationPage.ui ├── icdWizard ├── icdcommunicationpage.cpp ├── icdcommunicationpage.h ├── icddatatypetemplatenew.cpp ├── icddatatypetemplatenew.h ├── icddatatypetemplatepage.cpp ├── icddatatypetemplatepage.h ├── icdheaderpage.cpp ├── icdheaderpage.h ├── icdiedaccesspointpage.cpp ├── icdiedaccesspointpage.h ├── icdiedservicespage.cpp ├── icdiedservicespage.h ├── icdnetiedldevicepage.cpp ├── icdnetiedldevicepage.h ├── icdsubstationpage.cpp ├── icdsubstationpage.h ├── welcomepage.cpp └── welcomepage.h ├── icdcreator.qrc ├── icdtreeview.cpp ├── icdtreeview.h ├── images ├── AddText.png ├── Attribute.png ├── DA.png ├── DO.png ├── EditAttributes.png ├── Folder.png ├── IED.png ├── LNode.png ├── LNodeType.png ├── OpenFolder.png ├── SCL.png ├── Server.png ├── accessControl.png ├── accesspoint.png ├── add.png ├── add_brother.png ├── add_child.png ├── address.png ├── application-pdf.png ├── applications-development-bkm.png ├── applications-development.png ├── applications-education-mathematics.png ├── applications-graphics.png ├── arrow-down.png ├── arrow-right.png ├── association.png ├── attrElement.png ├── attrIcon.png ├── attrType.png ├── authentication.png ├── bay.png ├── bda.png ├── bitRate.png ├── bookmark.png ├── bufReport.png ├── choice.png ├── communication.png ├── conductingEquipment.png ├── connectedAP.png ├── connectivityNode.png ├── daType.png ├── dai.png ├── dataTypeTemplate.png ├── dataset.png ├── dialog-warning.png ├── doType.png ├── document-new.png ├── document-open.png ├── document-save-as.png ├── document-save.png ├── document-validate.png ├── documentinfo.png ├── doi.png ├── edit-clear-locationbar-rtl.png ├── edit-copy.png ├── edit-cut.png ├── edit-delete.png ├── edit-find.png ├── edit-paste.png ├── edit-redo.png ├── edit-undo.png ├── empty.png ├── enumType.png ├── enumVal.png ├── exploremode.png ├── extRef.png ├── extra-attributes.png ├── fcda.png ├── function.png ├── generalEquipment.png ├── generating.gif ├── go-down.png ├── go-next.png ├── go-previous.png ├── go-up.png ├── gotonextbro.png ├── gotoparent.png ├── gotoprevbro.png ├── group.png ├── gseControl.png ├── gseSecurity.png ├── header.png ├── help-contents.png ├── hidden_children.png ├── hidden_children_bm.png ├── history.png ├── hitem.png ├── icon.png ├── iec.png ├── iedName.png ├── im-status-message-edit-bkm.png ├── im-status-message-edit.png ├── image-svg+xml.png ├── inputs.png ├── ip.png ├── ldevices.png ├── link.png ├── ln.png ├── ln0.png ├── lnNode.png ├── loading.gif ├── log.png ├── logControl.png ├── modify.png ├── optFields.png ├── physconn.png ├── powerTransformer.png ├── preferences-system.png ├── printer.png ├── private.png ├── rptEnabled.png ├── sclControl.png ├── sdi.png ├── sdo.png ├── security-high.png ├── sequence.png ├── services.png ├── servicesItem.png ├── servicesItemGroup.png ├── sessions_open.png ├── settingControl.png ├── show_children.png ├── smvControl.png ├── smvOpts.png ├── smvSecurity.png ├── split.png ├── subEquipment.png ├── subFunction.png ├── subNetwork.png ├── substation.png ├── system-search.png ├── tapChanger.png ├── terminal.png ├── text-xml.png ├── text.png ├── tools-wizard.png ├── transformerWinding.png ├── tree_close.png ├── tree_open.png ├── trgOps.png ├── unbufReport.png ├── val.png ├── validation.png ├── vcs-locally-modified.png ├── view-file-columns.png ├── view-media-visualization.png ├── view-structure-icon.png ├── view_columns.png ├── voltage.png ├── voltageLevel.png ├── window-close.png ├── xsdAttributesIcon.png ├── xsdElementsIcon.png ├── xsdReferencesIcon.png ├── xsdSimpleTypesIcon.png ├── xsdTypesIcon.png ├── xsd_base.png ├── zoom-in.png ├── zoom-original.png └── zoom-out.png ├── ipaddredit.cpp ├── ipaddredit.h ├── ippartlineedit.cpp ├── ippartlineedit.h ├── log.h ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── modifylnodeid.cpp ├── modifylnodeid.h ├── navigation.h ├── navigationbox.cpp ├── navigationbox.h ├── netaicdwizard.cpp ├── netaicdwizard.h ├── newtemplatelnodemodel.cpp ├── newtemplatelnodemodel.h ├── nodetablewidget.cpp ├── nodetablewidget.h ├── paintinfo.cpp ├── paintinfo.h ├── parsescdthread.cpp ├── parsescdthread.h ├── plugin.h ├── preferreddirs.cpp ├── preferreddirs.h ├── qitemaction.cpp ├── qitemaction.h ├── qxmledit.h ├── qxmleditdata.cpp ├── qxmleditdata.h ├── recodericdwizard.cpp ├── recodericdwizard.h ├── scansax.cpp ├── scansax.h ├── schemachooser.cpp ├── schemachooser.h ├── schemavalidator.cpp ├── schemavalidator.h ├── searchinfiles.cpp ├── searchinfiles.h ├── services ├── loghandler.cpp └── loghandler.h ├── setmodelthread.cpp ├── setmodelthread.h ├── snippet.cpp ├── snippet.h ├── snippet_interface.h ├── snippethandler.cpp ├── snippethandler.h ├── style.cpp ├── style.h ├── stylepersistence.cpp ├── stylepersistence.h ├── test.cpp ├── test.h ├── texteditutils.cpp ├── texteditutils.h ├── undo ├── undobasechangeelement.cpp ├── undobasechangeelement.h ├── undocommand.cpp ├── undocommand.h ├── undodeletecommand.cpp ├── undodeletecommand.h ├── undoeditcommand.cpp ├── undoeditcommand.h ├── undoinsertcommand.cpp ├── undoinsertcommand.h ├── undomanager.cpp ├── undomanager.h ├── undomovedowncommand.cpp ├── undomovedowncommand.h ├── undomoveupcommand.cpp └── undomoveupcommand.h ├── utils.cpp ├── utils.h ├── validationresults.cpp ├── validationresults.h ├── validatormessagehandler.cpp ├── validatormessagehandler.h ├── xmleditglobals.cpp ├── xmleditglobals.h ├── xmleditwidget.cpp ├── xmleditwidget.h ├── xmleditwidgetprivate.cpp ├── xmleditwidgetprivate.h ├── xmlutils.cpp ├── xmlutils.h ├── xsaxhandler.cpp ├── xsaxhandler.h └── xsdeditor ├── XAnnotation.cpp ├── XFactory.cpp ├── XSCContent.cpp ├── XSDScene.cpp ├── XSDSchema.cpp ├── XSDSchemaSequence.cpp ├── XSchemaAttribute.cpp ├── XSchemaChoice.cpp ├── XSchemaElement.cpp ├── XSchemaIOContants.h ├── XSchemaObject.cpp ├── XSchemaTopLevel.cpp ├── XsdException.cpp ├── items ├── XSchemaBaseItems.cpp ├── XSchemaCompositeItems.cpp ├── XSchemaDerivedItems.cpp ├── graphicitems.cpp └── xgraphicsitems.h ├── navigationtree.cpp ├── navigationtree.h ├── validator ├── schemasearchcontext.cpp ├── schemasearchcontext.h ├── xcollect.cpp ├── xelementcontent.cpp ├── xelementcontent.h ├── xsingleelementcontent.cpp ├── xsingleelementcontent.h ├── xvalidationcontext.cpp └── xvalidationcontext.h ├── widgets ├── WidgetUtility.h ├── XEditorInterface.h ├── elementeditor.cpp ├── elementeditor.h ├── elementeditor.ui ├── widgetutility.cpp ├── xsdattributeeditor.cpp ├── xsdattributeeditor.h ├── xsdattributeeditor.ui ├── xsdchoiceeditor.cpp ├── xsdchoiceeditor.h ├── xsdchoiceeditor.ui ├── xsdgenericeditor.cpp ├── xsdgenericeditor.h ├── xsdgenericeditor.ui ├── xsdrooteditor.cpp ├── xsdrooteditor.h ├── xsdrooteditor.ui ├── xsdsequenceeditor.cpp ├── xsdsequenceeditor.h └── xsdsequenceeditor.ui ├── xproperties.h ├── xschema.h ├── xschemaloader.cpp ├── xschemaloader.h ├── xsdcontent.h ├── xsdcontroller.cpp ├── xsdcontroller.h ├── xsddefinitions.h ├── xsdgraphiccontext.cpp ├── xsdgraphiccontext.h ├── xsdparseutils.h ├── xsdplugin.cpp ├── xsdplugin.h ├── xsdsctypes.cpp ├── xsdsctypes.h ├── xsdtypes.h ├── xsdwindow.cpp ├── xsdwindow.h ├── xsdwindow.ui └── xtypes.h /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | -------------------------------------------------------------------------------- /AboutData.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "authorinfo.h" 3 | #include "icdCreator.h" 4 | 5 | QList authorsInfo() 6 | { 7 | QList authors ; 8 | AuthorInfo *newAuthor; 9 | newAuthor = new AuthorInfo("Michael", "zhl.debug@gmail.com", AR_DEVELOPER, ""); 10 | authors.append(newAuthor); 11 | newAuthor = new AuthorInfo("mike", "", AR_CONTRIBUTOR, ""); 12 | authors.append(newAuthor); 13 | newAuthor = new AuthorInfo("mike", "", AR_TRANSLATOR, "CN"); 14 | authors.append(newAuthor); 15 | return authors ; 16 | } 17 | 18 | void deleteAuthorsInfo(QList &authors) 19 | { 20 | foreach(AuthorInfo * author, authors) { 21 | delete author; 22 | } 23 | authors.clear(); 24 | } 25 | 26 | const QString AuthorInfo::appName(APPLICATION_NAME) ; 27 | const QString AuthorInfo::version(VERSION_ID) ; 28 | const QString AuthorInfo::copyright = QString::fromUtf8("\u00A9 2014-2016 GDWY"); 29 | const QString AuthorInfo::license("GNU Library Public License Version 2"); 30 | const QString AuthorInfo::other("Icons by easyicon (www.easyicon.net), covered by LGPLv3 license (see README document)"); 31 | 32 | 33 | -------------------------------------------------------------------------------- /SchemaInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHEMAINTERFACE_H 2 | #define SCHEMAINTERFACE_H 3 | 4 | QString chooseSchemaFile(QWidget *parent, bool &isOk); 5 | 6 | #endif // SCHEMAINTERFACE_H 7 | -------------------------------------------------------------------------------- /StartParams.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef STARTPARAMS_H 25 | #define STARTPARAMS_H 26 | 27 | class StartParams 28 | { 29 | public: 30 | enum ESPType { 31 | Nothing, 32 | OpenFile, 33 | VisFile 34 | }; 35 | 36 | ESPType type; 37 | QString fileName; 38 | bool parametersError ; 39 | 40 | StartParams() { 41 | fileName = "" ; 42 | type = Nothing; 43 | parametersError = false ; 44 | } 45 | }; 46 | 47 | #endif // STARTPARAMS_H 48 | -------------------------------------------------------------------------------- /Untitled Diagram.xml: -------------------------------------------------------------------------------- 1 | 7ZtRc6o4FMc/jY/tkAQRHhWxt7Pt9U51731OIWKmgThIq91Pv4kGBYIt3VGhq76UnIQEzv8k5HegHeRG67sEL+aPPCCsA41g3UHDDoTARKb4Iy3vW4vpOFtDmNBANdobJvQfooyGsr7SgCwLDVPOWUoXRaPP45j4acGGk4Svis1mnBVHXeCQaIaJj1lmve3u7X9okM6VHVjOvuIHoeFcDW5Da1vxjP2XMOGvsRqxA9Fs89tWRzjrS93qco4DvsqZkNdBbsJ5uj2K1i5h0ruZ47Lz0vfsajtoME8jJgpAHG6qRwdOBnVOFjeXkDjND3eoP8sIsP3szExomWaA8A3c9vCG2Ws2QHnE1ZymZLLAviyvRAAVL2HjOxKo0s49hiykCX/Z6WELy4zHqQofKFtgRsNYFHxx/SSRDShjLmc82YyNRt4Qgt6uq3zN5lfpAuW0N5KkZJ0zKZfcER6RNHkXTVQtAioYsvA3VDit9qEEbSXkPBdFJlJGrAI43PW9F0EcKB1qaoI0TfrT6VPfnWrSiPtLi2oU/RTzmJScqkya46W3qJhRfVUR0SCQwwyq5N9rbpQ1zyvcU+Uq2Tbt1J2AU2gIa2ponUJCU5NwwHjYgRaTegX0TRyG8vAv8r7iSbDMqsRIudqKEybcp1iO/UgCig+d9q3iBJgfxMkJQqNXNzScU4SG9fmKy+jG98Xls7Tyf2EKfrjIKp1Pu76i0ty0KwQwKwQApxCgdxWgV/WAO5sAtibARDzeft55TxNNCdGV2EQeWl/qyVGU0apYfD7bhgxGA7PvfKjSCdcv2HUK6nVNXT0AuhXqZcajyud8Pn/yD5q8EgFeznca1X+0iD4WsudoHUp+ud0iA7yVI9IlCfqyLLuXDjJupcIbtjHlMDFPfekk4QuhEhH7eTmYaGbqUVMIFFAxkz99bG7xAfr+caQ3jeLE7faQLr1xrl0NqLF0NkoLI9cw9N3Nkadj12kVLQB9OXXHP397T1dc+IqIjeIC0NfUEU+iZcX+38WMLW9SftP3U8rj2tzwgOOAxgJBjF84JAd541tFzKnBoRwkzYJDlkm6pI2rVab6Rslhd/0XrECz6JA5PKfA7/vJ/XTcWnRATm/Y7zeFDl3UKnSAempTk+3KDkdiB8tuEztAPSWqSd8sOwzOwA52r1XskO1n8uzwMJ5432wfeFZy0CRslBygnk72IkxZ1ZsD4W/M6r9p+MOTlxmT72avrPD1sGiYFS4wyW2Xkb5ZVtDTMhenQMOsoCdVHrz+sK2g4I0c1EVNgYINWgUKqEau4woKRwIFx2oTKKAaSZZmP0lyHMP4cJ4eQRMxrVpFCkhPvAy9h/u7H9e3DF9SsVFYQHr6xXsTd1f1nmH3ndF9/MzX9T9PinCSirNc4Unptys6/IcoaZYdUI1Mzf9t5wpAmeobhQek52UuT4Jm6QHpiRX378l0/Njer5Qse2B33aYIAhhOuxCiRgrkihBHQggAzVYxhJ58+fU0fhxP2zt5ByMLOY29JwSod8bJK4r7f5jZ1OX+Lwl5/wI= -------------------------------------------------------------------------------- /aboutdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef ABOUTDIALOG_H 2 | #define ABOUTDIALOG_H 3 | 4 | #include 5 | #include "authorinfo.h" 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | class AboutDialog : public QDialog 21 | { 22 | Q_OBJECT 23 | public: 24 | explicit AboutDialog(QWidget *parent, 25 | const QString &appName, const QString &setVersion, 26 | const QString ©Right, const QString &setLicense, const QString &otherLicense, 27 | const QList &authors); 28 | ~AboutDialog(); 29 | QString contactInfo(const QString &info); 30 | 31 | private: 32 | 33 | QDialogButtonBox *buttonBox; 34 | QTabWidget *tabWidget; 35 | QWidget *tab; 36 | QLabel *copyR; 37 | QLabel *label_5; 38 | QLabel *label_3; 39 | QLabel *icons; 40 | QLabel *license; 41 | QWidget *tab_2; 42 | QLabel *label_4; 43 | QTreeWidget *authorsWidget; 44 | QLabel *label; 45 | QLabel *applicationName; 46 | QFrame *line; 47 | QLabel *version; 48 | QLabel *envir; 49 | QLabel *label_2; 50 | 51 | void init(); 52 | void retranslateUi(); 53 | 54 | }; 55 | 56 | #endif // ABOUTDIALOG_H 57 | -------------------------------------------------------------------------------- /addprivate.cpp: -------------------------------------------------------------------------------- 1 | #include "addprivate.h" 2 | #include "domitem.h" 3 | 4 | AddPrivate::AddPrivate(QWidget *parent) : 5 | QDialog(parent) 6 | { 7 | setWindowTitle(tr("Add Private")); 8 | target = NULL; 9 | init(); 10 | } 11 | 12 | 13 | AddPrivate::~AddPrivate() 14 | { 15 | 16 | } 17 | 18 | void AddPrivate::init() 19 | { 20 | layout = new QGridLayout(this); 21 | layout->setObjectName(tr("layout")); 22 | 23 | privateLabel = new QLabel(this); 24 | privateLabel->setObjectName(tr("privateLabel")); 25 | privateLabel->setText(tr("请输入private内容: ")); 26 | privateText = new QLineEdit(this); 27 | privateText->setObjectName(tr("privateText")); 28 | 29 | typeLabel = new QLabel(this); 30 | typeLabel->setObjectName(tr("typeLabel")); 31 | typeLabel->setText(tr("type: ")); 32 | typeText = new QLineEdit(this); 33 | typeText->setObjectName(tr("typeText")); 34 | 35 | sourceCheckBox = new QCheckBox(this); 36 | sourceCheckBox->setObjectName(tr("sourceCheckBox")); 37 | sourceCheckBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 38 | sourceLabel = new QLabel(this); 39 | sourceLabel->setObjectName(tr("sourceLabel")); 40 | sourceLabel->setText(tr("source: ")); 41 | sourceText = new QLineEdit(this); 42 | sourceText->setObjectName(tr("sourceText")); 43 | 44 | buttonBox = new QDialogButtonBox(this); 45 | buttonBox->setObjectName(tr("buttonBox")); 46 | 47 | buttonBox->setOrientation(Qt::Horizontal); 48 | buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); 49 | buttonBox->setCenterButtons(false); 50 | 51 | layout->addWidget(privateLabel, 0, 1, 1, 1); 52 | layout->addWidget(privateText, 0, 2, 1, 1); 53 | layout->addWidget(typeLabel, 1, 1, 1, 1); 54 | layout->addWidget(typeText, 1, 2, 1, 1); 55 | layout->addWidget(sourceCheckBox, 2, 0, 1, 1); 56 | layout->addWidget(sourceLabel, 2, 1, 1, 1); 57 | layout->addWidget(sourceText, 2, 2, 1, 1); 58 | layout->addWidget(buttonBox, 3, 2, 1, 1); 59 | 60 | connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); 61 | connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); 62 | } 63 | 64 | void AddPrivate::setTarget(DomItem *item) 65 | { 66 | target = item; 67 | } 68 | 69 | void AddPrivate::accept() 70 | { 71 | target->addAttribute("type", typeText->text()); 72 | if(sourceCheckBox->isChecked()) { 73 | target->addAttribute("source", sourceText->text()); 74 | } 75 | TextChunk *textContent = new TextChunk(false, privateText->text()); 76 | target->addTextNode(textContent); 77 | 78 | QDialog::accept(); 79 | } 80 | -------------------------------------------------------------------------------- /addprivate.h: -------------------------------------------------------------------------------- 1 | #ifndef ADDPRIVATE_H 2 | #define ADDPRIVATE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class DomItem; 12 | 13 | class AddPrivate : public QDialog 14 | { 15 | Q_OBJECT 16 | public: 17 | AddPrivate(QWidget *parent = 0); 18 | ~AddPrivate(); 19 | 20 | void setTarget(DomItem *item); 21 | 22 | private: 23 | QLabel *privateLabel; 24 | QLineEdit *privateText; 25 | QLabel *typeLabel; 26 | QLineEdit *typeText; 27 | QCheckBox *sourceCheckBox; 28 | QLabel *sourceLabel; 29 | QLineEdit *sourceText; 30 | QDialogButtonBox *buttonBox; 31 | 32 | QGridLayout *layout; 33 | 34 | DomItem *target; 35 | 36 | void init(); 37 | 38 | void accept(); 39 | signals: 40 | 41 | public slots: 42 | 43 | }; 44 | 45 | #endif // ADDPRIVATE_H 46 | -------------------------------------------------------------------------------- /addtext.cpp: -------------------------------------------------------------------------------- 1 | #include "addtext.h" 2 | #include "domitem.h" 3 | 4 | AddText::AddText(QWidget *parent) : 5 | QDialog(parent) 6 | { 7 | setWindowTitle(tr("Add Text")); 8 | target = NULL; 9 | init(); 10 | } 11 | 12 | 13 | AddText::~AddText() 14 | { 15 | 16 | } 17 | 18 | void AddText::init() 19 | { 20 | layout = new QGridLayout(this); 21 | layout->setObjectName(tr("layout")); 22 | 23 | textLabel = new QLabel(this); 24 | textLabel->setObjectName(tr("textLabel")); 25 | textLabel->setText(tr("请输入Text内容: ")); 26 | textText = new QLineEdit(this); 27 | textText->setObjectName(tr("textText")); 28 | 29 | sourceCheckBox = new QCheckBox(this); 30 | sourceCheckBox->setObjectName(tr("sourceCheckBox")); 31 | sourceCheckBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 32 | sourceLabel = new QLabel(this); 33 | sourceLabel->setObjectName(tr("sourceLabel")); 34 | sourceLabel->setText(tr("source: ")); 35 | sourceText = new QLineEdit(this); 36 | sourceText->setObjectName(tr("sourceText")); 37 | 38 | buttonBox = new QDialogButtonBox(this); 39 | buttonBox->setObjectName(tr("buttonBox")); 40 | 41 | buttonBox->setOrientation(Qt::Horizontal); 42 | buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); 43 | buttonBox->setCenterButtons(false); 44 | 45 | layout->addWidget(textLabel, 0, 1, 1, 1); 46 | layout->addWidget(textText, 0, 2, 1, 1); 47 | layout->addWidget(sourceCheckBox, 1, 0, 1, 1); 48 | layout->addWidget(sourceLabel, 1, 1, 1, 1); 49 | layout->addWidget(sourceText, 1, 2, 1, 1); 50 | layout->addWidget(buttonBox, 2, 2, 1, 1); 51 | 52 | connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); 53 | connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); 54 | } 55 | 56 | void AddText::setTarget(DomItem *item) 57 | { 58 | target = item; 59 | } 60 | 61 | void AddText::accept() 62 | { 63 | if(sourceCheckBox->isChecked()) { 64 | target->addAttribute("source", sourceText->text()); 65 | } 66 | TextChunk *textContent = new TextChunk(false, textText->text()); 67 | target->addTextNode(textContent); 68 | // target->isMixedContent() = true; 69 | 70 | QDialog::accept(); 71 | } 72 | -------------------------------------------------------------------------------- /addtext.h: -------------------------------------------------------------------------------- 1 | #ifndef ADDTEXT_H 2 | #define ADDTEXT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class DomItem; 12 | 13 | class AddText : public QDialog 14 | { 15 | Q_OBJECT 16 | public: 17 | AddText(QWidget *parent = 0); 18 | ~AddText(); 19 | 20 | void setTarget(DomItem *item); 21 | 22 | private: 23 | QLabel *textLabel; 24 | QLineEdit *textText; 25 | QCheckBox *sourceCheckBox; 26 | QLabel *sourceLabel; 27 | QLineEdit *sourceText; 28 | QDialogButtonBox *buttonBox; 29 | 30 | QGridLayout *layout; 31 | 32 | DomItem *target; 33 | 34 | void init(); 35 | 36 | void accept(); 37 | signals: 38 | 39 | public slots: 40 | 41 | }; 42 | 43 | #endif // ADDTEXT_H 44 | -------------------------------------------------------------------------------- /addval.cpp: -------------------------------------------------------------------------------- 1 | #include "addval.h" 2 | #include "domitem.h" 3 | 4 | AddVal::AddVal(QWidget *parent) : 5 | QDialog(parent) 6 | { 7 | setWindowTitle(tr("Add Val")); 8 | target = NULL; 9 | init(); 10 | } 11 | 12 | 13 | AddVal::~AddVal() 14 | { 15 | 16 | } 17 | 18 | void AddVal::init() 19 | { 20 | layout = new QGridLayout(this); 21 | layout->setObjectName(tr("layout")); 22 | 23 | valLabel = new QLabel(this); 24 | valLabel->setObjectName(tr("valLabel")); 25 | valLabel->setText(tr("请输入val值: ")); 26 | valText = new QLineEdit(this); 27 | valText->setObjectName(tr("valText")); 28 | 29 | buttonBox = new QDialogButtonBox(this); 30 | buttonBox->setObjectName(tr("buttonBox")); 31 | 32 | buttonBox->setOrientation(Qt::Horizontal); 33 | buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); 34 | buttonBox->setCenterButtons(false); 35 | 36 | layout->addWidget(valLabel, 0, 1, 1, 1); 37 | layout->addWidget(valText, 0, 2, 1, 1); 38 | layout->addWidget(buttonBox, 2, 2, 1, 1); 39 | 40 | connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); 41 | connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); 42 | } 43 | 44 | void AddVal::setTarget(DomItem *item) 45 | { 46 | target = item; 47 | } 48 | 49 | void AddVal::accept() 50 | { 51 | TextChunk *valContent = new TextChunk(false, valText->text()); 52 | target->addTextNode(valContent); 53 | // target->isMixedContent() = true; 54 | 55 | QDialog::accept(); 56 | } 57 | -------------------------------------------------------------------------------- /addval.h: -------------------------------------------------------------------------------- 1 | #ifndef ADDVAL_H 2 | #define ADDVAL_H 3 | 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | class DomItem; 13 | 14 | class AddVal : public QDialog 15 | { 16 | Q_OBJECT 17 | public: 18 | AddVal(QWidget *parent = 0); 19 | ~AddVal(); 20 | 21 | void setTarget(DomItem *item); 22 | 23 | private: 24 | QLabel *valLabel; 25 | QLineEdit *valText; 26 | QDialogButtonBox *buttonBox; 27 | 28 | QGridLayout *layout; 29 | 30 | DomItem *target; 31 | 32 | void init(); 33 | 34 | void accept(); 35 | signals: 36 | 37 | public slots: 38 | 39 | }; 40 | 41 | 42 | #endif // ADDVAL_H 43 | -------------------------------------------------------------------------------- /alloweditemsinsert.h: -------------------------------------------------------------------------------- 1 | #ifndef ALLOWEDITEMSINSERT_H 2 | #define ALLOWEDITEMSINSERT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include "xsdeditor/validator/xelementcontent.h" 24 | 25 | class AllowedItemsInsert : public QDialog 26 | { 27 | Q_OBJECT 28 | 29 | XElementContent *_content; 30 | QList *_selection; 31 | 32 | void collectSelected(QTreeWidgetItem *parentItem); 33 | void addItem(XSingleElementContent *target, QTreeWidgetItem *parentItem); 34 | void unselectRecursive(QTreeWidgetItem *item); 35 | bool isSameItem(QTreeWidgetItem *item, XSingleElementContent *reference); 36 | void saveState(); 37 | void enableControls(); 38 | void restoreState(); 39 | public: 40 | explicit AllowedItemsInsert(XElementContent *content, QList*result, QWidget *parent = 0); 41 | ~AllowedItemsInsert(); 42 | 43 | private: 44 | 45 | QVBoxLayout *verticalLayout; 46 | QLabel *label; 47 | QTreeWidget *allowedItems; 48 | QHBoxLayout *horizontalLayout; 49 | QToolButton *undo; 50 | QToolButton *redo; 51 | QSpacerItem *horizontalSpacer; 52 | QDialogButtonBox *buttonBox; 53 | 54 | void init(); 55 | void retranslateUi(); 56 | void accept(); 57 | 58 | public slots: 59 | void on_allowedItems_itemClicked(QTreeWidgetItem * item, int column); 60 | void on_undo_clicked(); 61 | void on_redo_clicked(); 62 | }; 63 | 64 | bool ChooseItemsBySchema(QWidget *parent, XElementContent *content, QList *result); 65 | 66 | #endif // ALLOWEDITEMSINSERT_H 67 | -------------------------------------------------------------------------------- /authorinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef AUTHORINFO_H 2 | #define AUTHORINFO_H 3 | 4 | #include 5 | #include 6 | 7 | enum EAuthorRole { 8 | AR_DEVELOPER, 9 | AR_TRANSLATOR, 10 | AR_CONTRIBUTOR 11 | }; 12 | 13 | class AuthorInfo 14 | { 15 | public: 16 | QString name; 17 | QString contactInfo; 18 | QString specialities; 19 | EAuthorRole role; 20 | 21 | AuthorInfo(const QString &newName, const QString &newContactInfo, const EAuthorRole newRole, const QString &newSpecialities) { 22 | name = newName ; 23 | contactInfo = newContactInfo; 24 | role = newRole; 25 | specialities = newSpecialities; 26 | } 27 | 28 | static const QString appName; 29 | static const QString version; 30 | static const QString copyright; 31 | static const QString license; 32 | static const QString other; 33 | 34 | }; 35 | 36 | 37 | QList authorsInfo(); 38 | void deleteAuthorsInfo(QList &authors); 39 | 40 | #endif // AUTHORINFO_H 41 | -------------------------------------------------------------------------------- /balsamiqsrc/balsamiqplugin.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef BALSAMIQPLUGIN_H 25 | #define BALSAMIQPLUGIN_H 26 | 27 | #include "global.h" 28 | 29 | #include "plugin.h" 30 | 31 | class LIBQXMLEDITSHARED_EXPORT BalsamiqPlugin : public IQXmlEditPlugIn 32 | { 33 | Q_OBJECT 34 | public: 35 | BalsamiqPlugin(); 36 | ~BalsamiqPlugin(); 37 | 38 | QString name() ; 39 | QString description() ; 40 | QString version() ; 41 | bool go(QWidget *parent, DomModel *data); 42 | bool goTest(QWidget *parent); 43 | }; 44 | 45 | #endif // BALSAMIQPLUGIN_H 46 | -------------------------------------------------------------------------------- /controlBlock.h: -------------------------------------------------------------------------------- 1 | #ifndef CONTROLBLOCK_H 2 | #define CONTROLBLOCK_H 3 | 4 | struct controlBlock{ 5 | QString iedName; 6 | QString cbName; 7 | QString APPID; 8 | QString iedDesc; 9 | QString MAC; 10 | }; 11 | 12 | 13 | #endif // CONTROLBLOCK_H 14 | -------------------------------------------------------------------------------- /documenttype.cpp: -------------------------------------------------------------------------------- 1 | #include "documenttype.h" 2 | 3 | #include "documenttype.h" 4 | 5 | DocumentType::DocumentType() 6 | { 7 | } 8 | 9 | DocumentType::~DocumentType() 10 | { 11 | } 12 | 13 | 14 | QString DocumentType::docType() 15 | { 16 | return _docType ; 17 | } 18 | 19 | 20 | void DocumentType::setDocType(const QString& value) 21 | { 22 | _docType = value ; 23 | } 24 | 25 | 26 | QString DocumentType::systemId() 27 | { 28 | return _systemId ; 29 | } 30 | 31 | 32 | void DocumentType::setSystemId(const QString& value) 33 | { 34 | _systemId = value ; 35 | } 36 | 37 | 38 | QString DocumentType::publicId() 39 | { 40 | return _publicId ; 41 | } 42 | 43 | 44 | void DocumentType::setPublicId(const QString& value) 45 | { 46 | _publicId = value ; 47 | } 48 | 49 | bool DocumentType::hasDocType() 50 | { 51 | if(_docType.isEmpty()) { 52 | return false; 53 | } 54 | return true ; 55 | } 56 | 57 | QDomDocument DocumentType::createDocument() 58 | { 59 | if(hasDocType()) { 60 | QDomImplementation implementation; 61 | QDomDocumentType documentType = implementation.createDocumentType(docType(), publicId(), systemId()); 62 | QDomDocument document(documentType); 63 | return document; 64 | } else { 65 | QDomDocument document; 66 | return document; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /documenttype.h: -------------------------------------------------------------------------------- 1 | #ifndef DOCUMENTTYPE_H 2 | #define DOCUMENTTYPE_H 3 | 4 | #include 5 | 6 | /** 7 | \brief XML document type 8 | */ 9 | class DocumentType 10 | { 11 | QString _docType; 12 | QString _systemId; 13 | QString _publicId; 14 | 15 | public: 16 | DocumentType(); 17 | ~DocumentType(); 18 | 19 | QString docType(); 20 | void setDocType(const QString& value); 21 | QString systemId(); 22 | void setSystemId(const QString& value); 23 | QString publicId(); 24 | void setPublicId(const QString& value); 25 | 26 | 27 | bool hasDocType(); 28 | 29 | QDomDocument createDocument(); 30 | 31 | }; 32 | 33 | #endif // DOCUMENTTYPE_H 34 | -------------------------------------------------------------------------------- /editattribute.h: -------------------------------------------------------------------------------- 1 | #ifndef EDITATTRIBUTE_H 2 | #define EDITATTRIBUTE_H 3 | 4 | #include 5 | 6 | #include 7 | #include "domitem.h" 8 | 9 | class EditAttribute : public QDialog 10 | { 11 | Q_OBJECT 12 | public: 13 | EditAttribute(QWidget *parent = 0); 14 | ~EditAttribute(); 15 | 16 | QColor modColor; 17 | 18 | void setTarget(DomItem *item); 19 | 20 | private: 21 | 22 | DomItem *target; 23 | 24 | QGridLayout *layout; 25 | QGroupBox *treeGroupBox; 26 | QPushButton *applyButton; 27 | QPushButton *okButton; 28 | QPushButton *cancelButton; 29 | QDialogButtonBox *buttonBox; 30 | QTreeWidget *attrTree; 31 | 32 | QString titleText; 33 | 34 | static bool attributeIsChanged; 35 | 36 | 37 | signals: 38 | 39 | public slots: 40 | void accept(); 41 | // void on_okButton_clicked(); 42 | // void on_applyButton_clicked(); 43 | // void on_cancelButton_clicked(); 44 | 45 | void showMenu(QPoint pos); 46 | void attributeChanged(QTreeWidgetItem *item, int column); 47 | void deleteAttribute(); 48 | }; 49 | 50 | #endif // EDITATTRIBUTE_H 51 | -------------------------------------------------------------------------------- /editcomment.h: -------------------------------------------------------------------------------- 1 | #ifndef EDITCOMMENT_H 2 | #define EDITCOMMENT_H 3 | 4 | #include 5 | 6 | #include 7 | #include "domitem.h" 8 | 9 | class EditComment : public QDialog 10 | { 11 | Q_OBJECT 12 | 13 | DomItem *target; 14 | 15 | public: 16 | EditComment(QWidget *parent = 0); 17 | ~EditComment(); 18 | 19 | void setTarget(DomItem *pTarget); 20 | 21 | private: 22 | void error(const QString& message); 23 | void init(); 24 | 25 | void retranslateUi() 26 | { 27 | setWindowTitle(QApplication::translate("EditComment", "Edit Comment", 0, QApplication::UnicodeUTF8)); 28 | } 29 | 30 | QVBoxLayout *verticalLayout_2; 31 | QVBoxLayout *verticalLayout; 32 | QPlainTextEdit *commentText; 33 | QDialogButtonBox *buttonBox; 34 | 35 | private slots: 36 | void accept(); 37 | void on_commentText_textChange(); 38 | 39 | 40 | }; 41 | 42 | #endif // EDITCOMMENT_H 43 | -------------------------------------------------------------------------------- /editdataset.h: -------------------------------------------------------------------------------- 1 | #ifndef EDITDATASET_H 2 | #define EDITDATASET_H 3 | 4 | #include 5 | #include 6 | 7 | class DomItem; 8 | class DomModel; 9 | 10 | class EditDataSet : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | DomItem *target; 15 | public: 16 | EditDataSet(QWidget *parent = 0); 17 | ~EditDataSet(); 18 | 19 | bool setTarget(DomItem *pItem); 20 | 21 | signals: 22 | 23 | public slots: 24 | void accept(); 25 | 26 | private: 27 | 28 | void error(const QString& message); 29 | 30 | QLabel *dataSetNameLabel; 31 | QLineEdit *dataSetNameText; 32 | 33 | QGridLayout *dataSetGridLayout; 34 | QComboBox *LNodeComboBox; 35 | QComboBox *fcComboBox; 36 | QSplitter *dataSetSplitter; 37 | QTreeWidget *LNodeTree; 38 | QListWidget *fcdaList; 39 | 40 | QDialogButtonBox *buttonBox; 41 | 42 | DomModel *model; 43 | 44 | QHash dataSetItems; 45 | QSet FC; 46 | void init(); 47 | 48 | QVector _fcItems; 49 | QVector _doItems; 50 | 51 | bool getDataSetItems(DomItem *item); 52 | 53 | typedef struct _fcda{ 54 | bool hasDaName; 55 | QString daName; 56 | bool hasDoName; 57 | QString doName; 58 | QString fc; 59 | bool hasLdInst; 60 | QString ldInst; 61 | bool hasLnInst; 62 | QString lnInst; 63 | bool hasLnClass; 64 | QString lnClass; 65 | }fcda; 66 | 67 | // QVector fcdaItems; 68 | QSet fcdaItems; 69 | 70 | private slots: 71 | void showFCDA(QTreeWidgetItem*, int); 72 | 73 | }; 74 | 75 | #endif // EDITDATASET_H 76 | -------------------------------------------------------------------------------- /editlnode.h: -------------------------------------------------------------------------------- 1 | #ifndef EDITLNODE_H 2 | #define EDITLNODE_H 3 | 4 | #include 5 | 6 | #include 7 | #include "domitem.h" 8 | #include 9 | 10 | class EditLNode : public QDialog 11 | { 12 | Q_OBJECT 13 | DomItem *target; 14 | bool isMixedContent; 15 | QColor modColor; 16 | bool isStarted; 17 | public: 18 | explicit EditLNode(QWidget *parent = 0); 19 | ~EditLNode(); 20 | 21 | void setTarget(DomItem *pItem); 22 | 23 | public slots: 24 | void accept(); 25 | 26 | private: 27 | void init(); 28 | 29 | void error(const QString& message); 30 | void errorNoAttrData(); 31 | void errorNoAttrSel(); 32 | bool validateAttr(const QString &name); 33 | bool checkTagSyntax(const QString &theTag); 34 | 35 | QHash LNodeClass; 36 | 37 | QGridLayout *editLNodeGridLayout; 38 | QLabel *path; 39 | QGroupBox *LNodeGroupBox; 40 | QGridLayout *LNodeGridLayout; 41 | 42 | QLabel *LNodeInstLabel; 43 | QLineEdit *LNodeInstText; 44 | QLabel *LNodeLnClassLabel; 45 | QLineEdit *LNodeLnClassText; 46 | QLabel *LNodeLnTypeLabel; 47 | // QLineEdit *LNodeLnTypeText; 48 | QComboBox *LNodeLnTypeComboBox; 49 | QCheckBox *LNodeDescCheckBox; 50 | QLabel *LNodeDescLabel; 51 | QLineEdit *LNodeDescText; 52 | 53 | QDialogButtonBox *buttonBox; 54 | 55 | private slots: 56 | void setLNodeLnClass(QString lnClass); 57 | }; 58 | 59 | #endif // EDITLNODE_H 60 | -------------------------------------------------------------------------------- /editprocessinginstruction.h: -------------------------------------------------------------------------------- 1 | #ifndef EDITPROCESSINGINSTRUCTION_H 2 | #define EDITPROCESSINGINSTRUCTION_H 3 | 4 | #include 5 | 6 | #include 7 | #include "domitem.h" 8 | 9 | class EditProcessingInstruction : public QDialog 10 | { 11 | Q_OBJECT 12 | 13 | DomItem *target; 14 | 15 | public: 16 | EditProcessingInstruction(QWidget *parent = 0); 17 | ~EditProcessingInstruction(); 18 | 19 | void setTarget(DomItem *pTarget); 20 | 21 | private: 22 | void checkOKEnabled(); 23 | 24 | private slots: 25 | void accept(); 26 | void on_editTarget_textChanged(); 27 | void on_editData_textChanged(); 28 | 29 | private: 30 | QVBoxLayout *verticalLayout_2; 31 | QVBoxLayout *verticalLayout; 32 | QLabel *label; 33 | QLineEdit *editTarget; 34 | QLabel *label_2; 35 | QLineEdit *editData; 36 | QDialogButtonBox *buttonBox; 37 | 38 | void init(); 39 | void retranslateUi() 40 | { 41 | setWindowTitle(QApplication::translate("EditProcessing", "Edit Processing Instruction", 0, QApplication::UnicodeUTF8)); 42 | label->setText(QApplication::translate("EditProcessing", "&Target", 0, QApplication::UnicodeUTF8)); 43 | label_2->setText(QApplication::translate("EditProcessing", "&Data", 0, QApplication::UnicodeUTF8)); 44 | } 45 | 46 | void error(const QString& message); 47 | 48 | }; 49 | 50 | bool editProcessingInstruction(QWidget *parent, DomItem *pTarget); 51 | 52 | #endif // EDITPROCESSINGINSTRUCTION_H 53 | -------------------------------------------------------------------------------- /editreportcontrol.h: -------------------------------------------------------------------------------- 1 | #ifndef EDITREPORTCONTROL_H 2 | #define EDITREPORTCONTROL_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | class DomItem; 15 | 16 | class EditReportControl : public QDialog 17 | { 18 | Q_OBJECT 19 | public: 20 | EditReportControl(QWidget *parent = 0); 21 | ~EditReportControl(); 22 | 23 | void setTarget(DomItem *item); 24 | 25 | private: 26 | QLabel *nameLabel; 27 | QLineEdit *nameText; 28 | QLabel *confRevLabel; 29 | QSpinBox *confRevSpinBox; 30 | QCheckBox *rptIdCheckBox; 31 | QLabel *rptIdLabel; 32 | QLineEdit *rptIdText; 33 | QCheckBox *bufferedCheckBox; 34 | QLabel *bufferedLabel; 35 | QComboBox *bufferedComboBox; 36 | QCheckBox *bufTimeCheckBox; 37 | QLabel *bufTimeLabel; 38 | QSpinBox *bufTimeSpinBox; 39 | QCheckBox *indexedCheckBox; 40 | QLabel *indexedLabel; 41 | QComboBox *indexedComboBox; 42 | QCheckBox *datSetCheckBox; 43 | QLabel *datSetLabel; 44 | QLineEdit *datSetText; 45 | QCheckBox *descCheckBox; 46 | QLabel *descLabel; 47 | QLineEdit *descText; 48 | 49 | QDialogButtonBox *buttonBox; 50 | 51 | QGridLayout *layout; 52 | 53 | DomItem *target; 54 | 55 | void init(); 56 | 57 | void accept(); 58 | signals: 59 | 60 | public slots: 61 | 62 | }; 63 | #endif // EDITREPORTCONTROL_H 64 | -------------------------------------------------------------------------------- /edittextnode.h: -------------------------------------------------------------------------------- 1 | #ifndef EDITTEXTNODE_H 2 | #define EDITTEXTNODE_H 3 | 4 | #include 5 | 6 | #include 7 | 8 | class EditTextNode : public QDialog 9 | { 10 | Q_OBJECT 11 | 12 | static const int InputSizeLimit; 13 | QString target; 14 | 15 | public: 16 | EditTextNode(const bool isBase64Value, QWidget * parent = NULL); 17 | ~EditTextNode(); 18 | 19 | void setText(const QString &pTarget); 20 | QString getText() const ; 21 | 22 | bool testLoadBinaryFile(const QString &filePath); 23 | 24 | public slots: 25 | void accept(); 26 | 27 | private slots: 28 | void on_fromBase64_clicked(); 29 | void on_toBase64_clicked(); 30 | void onWrapChanged(int newState); 31 | void on_loadFromBinaryFile_clicked(); 32 | void on_saveBase64IntoFile_clicked(); 33 | 34 | private: 35 | 36 | void setWrapMode(const bool show); 37 | void error(const QString& message); 38 | 39 | bool onLoadFromBinaryFile(const QString &filePath); 40 | void saveToBinaryFile(const QString &filePath); 41 | 42 | // Ui::EditTN ui; 43 | bool isBase64; 44 | void init(); 45 | void retranslate(); 46 | 47 | /*************************************** 48 | ************ UI ********************* 49 | ****************************************/ 50 | QHBoxLayout *horizontalLayout_2; 51 | QHBoxLayout *horizontalLayout; 52 | QPlainTextEdit *editor; 53 | QVBoxLayout *verticalLayout; 54 | QDialogButtonBox *buttonBox; 55 | QSpacerItem *verticalSpacer; 56 | QCheckBox *wrapText; 57 | QSpacerItem *verticalSpacer_2; 58 | QLabel *label; 59 | QPushButton *fromBase64; 60 | QPushButton *toBase64; 61 | QLabel *label_2; 62 | QPushButton *loadFromBinaryFile; 63 | QPushButton *saveBase64IntoFile; 64 | }; 65 | 66 | #endif // EDITTEXTNODE_H 67 | -------------------------------------------------------------------------------- /global.h: -------------------------------------------------------------------------------- 1 | #ifndef GLOABAL_H 2 | #define GLOABAL_H 3 | 4 | #include 5 | 6 | #if not defined(LIBQXMLEDIT_LIBRARY_STATIC) 7 | 8 | #if defined(LIBQXMLEDIT_LIBRARY) 9 | # define LIBQXMLEDITSHARED_EXPORT Q_DECL_EXPORT 10 | #else 11 | # define LIBQXMLEDITSHARED_EXPORT Q_DECL_IMPORT 12 | #endif 13 | 14 | #else 15 | # define LIBQXMLEDITSHARED_EXPORT 16 | #endif 17 | 18 | #endif // GLOABAL_H 19 | -------------------------------------------------------------------------------- /icdCreator.h: -------------------------------------------------------------------------------- 1 | #ifndef ICDCREATOR_H 2 | #define ICDCREATOR_H 3 | 4 | #define DECL_CONSTRUCTOR(clazz) clazz(); virtual ~clazz(); 5 | #define IMPL_CONSTRUCTOR(clazz) clazz::clazz() {} \ 6 | clazz::~clazz() {} 7 | 8 | // Version numbers are divided like that: 0x0005.02.00 9 | 10 | #define VERSION_ID "$VER 0.0.1" 11 | #define VERSION_NUMBER 0x00000100 12 | // this is the version number of the welcome dialog 13 | #define VERSION_NUMBER_WELCOME 0x00010200 14 | 15 | #define VERSION_STRING "ICD_Creator " VERSION_ID 16 | 17 | 18 | //debug switches 19 | //#define _DEBUG_BALSAMIQ 20 | //#define QXML_DEBUG 21 | #define XSD_INTEGRATION 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | extern const char VERSION[] ; 41 | 42 | //TODO: 43 | #define ORGANIZATION_NAME "GDWY" 44 | #define ORGANIZATION_DOMAIN "GDWY" 45 | #define APPLICATION_NAME "ICD_Creator" 46 | 47 | 48 | void msgBoxDebug(const QString message); 49 | 50 | #ifdef QXML_DEBUG 51 | #define D(x) x 52 | #else 53 | #define D(x) 54 | #endif 55 | 56 | #define STRINGIZE_(x) #x 57 | #define STRINGIZE(x) STRINGIZE_(x) 58 | 59 | 60 | //-------- logging (enabled by define)---------------- 61 | #ifdef LOG_CONSOLE 62 | #include 63 | #define TRACEQ(x) do{printf("%s\n", x.toAscii().data() ); fflush(stdout);} while(0) 64 | #define TRACE(x) do{printf("%s\n", x); fflush(stdout);} while(0) 65 | #define TRACE2(x, y) do{printf(x, y); fflush(stdout);} while(0) 66 | #else 67 | #define TRACEQ(x) 68 | #define TRACE(x) 69 | #define TRACE2(x, y) 70 | #endif 71 | 72 | 73 | #endif // ICDCREATOR_H 74 | -------------------------------------------------------------------------------- /icdWizard/icdcommunicationpage.h: -------------------------------------------------------------------------------- 1 | #ifndef ICDCOMMUNICATIONPAGE_H 2 | #define ICDCOMMUNICATIONPAGE_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include "ipaddredit.h" 23 | 24 | class icdCommunicationPage : public QWizardPage 25 | { 26 | Q_OBJECT 27 | public: 28 | explicit icdCommunicationPage(QWidget *parent = 0); 29 | ~icdCommunicationPage(); 30 | 31 | QVBoxLayout *communicationVLayout; 32 | QGroupBox *communicationGroupBox; 33 | QGridLayout *communicationGridLayout; 34 | QGroupBox *subNetworkGroupBox; 35 | QGridLayout *subNetworkGridLayout; 36 | QLabel *subNetworkTypeLabel; 37 | QCheckBox *subNetworkDescCheckBox; 38 | QLineEdit *subNetworkDescText; 39 | QCheckBox *subNetworkTypeCheckBox; 40 | QLabel *subNetworkDescLabel; 41 | QGroupBox *bitRateGroupBox; 42 | QGridLayout *bitRateGridLayout; 43 | QComboBox *bitRateComboBox; 44 | QLabel *bitRateLabel; 45 | QLabel *bitRateUnitLabel; 46 | QGroupBox *connectedAPGroupBox; 47 | QGridLayout *connectAPGridLayout; 48 | QLineEdit *connectedApNameText; 49 | QLabel *connectedIedNameLabel; 50 | QLabel *connectedApNameLabel; 51 | QLineEdit *connectedIedNameText; 52 | QGroupBox *addressGroupBox; 53 | QGridLayout *addressGridLayout; 54 | // QPushButton *addressAddPButton; 55 | // QPushButton *addressDelPButton; 56 | // QTableWidget *addressPTableWidget; 57 | QLineEdit *subNetworkTypeText; 58 | QLabel *subNetworkNamelabel; 59 | QLineEdit *subNetworkNameText; 60 | QCheckBox *ipAddressCheckBox; 61 | QLabel *ipAddressLabel; 62 | CIpAddrEdit *ipAddressText; 63 | QCheckBox *ipSubMaskCheckBox; 64 | QLabel *ipSubMaskLabel; 65 | CIpAddrEdit *ipSubMaskText; 66 | QCheckBox *ipGateCheckBox; 67 | QLabel *ipGateLabel; 68 | CIpAddrEdit *ipGateText; 69 | 70 | 71 | private: 72 | void init(); 73 | void retranslateUi(); 74 | 75 | signals: 76 | 77 | public slots: 78 | void setIedName(QString iedName); 79 | void setApName(QString apName); 80 | }; 81 | 82 | #endif // ICDCOMMUNICATIONPAGE_H 83 | -------------------------------------------------------------------------------- /icdWizard/icddatatypetemplatepage.h: -------------------------------------------------------------------------------- 1 | #ifndef ICDDATATYPETEMPLATEPAGE_H 2 | #define ICDDATATYPETEMPLATEPAGE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | class icdDataTypeTemplatePage : public QWizardPage 16 | { 17 | Q_OBJECT 18 | public: 19 | explicit icdDataTypeTemplatePage(QWidget *parent = 0); 20 | 21 | private: 22 | QLineEdit *fileSelectText; 23 | QPushButton *fileSelectButton; 24 | QRadioButton *fileSelectRadio; 25 | QLabel *fileSelectLabel; 26 | QRadioButton *newTemplateRadio; 27 | QTextBrowser *newTemplateText; 28 | QGridLayout *dataTypeTemplateGridLayout; 29 | 30 | void init(); 31 | 32 | signals: 33 | 34 | public slots: 35 | 36 | }; 37 | 38 | #endif // ICDDATATYPETEMPLATEPAGE_H 39 | -------------------------------------------------------------------------------- /icdWizard/icdheaderpage.h: -------------------------------------------------------------------------------- 1 | #ifndef ICDHEADERPAGE_H 2 | #define ICDHEADERPAGE_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | //namespace Ui 24 | //{ 25 | //class icdHeaderPage; 26 | //} 27 | 28 | class icdHeaderPage : public QWizardPage 29 | { 30 | Q_OBJECT 31 | public: 32 | icdHeaderPage(QWidget *parent = 0); 33 | ~icdHeaderPage(); 34 | 35 | // Ui::icdHeaderPage *ui; 36 | QVBoxLayout *headerVLayout; 37 | QGroupBox *headerGroupBox; 38 | QGridLayout *headerGridLayout; 39 | QLabel *headerToolIdLabel; 40 | QCheckBox *headerToolIdCheckBox; 41 | QComboBox *headerNameStructureCombo; 42 | QLabel *headerNameStructureLabel; 43 | QLineEdit *headerIdText; 44 | QLabel *headerIdLabel; 45 | QCheckBox *headerRevisionCheckBox; 46 | QLineEdit *headerToolIdText; 47 | QLineEdit *headerRevisionText; 48 | QCheckBox *headerRefCheckBox; 49 | QLineEdit *headerRefText; 50 | QLabel *headerRefLabel; 51 | QLabel *headerRevisionLabel; 52 | QCheckBox *headerVersionCheckBox; 53 | QLineEdit *headerVersionText; 54 | QLabel *headerVersionLabel; 55 | QGroupBox *historyGroupBox; 56 | QGridLayout *historyGridLayout; 57 | QTableWidget *hitemTableWidget; 58 | QPushButton *addHitemButton; 59 | QPushButton *deleteHitemButton; 60 | 61 | private: 62 | 63 | void init(); 64 | void retranslateUi(); 65 | void registerData(); 66 | 67 | protected: 68 | 69 | signals: 70 | 71 | public slots: 72 | void on_addHitemButton_clicked(); 73 | void on_deleteHitemButton_clicked(); 74 | 75 | }; 76 | 77 | #endif // ICDHEADERPAGE_H 78 | -------------------------------------------------------------------------------- /icdWizard/icdsubstationpage.h: -------------------------------------------------------------------------------- 1 | #ifndef ICDSUBSTATIONPAGE_H 2 | #define ICDSUBSTATIONPAGE_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | class icdSubstationPage : public QWizardPage 22 | { 23 | Q_OBJECT 24 | public: 25 | icdSubstationPage(QWidget *parent = 0); 26 | ~icdSubstationPage(); 27 | 28 | 29 | QVBoxLayout *verticalLayout; 30 | QVBoxLayout *substationVLayout; 31 | QGroupBox *substationGroupBox; 32 | QGridLayout *substationGridLayout; 33 | QLabel *substationNameLabel; 34 | QLineEdit *subStationNameText; 35 | QCheckBox *substationDescCheckBox; 36 | QLabel *substationDescLabel; 37 | QLineEdit *substationDescText; 38 | QGroupBox *voltageLevelGroupBox; 39 | QGridLayout *voltageLevelGridLayout; 40 | QLabel *voltageLevelNameLabel; 41 | QLineEdit *voltageLevelNameText; 42 | QGroupBox *voltageGroupBox; 43 | QGridLayout *voltageGridLayout; 44 | QLabel *voltageUnitLabel; 45 | QComboBox *voltageUnitComboBox; 46 | QCheckBox *voltageMultiplierCheckBox; 47 | QLabel *voltageMultiplierLabel; 48 | QComboBox *voltageMultiplierComboBox; 49 | QGroupBox *bayGroupBox; 50 | QGridLayout *bayGridLayout; 51 | QLabel *bayNameLabel; 52 | QLineEdit *bayNameText; 53 | QCheckBox *bayDescCheckBox; 54 | QLabel *bayDescLabel; 55 | QLineEdit *bayDescText; 56 | 57 | private: 58 | 59 | void init(); 60 | void retranslateUi(); 61 | 62 | void registerData(); 63 | 64 | signals: 65 | 66 | public slots: 67 | 68 | 69 | }; 70 | 71 | #endif // ICDSUBSTATIONPAGE_H 72 | -------------------------------------------------------------------------------- /icdWizard/welcomepage.cpp: -------------------------------------------------------------------------------- 1 | #include "welcomepage.h" 2 | #include 3 | #include 4 | 5 | WelcomePage::WelcomePage(QString &text, QWidget *parent) : 6 | QWizardPage(parent) 7 | { 8 | setTitle(tr("Welcome Create ICD")); 9 | 10 | label = new QLabel(); 11 | label->setText(text);//tr("This wizard will generate a ICD file")); 12 | label->setWordWrap(true); 13 | 14 | QVBoxLayout *layout = new QVBoxLayout(this); 15 | layout->addWidget(label); 16 | } 17 | 18 | WelcomePage::~WelcomePage() 19 | { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /icdWizard/welcomepage.h: -------------------------------------------------------------------------------- 1 | #ifndef WELCOMEPAGE_H 2 | #define WELCOMEPAGE_H 3 | 4 | #include 5 | 6 | class QLabel; 7 | 8 | class WelcomePage : public QWizardPage 9 | { 10 | Q_OBJECT 11 | public: 12 | WelcomePage(QString &text, QWidget *parent = 0); 13 | ~WelcomePage(); 14 | 15 | private: 16 | 17 | QLabel *label; 18 | signals: 19 | 20 | public slots: 21 | 22 | }; 23 | 24 | #endif // RCDWELCOMEPAGE_H 25 | -------------------------------------------------------------------------------- /icdtreeview.cpp: -------------------------------------------------------------------------------- 1 | #include "icdtreeview.h" 2 | 3 | ICDTreeView::ICDTreeView(QWidget *parent) : 4 | QTreeView(parent) 5 | { 6 | } 7 | 8 | void ICDTreeView::setIndex(QModelIndex newIndex) 9 | { 10 | index = newIndex; 11 | } 12 | 13 | QModelIndex ICDTreeView::getIndex(QPoint pos) 14 | { 15 | return indexAt(pos); 16 | } 17 | 18 | void ICDTreeView::mousePressEvent(QMouseEvent *e) 19 | { 20 | setIndex(getIndex(e->pos())); 21 | if(!index.isValid()) 22 | return; 23 | 24 | if(e->button() == Qt::LeftButton) 25 | { 26 | qDebug()<<"Here is Left clicked! "<button() == Qt::RightButton) 33 | { 34 | qDebug()<<"Here is Right clicked!"; 35 | emit RightClicked(index); 36 | } 37 | else 38 | mousePressEvent(e); 39 | } 40 | -------------------------------------------------------------------------------- /icdtreeview.h: -------------------------------------------------------------------------------- 1 | #ifndef ICDTREEVIEW_H 2 | #define ICDTREEVIEW_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | class ICDTreeView : public QTreeView 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit ICDTreeView(QWidget *parent = 0); 16 | 17 | signals: 18 | void LeftClicked(QModelIndex); 19 | void RightClicked(QModelIndex); 20 | 21 | public slots: 22 | 23 | protected: 24 | void mousePressEvent(QMouseEvent *e); 25 | 26 | private: 27 | QModelIndex index; 28 | void setIndex(QModelIndex); 29 | QModelIndex getIndex(QPoint pos); 30 | 31 | }; 32 | 33 | #endif // ICDTREEVIEW_H 34 | -------------------------------------------------------------------------------- /images/AddText.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/AddText.png -------------------------------------------------------------------------------- /images/Attribute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/Attribute.png -------------------------------------------------------------------------------- /images/DA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/DA.png -------------------------------------------------------------------------------- /images/DO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/DO.png -------------------------------------------------------------------------------- /images/EditAttributes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/EditAttributes.png -------------------------------------------------------------------------------- /images/Folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/Folder.png -------------------------------------------------------------------------------- /images/IED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/IED.png -------------------------------------------------------------------------------- /images/LNode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/LNode.png -------------------------------------------------------------------------------- /images/LNodeType.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/LNodeType.png -------------------------------------------------------------------------------- /images/OpenFolder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/OpenFolder.png -------------------------------------------------------------------------------- /images/SCL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/SCL.png -------------------------------------------------------------------------------- /images/Server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/Server.png -------------------------------------------------------------------------------- /images/accessControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/accessControl.png -------------------------------------------------------------------------------- /images/accesspoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/accesspoint.png -------------------------------------------------------------------------------- /images/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/add.png -------------------------------------------------------------------------------- /images/add_brother.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/add_brother.png -------------------------------------------------------------------------------- /images/add_child.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/add_child.png -------------------------------------------------------------------------------- /images/address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/address.png -------------------------------------------------------------------------------- /images/application-pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/application-pdf.png -------------------------------------------------------------------------------- /images/applications-development-bkm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/applications-development-bkm.png -------------------------------------------------------------------------------- /images/applications-development.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/applications-development.png -------------------------------------------------------------------------------- /images/applications-education-mathematics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/applications-education-mathematics.png -------------------------------------------------------------------------------- /images/applications-graphics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/applications-graphics.png -------------------------------------------------------------------------------- /images/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/arrow-down.png -------------------------------------------------------------------------------- /images/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/arrow-right.png -------------------------------------------------------------------------------- /images/association.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/association.png -------------------------------------------------------------------------------- /images/attrElement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/attrElement.png -------------------------------------------------------------------------------- /images/attrIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/attrIcon.png -------------------------------------------------------------------------------- /images/attrType.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/attrType.png -------------------------------------------------------------------------------- /images/authentication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/authentication.png -------------------------------------------------------------------------------- /images/bay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/bay.png -------------------------------------------------------------------------------- /images/bda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/bda.png -------------------------------------------------------------------------------- /images/bitRate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/bitRate.png -------------------------------------------------------------------------------- /images/bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/bookmark.png -------------------------------------------------------------------------------- /images/bufReport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/bufReport.png -------------------------------------------------------------------------------- /images/choice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/choice.png -------------------------------------------------------------------------------- /images/communication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/communication.png -------------------------------------------------------------------------------- /images/conductingEquipment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/conductingEquipment.png -------------------------------------------------------------------------------- /images/connectedAP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/connectedAP.png -------------------------------------------------------------------------------- /images/connectivityNode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/connectivityNode.png -------------------------------------------------------------------------------- /images/daType.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/daType.png -------------------------------------------------------------------------------- /images/dai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/dai.png -------------------------------------------------------------------------------- /images/dataTypeTemplate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/dataTypeTemplate.png -------------------------------------------------------------------------------- /images/dataset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/dataset.png -------------------------------------------------------------------------------- /images/dialog-warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/dialog-warning.png -------------------------------------------------------------------------------- /images/doType.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/doType.png -------------------------------------------------------------------------------- /images/document-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/document-new.png -------------------------------------------------------------------------------- /images/document-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/document-open.png -------------------------------------------------------------------------------- /images/document-save-as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/document-save-as.png -------------------------------------------------------------------------------- /images/document-save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/document-save.png -------------------------------------------------------------------------------- /images/document-validate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/document-validate.png -------------------------------------------------------------------------------- /images/documentinfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/documentinfo.png -------------------------------------------------------------------------------- /images/doi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/doi.png -------------------------------------------------------------------------------- /images/edit-clear-locationbar-rtl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/edit-clear-locationbar-rtl.png -------------------------------------------------------------------------------- /images/edit-copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/edit-copy.png -------------------------------------------------------------------------------- /images/edit-cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/edit-cut.png -------------------------------------------------------------------------------- /images/edit-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/edit-delete.png -------------------------------------------------------------------------------- /images/edit-find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/edit-find.png -------------------------------------------------------------------------------- /images/edit-paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/edit-paste.png -------------------------------------------------------------------------------- /images/edit-redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/edit-redo.png -------------------------------------------------------------------------------- /images/edit-undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/edit-undo.png -------------------------------------------------------------------------------- /images/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/empty.png -------------------------------------------------------------------------------- /images/enumType.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/enumType.png -------------------------------------------------------------------------------- /images/enumVal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/enumVal.png -------------------------------------------------------------------------------- /images/exploremode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/exploremode.png -------------------------------------------------------------------------------- /images/extRef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/extRef.png -------------------------------------------------------------------------------- /images/extra-attributes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/extra-attributes.png -------------------------------------------------------------------------------- /images/fcda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/fcda.png -------------------------------------------------------------------------------- /images/function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/function.png -------------------------------------------------------------------------------- /images/generalEquipment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/generalEquipment.png -------------------------------------------------------------------------------- /images/generating.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/generating.gif -------------------------------------------------------------------------------- /images/go-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/go-down.png -------------------------------------------------------------------------------- /images/go-next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/go-next.png -------------------------------------------------------------------------------- /images/go-previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/go-previous.png -------------------------------------------------------------------------------- /images/go-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/go-up.png -------------------------------------------------------------------------------- /images/gotonextbro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/gotonextbro.png -------------------------------------------------------------------------------- /images/gotoparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/gotoparent.png -------------------------------------------------------------------------------- /images/gotoprevbro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/gotoprevbro.png -------------------------------------------------------------------------------- /images/group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/group.png -------------------------------------------------------------------------------- /images/gseControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/gseControl.png -------------------------------------------------------------------------------- /images/gseSecurity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/gseSecurity.png -------------------------------------------------------------------------------- /images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/header.png -------------------------------------------------------------------------------- /images/help-contents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/help-contents.png -------------------------------------------------------------------------------- /images/hidden_children.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/hidden_children.png -------------------------------------------------------------------------------- /images/hidden_children_bm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/hidden_children_bm.png -------------------------------------------------------------------------------- /images/history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/history.png -------------------------------------------------------------------------------- /images/hitem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/hitem.png -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/icon.png -------------------------------------------------------------------------------- /images/iec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/iec.png -------------------------------------------------------------------------------- /images/iedName.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/iedName.png -------------------------------------------------------------------------------- /images/im-status-message-edit-bkm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/im-status-message-edit-bkm.png -------------------------------------------------------------------------------- /images/im-status-message-edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/im-status-message-edit.png -------------------------------------------------------------------------------- /images/image-svg+xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/image-svg+xml.png -------------------------------------------------------------------------------- /images/inputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/inputs.png -------------------------------------------------------------------------------- /images/ip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/ip.png -------------------------------------------------------------------------------- /images/ldevices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/ldevices.png -------------------------------------------------------------------------------- /images/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/link.png -------------------------------------------------------------------------------- /images/ln.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/ln.png -------------------------------------------------------------------------------- /images/ln0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/ln0.png -------------------------------------------------------------------------------- /images/lnNode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/lnNode.png -------------------------------------------------------------------------------- /images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/loading.gif -------------------------------------------------------------------------------- /images/log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/log.png -------------------------------------------------------------------------------- /images/logControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/logControl.png -------------------------------------------------------------------------------- /images/modify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/modify.png -------------------------------------------------------------------------------- /images/optFields.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/optFields.png -------------------------------------------------------------------------------- /images/physconn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/physconn.png -------------------------------------------------------------------------------- /images/powerTransformer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/powerTransformer.png -------------------------------------------------------------------------------- /images/preferences-system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/preferences-system.png -------------------------------------------------------------------------------- /images/printer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/printer.png -------------------------------------------------------------------------------- /images/private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/private.png -------------------------------------------------------------------------------- /images/rptEnabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/rptEnabled.png -------------------------------------------------------------------------------- /images/sclControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/sclControl.png -------------------------------------------------------------------------------- /images/sdi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/sdi.png -------------------------------------------------------------------------------- /images/sdo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/sdo.png -------------------------------------------------------------------------------- /images/security-high.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/security-high.png -------------------------------------------------------------------------------- /images/sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/sequence.png -------------------------------------------------------------------------------- /images/services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/services.png -------------------------------------------------------------------------------- /images/servicesItem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/servicesItem.png -------------------------------------------------------------------------------- /images/servicesItemGroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/servicesItemGroup.png -------------------------------------------------------------------------------- /images/sessions_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/sessions_open.png -------------------------------------------------------------------------------- /images/settingControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/settingControl.png -------------------------------------------------------------------------------- /images/show_children.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/show_children.png -------------------------------------------------------------------------------- /images/smvControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/smvControl.png -------------------------------------------------------------------------------- /images/smvOpts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/smvOpts.png -------------------------------------------------------------------------------- /images/smvSecurity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/smvSecurity.png -------------------------------------------------------------------------------- /images/split.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/split.png -------------------------------------------------------------------------------- /images/subEquipment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/subEquipment.png -------------------------------------------------------------------------------- /images/subFunction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/subFunction.png -------------------------------------------------------------------------------- /images/subNetwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/subNetwork.png -------------------------------------------------------------------------------- /images/substation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/substation.png -------------------------------------------------------------------------------- /images/system-search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/system-search.png -------------------------------------------------------------------------------- /images/tapChanger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/tapChanger.png -------------------------------------------------------------------------------- /images/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/terminal.png -------------------------------------------------------------------------------- /images/text-xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/text-xml.png -------------------------------------------------------------------------------- /images/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/text.png -------------------------------------------------------------------------------- /images/tools-wizard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/tools-wizard.png -------------------------------------------------------------------------------- /images/transformerWinding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/transformerWinding.png -------------------------------------------------------------------------------- /images/tree_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/tree_close.png -------------------------------------------------------------------------------- /images/tree_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/tree_open.png -------------------------------------------------------------------------------- /images/trgOps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/trgOps.png -------------------------------------------------------------------------------- /images/unbufReport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/unbufReport.png -------------------------------------------------------------------------------- /images/val.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/val.png -------------------------------------------------------------------------------- /images/validation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/validation.png -------------------------------------------------------------------------------- /images/vcs-locally-modified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/vcs-locally-modified.png -------------------------------------------------------------------------------- /images/view-file-columns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/view-file-columns.png -------------------------------------------------------------------------------- /images/view-media-visualization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/view-media-visualization.png -------------------------------------------------------------------------------- /images/view-structure-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/view-structure-icon.png -------------------------------------------------------------------------------- /images/view_columns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/view_columns.png -------------------------------------------------------------------------------- /images/voltage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/voltage.png -------------------------------------------------------------------------------- /images/voltageLevel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/voltageLevel.png -------------------------------------------------------------------------------- /images/window-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/window-close.png -------------------------------------------------------------------------------- /images/xsdAttributesIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/xsdAttributesIcon.png -------------------------------------------------------------------------------- /images/xsdElementsIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/xsdElementsIcon.png -------------------------------------------------------------------------------- /images/xsdReferencesIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/xsdReferencesIcon.png -------------------------------------------------------------------------------- /images/xsdSimpleTypesIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/xsdSimpleTypesIcon.png -------------------------------------------------------------------------------- /images/xsdTypesIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/xsdTypesIcon.png -------------------------------------------------------------------------------- /images/xsd_base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/xsd_base.png -------------------------------------------------------------------------------- /images/zoom-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/zoom-in.png -------------------------------------------------------------------------------- /images/zoom-original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/zoom-original.png -------------------------------------------------------------------------------- /images/zoom-out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhandl/ICD_Creator/dfcf7707173a775de3b2f2b7e063715919526d3a/images/zoom-out.png -------------------------------------------------------------------------------- /ipaddredit.h: -------------------------------------------------------------------------------- 1 | #ifndef IPADDREDIT_H 2 | #define IPADDREDIT_H 3 | 4 | #include 5 | 6 | class QLineEdit; 7 | class QLabel; 8 | class CIpPartLineEdit; 9 | 10 | class CIpAddrEdit : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | CIpAddrEdit(QWidget *parent = 0); 16 | ~CIpAddrEdit(); 17 | 18 | void m_vSetText(const QString &text); 19 | QString m_strGetText(); 20 | void m_vSetStyleSheet(const QString &styleSheet); 21 | 22 | signals: 23 | void sigTextChanged(const QString &text); 24 | void sigTextEdited(const QString &text); 25 | 26 | private slots: 27 | void slot_text_Changed(const QString &text); 28 | void slot_text_Edited(const QString &text); 29 | 30 | private: 31 | CIpPartLineEdit * m_pIpPart1; 32 | CIpPartLineEdit * m_pIpPart2; 33 | CIpPartLineEdit * m_pIpPart3; 34 | CIpPartLineEdit * m_pIpPart4; 35 | 36 | QLabel * m_pDot1; 37 | QLabel * m_pDot2; 38 | QLabel * m_pDot3; 39 | }; 40 | 41 | #endif // IPADDREDIT_H -------------------------------------------------------------------------------- /ippartlineedit.h: -------------------------------------------------------------------------------- 1 | #ifndef IPPARTLINEEDIT_H 2 | #define IPPARTLINEEDIT_H 3 | 4 | #include 5 | 6 | class QWidget; 7 | class QFocusEvent; 8 | class QKeyEvent; 9 | 10 | class CIpPartLineEdit : public QLineEdit 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | CIpPartLineEdit(QWidget *parent = 0); 16 | ~CIpPartLineEdit(); 17 | 18 | void m_vSetPreEdit(QLineEdit *preEdit); 19 | void m_vSetNextEdit(QLineEdit *nextEdit); 20 | 21 | protected: 22 | void focusInEvent(QFocusEvent *event); 23 | void keyPressEvent(QKeyEvent *event); 24 | 25 | private slots: 26 | void slot_text_Edited(const QString & text); 27 | 28 | private: 29 | QLineEdit *m_preEdit; 30 | QLineEdit *m_nextEdit; 31 | }; 32 | 33 | #endif // IPPARTLINEEDIT_H -------------------------------------------------------------------------------- /log.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef QXMLEDIT_FRAMEWORK_LOG_H 3 | #define QXMLEDIT_FRAMEWORK_LOG_H 4 | 5 | // this code inspired by KLabeler 6 | class LogInfo 7 | { 8 | 9 | public: 10 | QString source; // module 11 | QString method; // 12 | QString type; // enter function, exit, etc 13 | 14 | }; 15 | 16 | class FrwLogger 17 | { 18 | 19 | public: 20 | enum ELogLevel { DEBUG, INFO, WARNING, ERROR }; 21 | 22 | 23 | virtual bool isEnabled() = 0; 24 | virtual void setEnabled(const bool how) = 0; 25 | virtual ELogLevel getLevel() = 0; 26 | virtual void setLevel(const ELogLevel newLevel) = 0; 27 | virtual bool isLoggable(const ELogLevel level) = 0; 28 | 29 | virtual void debug(const QString &message, const LogInfo *source = NULL) = 0; 30 | virtual void info(const QString &message, const LogInfo *source = NULL) = 0; 31 | virtual void warning(const QString &message, const LogInfo *source = NULL) = 0; 32 | virtual void error(const QString &message, const LogInfo *source = NULL) = 0; 33 | 34 | }; 35 | 36 | 37 | #endif // QXMLEDIT_FRAMEWORK_LOG_H 38 | -------------------------------------------------------------------------------- /modifylnodeid.cpp: -------------------------------------------------------------------------------- 1 | #include "modifylnodeid.h" 2 | #include "datatypemodel.h" 3 | 4 | ModifyLNodeId::ModifyLNodeId(QWidget *parent) : 5 | QDialog(parent) 6 | { 7 | setWindowTitle(tr("Modify the LNode Id")); 8 | HLayout = new QHBoxLayout(this); 9 | HLayout->setObjectName(tr("HLayout")); 10 | 11 | LNodeIdLabel = new QLabel(tr("Modify the LNode Id: ")); 12 | LNodeIdLabel->setObjectName(tr("LNodeIdLabel")); 13 | 14 | LNodeIdText = new QLineEdit(tr("")); 15 | LNodeIdText->setObjectName(tr("LNodeIdText")); 16 | 17 | acceptButton = new QPushButton(tr("OK")); 18 | acceptButton->setObjectName(tr("acceptButton")); 19 | 20 | HLayout->addWidget(LNodeIdLabel); 21 | HLayout->addWidget(LNodeIdText); 22 | HLayout->addWidget(acceptButton); 23 | 24 | target = NULL; 25 | 26 | connect(acceptButton, SIGNAL(clicked()), this, SLOT(accept())); 27 | 28 | } 29 | 30 | void ModifyLNodeId::setTarget(DataTypeItem *item) 31 | { 32 | if(item ==NULL) 33 | return ; 34 | 35 | target = item; 36 | LNodeIdText->setText(target->attributeValueOfName("id")); 37 | } 38 | 39 | void ModifyLNodeId::accept() 40 | { 41 | if(NULL == target) { 42 | return; 43 | } 44 | QString tag = LNodeIdText->text(); 45 | if(0 == tag.length()) { 46 | return ; 47 | } 48 | 49 | if(target->getParentModel()->getLNodeIdNamePool().contains(tag)) 50 | return ; 51 | 52 | foreach (Attribute *attr, target->attributes) { 53 | if(attr->name == "id") { 54 | attr->value = tag; 55 | target->getParentModel()->getLNodeIdNamePool().insert(tag); 56 | } 57 | } 58 | 59 | QDialog::accept(); 60 | } 61 | -------------------------------------------------------------------------------- /modifylnodeid.h: -------------------------------------------------------------------------------- 1 | #ifndef MODIFYLNODEID_H 2 | #define MODIFYLNODEID_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | class ModifyLNodeId : public QDialog 13 | { 14 | Q_OBJECT 15 | public: 16 | ModifyLNodeId(QWidget *parent = 0); 17 | 18 | DataTypeItem *target; 19 | 20 | void setTarget(DataTypeItem* item); 21 | 22 | public slots: 23 | void accept(); 24 | private: 25 | 26 | QHBoxLayout *HLayout; 27 | QLabel *LNodeIdLabel; 28 | QLineEdit *LNodeIdText; 29 | QPushButton *acceptButton; 30 | 31 | signals: 32 | 33 | 34 | }; 35 | 36 | #endif // MODIFYLNODEID_H 37 | -------------------------------------------------------------------------------- /navigation.h: -------------------------------------------------------------------------------- 1 | #ifndef NAVIGATION_H 2 | #define NAVIGATION_H 3 | 4 | namespace qxmledit 5 | { 6 | 7 | enum EDisplayMode { NORMAL, 8 | EXPLORE, 9 | BLIND, 10 | SCAN 11 | }; 12 | 13 | } 14 | 15 | #endif // NAVIGATION_H 16 | -------------------------------------------------------------------------------- /navigationbox.h: -------------------------------------------------------------------------------- 1 | #ifndef NAVIGATIONBOX_H 2 | #define NAVIGATIONBOX_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | class NavigationBox : public QWidget 20 | { 21 | Q_OBJECT 22 | 23 | int _value; 24 | int _minValue; 25 | int _maxValue; 26 | 27 | public: 28 | explicit NavigationBox(QWidget *parent = 0); 29 | ~NavigationBox(); 30 | 31 | void setRange(const int minValue, const int maxValue); 32 | 33 | private: 34 | 35 | QVBoxLayout *verticalLayout; 36 | QLabel *title; 37 | QHBoxLayout *horizontalLayout; 38 | QPushButton *goPrev; 39 | QSpinBox *valueBox; 40 | QPushButton *go; 41 | QPushButton *goNext; 42 | QHBoxLayout *horizontalLayout_2; 43 | QLabel *minVal; 44 | QSlider *slider; 45 | QLabel *maxVal; 46 | 47 | void init(); 48 | void retranslateUi(); 49 | 50 | void setValues(); 51 | void enableButtons(); 52 | void notify(); 53 | void updateValue(); 54 | 55 | private slots: 56 | void on_goPrev_clicked(); 57 | void on_goNext_clicked(); 58 | void on_go_clicked(); 59 | void on_slider_valueChanged(int value); 60 | void on_valueBox_valueChanged(int value); 61 | 62 | 63 | signals: 64 | void navigateTo(const int page); 65 | }; 66 | 67 | #endif // NAVIGATIONBOX_H 68 | -------------------------------------------------------------------------------- /newtemplatelnodemodel.cpp: -------------------------------------------------------------------------------- 1 | #include "newtemplatelnodemodel.h" 2 | 3 | newTemplateLNodeModel::newTemplateLNodeModel() 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /newtemplatelnodemodel.h: -------------------------------------------------------------------------------- 1 | #ifndef NEWTEMPLATELNODEMODEL_H 2 | #define NEWTEMPLATELNODEMODEL_H 3 | #include "dommodel.h" 4 | 5 | class newTemplateLNodeModel : public DomModel 6 | { 7 | public: 8 | newTemplateLNodeModel(); 9 | }; 10 | 11 | #endif // NEWTEMPLATELNODEMODEL_H 12 | -------------------------------------------------------------------------------- /nodetablewidget.cpp: -------------------------------------------------------------------------------- 1 | #include "nodetablewidget.h" 2 | 3 | NodeTableWidget::NodeTableWidget(QWidget *parent) : 4 | QTableWidget(parent) 5 | { 6 | connect(this, SIGNAL(cellChanged(int,int)), this, SLOT(onCellChanged(int,int)), Qt::UniqueConnection); 7 | } 8 | 9 | NodeTableWidget::NodeTableWidget(int rows, int columns, QWidget *parent) : 10 | QTableWidget(rows, columns, parent) 11 | { 12 | connect(this, SIGNAL(cellChanged(int,int)), this, SLOT(onCellChanged(int,int)), Qt::UniqueConnection); 13 | } 14 | 15 | void NodeTableWidget::setNode(QDomNode newNode) 16 | { 17 | node = newNode; 18 | } 19 | 20 | void NodeTableWidget::setModelIndex(QModelIndex newIndex) 21 | { 22 | index = newIndex; 23 | } 24 | 25 | QModelIndex NodeTableWidget::getModelIndex() 26 | { 27 | return index; 28 | } 29 | 30 | void NodeTableWidget::onCellChanged(int row, int column) 31 | { 32 | emit nodeCellChanged(index, row, column); 33 | } 34 | -------------------------------------------------------------------------------- /nodetablewidget.h: -------------------------------------------------------------------------------- 1 | #ifndef NODETABLEWIDGET_H 2 | #define NODETABLEWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class NodeTableWidget : public QTableWidget 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit NodeTableWidget(QWidget *parent = 0); 13 | explicit NodeTableWidget(int rows, int columns, QWidget *parent = 0); 14 | void setNode(QDomNode); 15 | void setModelIndex(QModelIndex); 16 | QModelIndex getModelIndex(); 17 | 18 | signals: 19 | void nodeCellChanged(QModelIndex,int,int); 20 | 21 | public slots: 22 | void onCellChanged(int,int); 23 | 24 | private: 25 | QDomNode node; 26 | QModelIndex index; 27 | }; 28 | 29 | #endif // NODETABLEWIDGET_H 30 | -------------------------------------------------------------------------------- /paintinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef PAINTINFO_H 2 | #define PAINTINFO_H 3 | 4 | #include "global.h" 5 | #include "style.h" 6 | 7 | class LIBQXMLEDITSHARED_EXPORT PaintInfo 8 | { 9 | private: 10 | bool isChanged; 11 | 12 | bool isOneAttrPerLine; 13 | bool isIndexPerChild; 14 | bool isCompactView; 15 | bool isShowAttributesLength; 16 | bool isUseFixedLengthFont; 17 | bool isShowUnBase64; 18 | int zoomFactor; 19 | VStyle *_currentStyle; 20 | bool isShowElementTextLength; 21 | bool isShowElementSize; 22 | bool isExplore; 23 | bool isAttributesHTML; 24 | bool isHideView; 25 | 26 | void internalSetZoom(const int newValue); 27 | void recalcColumns(); 28 | 29 | public: 30 | PaintInfo(); 31 | ~PaintInfo(); 32 | 33 | void loadState(); 34 | bool saveState(); 35 | 36 | void setIndexPerChild(const bool newValue); 37 | void setOneAttrPerLine(const bool newValue); 38 | void setCompactView(const bool newValue); 39 | bool oneAttrPerLine() const; 40 | bool indexPerChild() const; 41 | bool compactView() const; 42 | bool showUnBase64() const; 43 | VStyle *currentStyle() const; 44 | int zoom() const; 45 | bool showItemTextLength() const; 46 | bool showItemSize() const; 47 | bool exploreMode() const; 48 | bool attributesHTML() const; 49 | bool hideView() const; 50 | 51 | bool showAttributesLength() const; 52 | void setShowAttributesLength(const bool newValue); 53 | bool userFixedLengthFont() const; 54 | void setUserFixedLengthFont(const bool newValue); 55 | void setCurrentStyle(VStyle *newStyle); 56 | void setShowUnBase64(const bool newValue); 57 | void setZoom(const int newValue); 58 | void setShowItemTextLength(const bool newValue); 59 | void setShowItemSize(const bool newValue); 60 | void setExploreMode(const bool isExplore); 61 | void setAttributesHTML(const bool value); 62 | void setHideView(const bool value); 63 | 64 | bool zoomIn(); 65 | bool zoomOut(); 66 | 67 | bool canZoomOut(); 68 | bool canZoomIn(); 69 | 70 | int columnForTag; 71 | int columnForAttributes; 72 | int columnForText; 73 | int columnForDecodedText; 74 | int columnForChildren; 75 | int columnForSize; 76 | 77 | }; 78 | 79 | #endif // PAINTINFO_H 80 | -------------------------------------------------------------------------------- /parsescdthread.h: -------------------------------------------------------------------------------- 1 | #ifndef PARSESCDTHREAD_H 2 | #define PARSESCDTHREAD_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "controlBlock.h" 12 | 13 | class ParseSCDThread : public QThread 14 | { 15 | Q_OBJECT 16 | public: 17 | explicit ParseSCDThread(QObject *parent = 0); 18 | ~ParseSCDThread(); 19 | 20 | void setFileName(const QString newFileName); 21 | 22 | void explorerSCDFile(const QString fileName); 23 | 24 | QList getGSEItemList() { 25 | return gseItemList; 26 | } 27 | QList getSMVItemList() { 28 | return svItemList; 29 | } 30 | QList getMMSItemList() { 31 | return mmsItemList; 32 | } 33 | QList get104ItemList() { 34 | return iec104ItemList; 35 | } 36 | 37 | signals: 38 | 39 | void parseOvered(); 40 | 41 | protected: 42 | virtual void run(); 43 | 44 | private: 45 | QString fileName; 46 | 47 | // QList *gseItemList; 48 | // QList *svItemList; 49 | // QList *mmsItemList; 50 | // QList *an104ItemList; 51 | 52 | QList gseItemList; 53 | QList svItemList; 54 | QList mmsItemList; 55 | QList iec104ItemList; 56 | 57 | void parseCommunication(QXmlStreamReader &xml); 58 | void parseSubNetwork(QXmlStreamReader &xml); 59 | void parseConnectedAP(QXmlStreamReader& xml); 60 | void parseGseSmv(QXmlStreamReader &xml, const QString iedName, const QString gseSmv); 61 | void parseAddress(QXmlStreamReader &xml, const QString cbName, const QString gseSmv); 62 | 63 | void parseIED(QXmlStreamReader &xml); 64 | 65 | public slots: 66 | 67 | }; 68 | 69 | #endif // PARSESCDTHREAD_H 70 | -------------------------------------------------------------------------------- /plugin.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | #ifndef PLUGIN_H 23 | #define PLUGIN_H 24 | 25 | #include 26 | class DomModel; 27 | 28 | class IQXmlEditPlugIn : public QObject 29 | { 30 | 31 | Q_OBJECT 32 | public: 33 | 34 | Q_PROPERTY(QString name READ name) 35 | Q_PROPERTY(QString description READ description) 36 | Q_PROPERTY(QString version READ version) 37 | 38 | virtual QString name() = 0 ; 39 | virtual QString description() = 0; 40 | virtual QString version() = 0; 41 | virtual bool go(QWidget *parent, DomModel *data) = 0; 42 | 43 | }; 44 | 45 | #endif // PLUGIN_H 46 | -------------------------------------------------------------------------------- /preferreddirs.h: -------------------------------------------------------------------------------- 1 | #ifndef PREFERREDDIRS_H 2 | #define PREFERREDDIRS_H 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | class PreferredDirs : public QDialog 22 | { 23 | Q_OBJECT 24 | public: 25 | explicit PreferredDirs(QStringList &theOriginalValues, QWidget *parent = 0); 26 | ~PreferredDirs(); 27 | 28 | static bool checkNewDir(const int size, const bool isUI); 29 | static bool checkDuplicateDir(QStringList &list, const QString &newDir, const bool isUI); 30 | 31 | protected: 32 | void changeEvent(QEvent *e); 33 | 34 | private: 35 | 36 | QHBoxLayout *horizontalLayout; 37 | QVBoxLayout *verticalLayout_2; 38 | QLabel *label; 39 | QListView *dirList; 40 | QVBoxLayout *verticalLayout; 41 | QDialogButtonBox *buttonBox; 42 | QSpacerItem *verticalSpacer; 43 | QPushButton *add; 44 | QPushButton *remove; 45 | 46 | void init(); 47 | void retranslateUi(); 48 | 49 | QStringList &originalValues; 50 | QStringList dirs; 51 | QStringListModel *model; 52 | 53 | void fillData(); 54 | void handleSelects(const bool isItemValid); 55 | 56 | private slots: 57 | void accept(); 58 | void on_add_clicked(); 59 | void on_remove_clicked(); 60 | void on_dirList_clicked(const QModelIndex &index); 61 | 62 | }; 63 | 64 | bool configurePreferredDirs(QWidget *parent, QStringList &originalValues); 65 | 66 | #endif // PREFERREDDIRS_H 67 | -------------------------------------------------------------------------------- /qitemaction.cpp: -------------------------------------------------------------------------------- 1 | #include "qitemaction.h" 2 | 3 | QItemAction::QItemAction(QObject *parent) : 4 | QAction(parent) 5 | { 6 | connect(this, SIGNAL(triggered()), this, SLOT(onTrigger()), Qt::UniqueConnection); 7 | } 8 | 9 | QItemAction::QItemAction(const QString &text, QObject *parent) : 10 | QAction(text, parent) 11 | { 12 | connect(this, SIGNAL(triggered()), this, SLOT(onTrigger()), Qt::UniqueConnection); 13 | } 14 | 15 | void QItemAction::setNode(QDomNode newNode) 16 | { 17 | node = newNode; 18 | } 19 | 20 | void QItemAction::setIndex(QModelIndex newIndex) 21 | { 22 | index = newIndex; 23 | } 24 | 25 | void QItemAction::setCP(QPoint newCP) 26 | { 27 | cp = newCP; 28 | } 29 | 30 | void QItemAction::onTrigger() 31 | { 32 | // emit clicked(node); 33 | // emit clicked(index); 34 | emit clicked(index); 35 | } 36 | -------------------------------------------------------------------------------- /qitemaction.h: -------------------------------------------------------------------------------- 1 | #ifndef QITEMACTION_H 2 | #define QITEMACTION_H 3 | 4 | #include 5 | #include "dommodel.h" 6 | #include "domitem.h" 7 | 8 | class QItemAction : public QAction 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit QItemAction(QObject *parent = 0); 13 | explicit QItemAction(const QString &text, QObject *parent = 0); 14 | void setNode(QDomNode newNode); 15 | void setIndex(QModelIndex newIndex); 16 | void setCP(QPoint newCP); 17 | 18 | signals: 19 | // void clicked(QDomNode); 20 | void clicked(const QModelIndex&); 21 | public slots: 22 | void onTrigger(); 23 | 24 | private: 25 | QDomNode node; 26 | QModelIndex index; 27 | QPoint cp; 28 | 29 | }; 30 | 31 | #endif // QITEMACTION_H 32 | -------------------------------------------------------------------------------- /qxmledit.h: -------------------------------------------------------------------------------- 1 | #ifndef QXMLEDIT_H 2 | #define QXMLEDIT_H 3 | 4 | class QXmlEditParameters 5 | { 6 | private: 7 | QXmlEditParameters() {} 8 | ~QXmlEditParameters() {} 9 | 10 | public: 11 | static const int NUM_PREF_DIRS = 10; 12 | }; 13 | 14 | #endif // QXMLEDIT_H 15 | -------------------------------------------------------------------------------- /qxmleditdata.h: -------------------------------------------------------------------------------- 1 | #ifndef QXMLEDITDATA_H 2 | #define QXMLEDITDATA_H 3 | 4 | #include 5 | 6 | #include "global.h" 7 | 8 | #include "icdCreator.h" 9 | #include "style.h" 10 | #include "plugin.h" 11 | #include "log.h" 12 | 13 | #include 14 | #include 15 | 16 | #define STYLE_DIR_USESTD "Standard" 17 | #define STYLE_DIR_USEDIR "Directory" 18 | #define STYLE_DIR_USEAPPL "Application" 19 | 20 | enum EStylesDir { 21 | ESTYLE_DIR_USESTD, 22 | ESTYLE_DIR_USEDIR, 23 | ESTYLE_DIR_USEAPPL 24 | }; 25 | 26 | class XsdPlugin; 27 | 28 | class LIBQXMLEDITSHARED_EXPORT QXmlEditData : public QObject 29 | { 30 | Q_OBJECT 31 | 32 | FrwLogger *_logger; 33 | 34 | protected: 35 | QVector _styles; 36 | VStyle* _defaultStyle; 37 | QNetworkAccessManager _networkAccessManager; 38 | 39 | VStyle *creatDefaultStyle(); 40 | bool loadStyles(); 41 | 42 | public: 43 | QXmlEditData (); 44 | virtual ~QXmlEditData(); 45 | 46 | virtual void init(); 47 | virtual void end(); 48 | 49 | VStyle* getStyle(const QString &tag) const; 50 | VStyle* defaultStyle() const; 51 | const QVector &getStyles() const; 52 | 53 | EStylesDir getStylesDirLocation(); 54 | void setStylesDirLocation(const EStylesDir type); 55 | 56 | QString getStylesDirSpecific(); 57 | QString getStylesDirStandard(); 58 | QString getStylesDirApplication(); 59 | 60 | QString snippetsLocalDir(); 61 | QString snippetsProgramDir(); 62 | static QString getResourceDir(); 63 | static QString getDocsDir(); 64 | 65 | IQXmlEditPlugIn *xsdPlugin(); 66 | 67 | bool isAutovalidationOn(); 68 | void setAutovalidationOn(const bool newState); 69 | 70 | void enableAutoscroll(const bool enabled); 71 | bool isAutoScroll(); 72 | 73 | 74 | //--- region(welcomeDialog) 75 | void enableWelcomeDialog(const bool enabled); 76 | bool isWelcomeDialogEnabled(); 77 | bool shouldShowWelcomeDialog(); 78 | //--- endregion(welcomeDialog) 79 | 80 | //--- region(log) 81 | void setLogger(FrwLogger *newLogger); 82 | FrwLogger *logger(); 83 | //--- end region (log) 84 | 85 | //--- region(xsdCache) 86 | bool isXsdCacheEnabled(); 87 | void setXsdCacheEnabled(const bool newState); 88 | int xsdCacheLimit(); 89 | void configureXsdCache(); 90 | //--- endregion(xsdCache) 91 | 92 | QNetworkAccessManager *xsdNetworkAccessManager(); 93 | 94 | }; 95 | 96 | #endif // QXMLEDITDATA_H 97 | -------------------------------------------------------------------------------- /recodericdwizard.h: -------------------------------------------------------------------------------- 1 | #ifndef RECODERICDWIZARD_H 2 | #define RECODERICDWIZARD_H 3 | 4 | #include 5 | #include 6 | 7 | #include "domitem.h" 8 | #include "dommodel.h" 9 | 10 | #include "icdWizard/welcomepage.h" 11 | #include "icdWizard/icdheaderpage.h" 12 | #include "icdWizard/icdsubstationpage.h" 13 | #include "icdWizard/icdcommunicationpage.h" 14 | #include "icdWizard/icdiedservicespage.h" 15 | #include "icdWizard/icdiedaccesspointpage.h" 16 | #include "icdWizard/icddatatypetemplatenew.h" 17 | 18 | class RecoderIcdWizard : public QWizard 19 | { 20 | Q_OBJECT 21 | public: 22 | RecoderIcdWizard(QWidget *parent = 0); 23 | void accept(); 24 | 25 | QDomDocument *document; 26 | DomModel *model; 27 | 28 | QDomElement root; 29 | 30 | 31 | private: 32 | icdHeaderPage *icdHeader_page; 33 | icdSubstationPage *icdSubstation_page; 34 | icdDataTypeTemplateNew *icdDataTypeTemplateNew_page; 35 | icdCommunicationPage *icdCommunication_page; 36 | icdIedServicesPage *icdIedServices_page; 37 | icdIedAccessPointPage *icdIedAccessPoint_page; 38 | 39 | 40 | void createDoc(QDomDocument *doc); 41 | 42 | signals: 43 | 44 | public slots: 45 | 46 | 47 | }; 48 | 49 | #endif // RECODERICDWIZARD_H 50 | -------------------------------------------------------------------------------- /schemachooser.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHEMACHOOSER_H 2 | #define SCHEMACHOOSER_H 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | class SchemaChooser : public QDialog 23 | { 24 | Q_OBJECT 25 | 26 | static const int MAX_LAST_FILES = 10; 27 | 28 | bool _started; 29 | QString _selection; 30 | QStringList _lastFilesNames; 31 | QStringList _preferitesFilesNames; 32 | public: 33 | explicit SchemaChooser(QWidget *parent = 0); 34 | ~SchemaChooser(); 35 | 36 | QString selection(); 37 | 38 | private: 39 | 40 | QVBoxLayout *verticalLayout_2; 41 | QLabel *label; 42 | QHBoxLayout *horizontalLayout; 43 | QListWidget *favoritesList; 44 | QVBoxLayout *verticalLayout; 45 | QPushButton *addPrefsSchema; 46 | QPushButton *remPrefsSchema; 47 | QHBoxLayout *horizontalLayout_3; 48 | QLabel *label_3; 49 | QLineEdit *textSelection; 50 | QPushButton *browseFile; 51 | QLabel *label_2; 52 | QListWidget *lastUsedList; 53 | QHBoxLayout *horizontalLayout_2; 54 | QSpacerItem *horizontalSpacer; 55 | QDialogButtonBox *buttonBox; 56 | 57 | void init(); 58 | void retranslateUi(); 59 | 60 | void loadData(); 61 | void saveSelection(); 62 | void loadPreferredData(); 63 | void loadLastUsedData(); 64 | void setSelection(const QString &newSelection); 65 | void enableOK(const bool isEnabled); 66 | 67 | private slots: 68 | void accept(); 69 | void on_lastUsedList_currentItemChanged(QListWidgetItem* current, QListWidgetItem *previous); 70 | void on_lastUsedList_itemClicked(QListWidgetItem *item); 71 | void on_favoritesList_currentItemChanged(QListWidgetItem *current, QListWidgetItem * /*privious*/); 72 | void on_favoritesList_itemClicked(QListWidgetItem *item); 73 | void on_addPrefsSchema_clicked(); 74 | void on_remPrefsSchema_clicked(); 75 | void on_browseFile_clicked(); 76 | void on_textSelection_textChanged(const QString &text); 77 | void on_favoritesList_itemDoubleClicked(QListWidgetItem *item); 78 | void on_lastUsedList_itemDoubleClicked(QListWidgetItem *item); 79 | }; 80 | 81 | #endif // SCHEMACHOOSER_H 82 | -------------------------------------------------------------------------------- /schemavalidator.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHEMAVALIDATOR_H 2 | #define SCHEMAVALIDATOR_H 3 | 4 | #include "dommodel.h" 5 | #include "xsdeditor/xschema.h" 6 | #include "xsdeditor/validator/xelementcontent.h" 7 | 8 | class SchemaValidator 9 | { 10 | private: 11 | QList getPathFromItem(DomItem *item); 12 | XElementContent *getAvailableContent(XElementContent *content, XSDSchema *root, DomItem *currentItem, const bool startAtRoot); 13 | public: 14 | SchemaValidator(); 15 | ~SchemaValidator(); 16 | QStringList checkInsertionPoint(XSDSchema *root, DomItem *currentItem); 17 | bool getInsertionPointAllowedItems(XElementContent *content, XSDSchema *root, DomItem *currentItem, const bool startAsRoot); 18 | QStringList getInsertionPointList(XSDSchema *root, DomItem *currentItem, const bool startAsRoot); 19 | }; 20 | 21 | #endif // SCHEMAVALIDATOR_H 22 | -------------------------------------------------------------------------------- /setmodelthread.cpp: -------------------------------------------------------------------------------- 1 | #include "setmodelthread.h" 2 | 3 | #include "dommodel.h" 4 | 5 | SetModelThread::SetModelThread(QObject *parent) : 6 | QThread(parent) 7 | { 8 | document = new QDomDocument(); 9 | filePath = ""; 10 | } 11 | 12 | SetModelThread::~SetModelThread() 13 | { 14 | if(document != NULL) 15 | delete document; 16 | } 17 | 18 | 19 | void SetModelThread::run() 20 | { 21 | model = new DomModel(*document, filePath); 22 | emit setModelOvered(); 23 | } 24 | 25 | void SetModelThread::setTarget(QDomDocument &newDoc, const QString &newFileName) 26 | { 27 | *document = newDoc; 28 | filePath = newFileName; 29 | } 30 | -------------------------------------------------------------------------------- /setmodelthread.h: -------------------------------------------------------------------------------- 1 | #ifndef SETMODELTHREAD_H 2 | #define SETMODELTHREAD_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | class DomModel; 10 | 11 | class SetModelThread : public QThread 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit SetModelThread(QObject *parent = 0); 16 | ~SetModelThread(); 17 | 18 | DomModel *getModel() { 19 | return model; 20 | } 21 | 22 | void setTarget(QDomDocument&, const QString&); 23 | 24 | private: 25 | DomModel *model; 26 | 27 | QDomDocument *document; 28 | QString filePath; 29 | 30 | protected: 31 | virtual void run(); 32 | 33 | signals: 34 | void setModelOvered(); 35 | 36 | public slots: 37 | 38 | }; 39 | 40 | #endif // SETMODELTHREAD_H 41 | -------------------------------------------------------------------------------- /snippet_interface.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | #ifndef SNIPPET_INTERFACE_H 23 | #define SNIPPET_INTERFACE_H 24 | 25 | #include "dommodel.h" 26 | 27 | void editSnippets(QXmlEditData *data, QWidget *parent); 28 | 29 | DomModel* chooseSnippets(QXmlEditData *data, QWidget *parent); 30 | 31 | void insertFragmentInSnippets(QWidget *parent, QXmlEditData *data, const QString &text); 32 | 33 | #endif // SNIPPET_INTERFACE_H 34 | -------------------------------------------------------------------------------- /stylepersistence.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | #ifndef STYLEPERSISTENCE_H 23 | #define STYLEPERSISTENCE_H 24 | 25 | #include "style.h" 26 | #include 27 | 28 | class StylePersistence : public QObject 29 | { 30 | 31 | Q_OBJECT 32 | QHash mapTokens; 33 | 34 | public: 35 | StylePersistence(); 36 | ~StylePersistence(); 37 | 38 | bool scanDirectory(const QString &dirName, QVector *styles); 39 | 40 | private: 41 | bool collectAnId(VStyle *style, QDomElement *node); 42 | bool collectIds(VStyle *style, QDomNodeList &nodes); 43 | bool collectKeywords(VStyle *style, QDomNodeList &nodes); 44 | bool collectAKeyword(VStyle *style, QDomElement *keyWrd); 45 | bool collectAStyle(VStyle *style, QDomElement *keyWrd); 46 | bool collectStyles(VStyle *style, QDomNodeList &nodes); 47 | bool scanStyleData(VStyle *style, QDomNode &rootNode); 48 | bool scanData(QVector *styles, QDomNode &rootNode); 49 | bool readStyleFile(QVector *styles, const QString & filePath); 50 | void completeStyle(VStyle *style); 51 | }; 52 | 53 | #endif // STYLEPERSISTENCE_H 54 | -------------------------------------------------------------------------------- /test.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #ifndef TEST_H 24 | #define TEST_H 25 | 26 | #include 27 | #include 28 | #include "dommodel.h" 29 | #include "global.h" 30 | 31 | class LIBQXMLEDITSHARED_EXPORT Test 32 | { 33 | Q_DECLARE_TR_FUNCTIONS(Test) 34 | 35 | DomModel *loadRule(const QString &filePath); 36 | bool testSaveAs(QWidget *parent, DomModel *source); 37 | bool testFailure(QWidget *parent, DomModel *source); 38 | bool testCopyAndPaste(QWidget *parent); 39 | 40 | public: 41 | Test(); 42 | ~Test(); 43 | 44 | void doTest(QWidget *parent); 45 | static void executeTests(QWidget *parent); 46 | 47 | }; 48 | 49 | #endif // TEST_H 50 | -------------------------------------------------------------------------------- /texteditutils.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | #include "texteditutils.h" 23 | #include 24 | 25 | void TextEditUtils::gotoPos(QTextEdit *textEdit, const int column, const int row) 26 | { 27 | QTextCursor cursor = textEdit->textCursor(); 28 | cursor.movePosition(QTextCursor::Down, QTextCursor::MoveAnchor, row) ; 29 | cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, column) ; 30 | textEdit->setTextCursor(cursor); 31 | } 32 | 33 | void TextEditUtils::hiliteCurrentPos(QTextEdit *textEdit) 34 | { 35 | QList extraSelections; 36 | QTextEdit::ExtraSelection selection; 37 | QColor lineColor = QColor(Qt::yellow).lighter(160); 38 | 39 | selection.format.setBackground(lineColor); 40 | selection.format.setFontWeight(QFont::Black); 41 | selection.format.setProperty(QTextFormat::FullWidthSelection, true); 42 | selection.cursor = textEdit->textCursor(); 43 | if(selection.cursor.hasSelection()) { 44 | selection.cursor.clearSelection(); 45 | } 46 | extraSelections.append(selection); 47 | textEdit->setExtraSelections(extraSelections); 48 | } 49 | -------------------------------------------------------------------------------- /texteditutils.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | #ifndef TEXTEDITUTILS_H 23 | #define TEXTEDITUTILS_H 24 | 25 | #include 26 | 27 | class TextEditUtils 28 | { 29 | private: 30 | TextEditUtils() {} 31 | public: 32 | static void gotoPos(QTextEdit *textEdit, const int column, const int row); 33 | static void hiliteCurrentPos(QTextEdit *textEdit); 34 | }; 35 | 36 | #endif // TEXTEDITUTILS_H 37 | -------------------------------------------------------------------------------- /undo/undobasechangeelement.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef UNDOBASECHANGEELEMENT_H 25 | #define UNDOBASECHANGEELEMENT_H 26 | 27 | #include "undocommand.h" 28 | 29 | class UndoBaseChangeElement : public UndoCommand 30 | { 31 | protected: 32 | bool _firstShot; 33 | DomItem *_element; 34 | 35 | void loseElement(); 36 | 37 | public: 38 | explicit UndoBaseChangeElement(QTreeWidget *theWidget, DomModel *newRegola, QList newPath) ; 39 | virtual ~UndoBaseChangeElement(); 40 | 41 | virtual void undo() = 0 ; 42 | virtual void redo() = 0 ; 43 | 44 | 45 | protected: 46 | void removeElement(); 47 | void insertElement(); 48 | 49 | }; 50 | 51 | #endif // UNDOBASECHANGEELEMENT_H 52 | -------------------------------------------------------------------------------- /undo/undocommand.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #include "undocommand.h" 25 | 26 | 27 | UndoCommand::UndoCommand(QTreeWidget *theWidget, DomModel *newRegola, QList newPath) 28 | { 29 | widget = theWidget; 30 | regola = newRegola; 31 | path = newPath ; 32 | } 33 | 34 | UndoCommand::~UndoCommand() 35 | { 36 | } 37 | -------------------------------------------------------------------------------- /undo/undocommand.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef UNDOCOMMAND_H 25 | #define UNDOCOMMAND_H 26 | 27 | #include "global.h" 28 | #include "dommodel.h" 29 | #include 30 | #include 31 | 32 | class UndoCommand : public QUndoCommand 33 | { 34 | protected: 35 | /** 36 | the path to the element 37 | */ 38 | QList path; 39 | DomModel *regola; 40 | QTreeWidget *widget; 41 | public: 42 | UndoCommand(QTreeWidget *theWidget, DomModel *newRegola, QList path); 43 | virtual ~UndoCommand(); 44 | }; 45 | 46 | #endif // UNDOCOMMAND_H 47 | -------------------------------------------------------------------------------- /undo/undodeletecommand.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #include "undodeletecommand.h" 25 | 26 | 27 | UndoDeleteCommand::UndoDeleteCommand(QTreeWidget *theWidget, DomModel *newRegola, QList newPath) : UndoBaseChangeElement(theWidget, newRegola, newPath) 28 | { 29 | DomItem *selElement = regola->findItemByArray(path); 30 | if(NULL != selElement) { 31 | // copy data 32 | _element = new DomItem(NULL); 33 | if(NULL != _element) { 34 | // full copy 35 | selElement->copyTo(*_element); 36 | } 37 | } 38 | } 39 | 40 | UndoDeleteCommand::~UndoDeleteCommand() 41 | { 42 | } 43 | 44 | 45 | void UndoDeleteCommand::undo() 46 | { 47 | insertElement(); 48 | } 49 | 50 | void UndoDeleteCommand::redo() 51 | { 52 | if(_firstShot) { 53 | _firstShot = false ; 54 | } else { 55 | removeElement(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /undo/undodeletecommand.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef UNDODELETECOMMAND_H 25 | #define UNDODELETECOMMAND_H 26 | 27 | #include "undobasechangeelement.h" 28 | 29 | class UndoDeleteCommand : public UndoBaseChangeElement 30 | { 31 | 32 | public: 33 | UndoDeleteCommand(QTreeWidget *theWidget, DomModel *newRegola, QList path); 34 | virtual ~UndoDeleteCommand(); 35 | 36 | virtual void undo(); 37 | virtual void redo(); 38 | 39 | }; 40 | 41 | #endif // UNDODELETECOMMAND_H 42 | -------------------------------------------------------------------------------- /undo/undoeditcommand.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef UNDOEDITCOMMAND_H 25 | #define UNDOEDITCOMMAND_H 26 | 27 | #include "undocommand.h" 28 | 29 | class UndoEditCommand : public UndoCommand 30 | { 31 | Q_DECLARE_TR_FUNCTIONS(UndoEditCommand) 32 | bool _firstShot; 33 | DomItem *_modifiedElement; 34 | DomItem *_originalElement; 35 | 36 | void makeACopy(DomItem *source); 37 | public: 38 | UndoEditCommand(QTreeWidget *theWidget, DomModel *newRegola, QList path); 39 | virtual ~UndoEditCommand(); 40 | 41 | virtual void undo(); 42 | virtual void redo(); 43 | 44 | void setOriginalElement(DomItem *beforeEdit); 45 | void setModifiedElement(DomItem *afterEdit); 46 | }; 47 | 48 | #endif // UNDOEDITCOMMAND_H 49 | -------------------------------------------------------------------------------- /undo/undoinsertcommand.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #include "undoinsertcommand.h" 25 | 26 | UndoInsertCommand::UndoInsertCommand(QTreeWidget *theWidget, DomModel *newRegola, QList newPath) : UndoBaseChangeElement(theWidget, newRegola, newPath) 27 | { 28 | DomItem *selElement = regola->findItemByArray(path); 29 | if(NULL != selElement) { 30 | // copy data 31 | _element = new DomItem(NULL); 32 | if(NULL != _element) { 33 | // full copy 34 | selElement->copyTo(*_element); 35 | } 36 | } 37 | } 38 | 39 | UndoInsertCommand::~UndoInsertCommand() 40 | { 41 | } 42 | 43 | void UndoInsertCommand::undo() 44 | { 45 | removeElement(); 46 | } 47 | 48 | void UndoInsertCommand::redo() 49 | { 50 | if(_firstShot) { 51 | _firstShot = false ; 52 | } else { 53 | insertElement(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /undo/undoinsertcommand.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef UNDOINSERTCOMMAND_H 25 | #define UNDOINSERTCOMMAND_H 26 | 27 | #include "undobasechangeelement.h" 28 | 29 | class UndoInsertCommand : public UndoBaseChangeElement 30 | { 31 | public: 32 | UndoInsertCommand(QTreeWidget *theWidget, DomModel *newRegola, QList path); 33 | virtual ~UndoInsertCommand(); 34 | 35 | virtual void undo(); 36 | virtual void redo(); 37 | }; 38 | 39 | #endif // UNDOINSERTCOMMAND_H 40 | -------------------------------------------------------------------------------- /undo/undomanager.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #include "undomanager.h" 25 | 26 | UndoManager::UndoManager() 27 | { 28 | } 29 | 30 | UndoManager::~UndoManager() 31 | { 32 | } 33 | -------------------------------------------------------------------------------- /undo/undomanager.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef UNDOMANAGER_H 25 | #define UNDOMANAGER_H 26 | 27 | class UndoManager 28 | { 29 | public: 30 | UndoManager(); 31 | virtual ~UndoManager(); 32 | }; 33 | 34 | #endif // UNDOMANAGER_H 35 | -------------------------------------------------------------------------------- /undo/undomovedowncommand.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #include "undomovedowncommand.h" 24 | 25 | UndoMoveDownCommand::UndoMoveDownCommand(QTreeWidget *theWidget, DomModel *newRegola, QList newPath) : UndoCommand(theWidget, newRegola, newPath) 26 | { 27 | } 28 | 29 | UndoMoveDownCommand::~UndoMoveDownCommand() 30 | { 31 | } 32 | 33 | void UndoMoveDownCommand::undo() 34 | { 35 | if(_done) { 36 | QList selPath(path); 37 | int size = selPath.size() ; 38 | if(size > 0) { 39 | int lastPos = selPath.at(size - 1); 40 | lastPos ++ ; 41 | selPath.removeLast(); 42 | selPath.append(lastPos); 43 | } 44 | DomItem *element = regola->findItemByArray(selPath); 45 | regola->internalMoveUp(element, false); 46 | } 47 | } 48 | 49 | void UndoMoveDownCommand::redo() 50 | { 51 | DomItem *element = regola->findItemByArray(path); 52 | _done = regola->internalMoveDown(element, false); 53 | } 54 | 55 | bool UndoMoveDownCommand::done() 56 | { 57 | return _done ; 58 | } 59 | -------------------------------------------------------------------------------- /undo/undomovedowncommand.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef UNDOMOVEDOWNCOMMAND_H 25 | #define UNDOMOVEDOWNCOMMAND_H 26 | 27 | #include "undocommand.h" 28 | 29 | class UndoMoveDownCommand : public UndoCommand 30 | { 31 | bool _done; 32 | public: 33 | UndoMoveDownCommand(QTreeWidget *theWidget, DomModel *newRegola, QList path); 34 | virtual ~UndoMoveDownCommand(); 35 | 36 | virtual void undo(); 37 | virtual void redo(); 38 | 39 | bool done(); 40 | 41 | }; 42 | 43 | #endif // UNDOMOVEDOWNCOMMAND_H 44 | -------------------------------------------------------------------------------- /undo/undomoveupcommand.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #include "undomoveupcommand.h" 24 | 25 | UndoMoveUpCommand::UndoMoveUpCommand(QTreeWidget *theWidget, DomModel *newRegola, QList newPath) : UndoCommand(theWidget, newRegola, newPath) 26 | { 27 | _done = false; 28 | } 29 | 30 | UndoMoveUpCommand::~UndoMoveUpCommand() 31 | { 32 | } 33 | 34 | void UndoMoveUpCommand::undo() 35 | { 36 | if(_done) { 37 | QList selPath(path); 38 | int size = selPath.size() ; 39 | if(size > 0) { 40 | int lastPos = selPath.at(size - 1); 41 | lastPos --; 42 | selPath.removeLast(); 43 | selPath.append(lastPos); 44 | } 45 | DomItem *element = regola->findItemByArray(selPath); 46 | regola->internalMoveDown(element, false); 47 | } 48 | } 49 | 50 | void UndoMoveUpCommand::redo() 51 | { 52 | DomItem *element = regola->findItemByArray(path); 53 | _done = regola->internalMoveUp(element, false); 54 | } 55 | 56 | bool UndoMoveUpCommand::done() 57 | { 58 | return _done ; 59 | } 60 | -------------------------------------------------------------------------------- /undo/undomoveupcommand.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2012 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef UNDOMOVEUPCOMMAND_H 25 | #define UNDOMOVEUPCOMMAND_H 26 | 27 | #include "undocommand.h" 28 | 29 | class UndoMoveUpCommand : public UndoCommand 30 | { 31 | bool _done; 32 | public: 33 | UndoMoveUpCommand(QTreeWidget *theWidget, DomModel *newRegola, QList path); 34 | virtual ~UndoMoveUpCommand(); 35 | 36 | virtual void undo(); 37 | virtual void redo(); 38 | 39 | bool done(); 40 | }; 41 | 42 | #endif // UNDOMOVEUPCOMMAND_H 43 | -------------------------------------------------------------------------------- /validationresults.h: -------------------------------------------------------------------------------- 1 | #ifndef VALIDATIONRESULTS_H 2 | #define VALIDATIONRESULTS_H 3 | 4 | #include 5 | #include "validatormessagehandler.h" 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | class ValidationResults : public QDialog 21 | { 22 | Q_OBJECT 23 | public: 24 | ValidationResults(const QString text, ValidatorMessageHandler &validator, QWidget *parent = 0); 25 | ~ValidationResults(); 26 | 27 | protected: 28 | void changeEvent(QEvent *e); 29 | 30 | private: 31 | 32 | QHBoxLayout *horizontalLayout; 33 | QVBoxLayout *verticalLayout; 34 | QTextBrowser *textBrowser; 35 | QLabel *error; 36 | QVBoxLayout *verticalLayout_2; 37 | QDialogButtonBox *buttonBox; 38 | QSpacerItem *verticalSpacer; 39 | 40 | void init(); 41 | void retranslateUi(); 42 | ValidatorMessageHandler &_validator; 43 | 44 | }; 45 | 46 | void showValidationResults(const QString text, ValidatorMessageHandler &validator, QWidget *parent); 47 | 48 | #endif // VALIDATIONRESULTS_H 49 | -------------------------------------------------------------------------------- /validatormessagehandler.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #include "validatormessagehandler.h" 24 | 25 | #ifndef USE_QT_44 26 | 27 | ValidatorMessageHandler::ValidatorMessageHandler() : QAbstractMessageHandler(NULL) 28 | { 29 | } 30 | 31 | ValidatorMessageHandler::~ValidatorMessageHandler() 32 | { 33 | } 34 | 35 | 36 | void ValidatorMessageHandler::handleMessage(QtMsgType type, const QString & description, const QUrl & identifier, const QSourceLocation & sourceLocation) 37 | { 38 | _type = type ; 39 | _description = description; 40 | _identifier = identifier ; 41 | _sourceLocation = sourceLocation ; 42 | } 43 | 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /xmleditglobals.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #include "xmleditglobals.h" 25 | 26 | QString QXmlEditGlobals::_appTitle = QT_TR_NOOP("ICD Creator"); 27 | 28 | QXmlEditGlobals::QXmlEditGlobals() 29 | { 30 | } 31 | 32 | void QXmlEditGlobals::setAppTitle(const QString newTitle) 33 | { 34 | _appTitle = newTitle ; 35 | } 36 | 37 | QString QXmlEditGlobals::appTitle() 38 | { 39 | return _appTitle; 40 | } 41 | -------------------------------------------------------------------------------- /xmleditglobals.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef QXMLEDITWIDGET_XMLEDITGLOBALS_H 25 | #define QXMLEDITWIDGET_XMLEDITGLOBALS_H 26 | 27 | #include "global.h" 28 | #include 29 | 30 | class LIBQXMLEDITSHARED_EXPORT QXmlEditGlobals 31 | { 32 | static QString _appTitle; 33 | private: 34 | QXmlEditGlobals(); 35 | public: 36 | 37 | static void setAppTitle(const QString newTitle); 38 | static QString appTitle(); 39 | }; 40 | 41 | #endif // QXMLEDITWIDGET_XMLEDITGLOBALS_H 42 | -------------------------------------------------------------------------------- /xmlutils.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #include "xmlutils.h" 24 | #include "xsdeditor/xschema.h" 25 | 26 | XmlUtils::XmlUtils() 27 | { 28 | } 29 | 30 | XmlUtils::~XmlUtils() 31 | { 32 | } 33 | 34 | 35 | /** 36 | checks if the root element namespace and element correspond to thos if XSD 37 | */ 38 | 39 | bool XmlUtils::IsXsdValid(const QString &nsUri, const QString &localName) 40 | { 41 | return XSDSchema::IsXsdValid(nsUri, localName); 42 | } 43 | -------------------------------------------------------------------------------- /xmlutils.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef XMLUTILS_H 25 | #define XMLUTILS_H 26 | 27 | #include 28 | 29 | class XmlUtils 30 | { 31 | private: 32 | XmlUtils(); 33 | ~XmlUtils(); 34 | public: 35 | static bool IsXsdValid(const QString &nsUri, const QString &localName); 36 | }; 37 | 38 | #endif // XMLUTILS_H 39 | -------------------------------------------------------------------------------- /xsaxhandler.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "xsaxhandler.h" 3 | #include "utils.h" 4 | 5 | XSaxHandler::XSaxHandler(DomModel *regola) 6 | { 7 | xmlTree = regola ; 8 | currentElement = NULL ; 9 | } 10 | 11 | XSaxHandler::~XSaxHandler() 12 | { 13 | } 14 | 15 | bool XSaxHandler::startElement(const QString &/*namespaceURI*/, const QString &/*localName*/, 16 | const QString &qName, const QXmlAttributes &/*attributes*/) 17 | { 18 | //TODO Element *elem = new Element( xmlTree->getTag(qName), QString(""), xmlTree, currentElement ) ; 19 | DomItem *elem = new DomItem(xmlTree->addNameToPool(qName), QString(""), xmlTree, currentElement) ; 20 | if(NULL == currentElement) { 21 | xmlTree->setRootItem(elem); 22 | } else { 23 | currentElement->addChild(elem) ; 24 | } 25 | currentElement = elem ; 26 | return true ; 27 | } 28 | 29 | bool XSaxHandler::endElement(const QString &/*namespaceURI*/, const QString &/*localName*/, 30 | const QString &/*qName*/) 31 | { 32 | if(NULL != currentElement) { 33 | currentElement = currentElement->parent(); 34 | } 35 | return true; 36 | } 37 | 38 | bool XSaxHandler::characters(const QString &str) 39 | { 40 | if(NULL != currentElement) { 41 | currentElement->incrementSizeInfo(str.length()); 42 | } 43 | return true ; 44 | } 45 | 46 | bool XSaxHandler::fatalError(const QXmlParseException &exception) 47 | { 48 | Utils::error(QObject::tr("Parse error (2) at line %1, column %2:\n%3") 49 | .arg(exception.lineNumber()) 50 | .arg(exception.columnNumber()) 51 | .arg(exception.message())); 52 | return false; 53 | } 54 | 55 | bool XSaxHandler::error(const QXmlParseException &exception) 56 | { 57 | Utils::error(QObject::tr("Parse error (1) at line %1, column %2:\n%3") 58 | .arg(exception.lineNumber()) 59 | .arg(exception.columnNumber()) 60 | .arg(exception.message())); 61 | return false; 62 | } 63 | QString XSaxHandler::errorString() const 64 | { 65 | return QObject::tr("Generic error."); 66 | } 67 | -------------------------------------------------------------------------------- /xsaxhandler.h: -------------------------------------------------------------------------------- 1 | #ifndef XSAXHANDLER_H 2 | #define XSAXHANDLER_H 3 | 4 | #include 5 | #include "dommodel.h" 6 | 7 | class XSaxHandler : public QXmlDefaultHandler 8 | { 9 | DomModel *xmlTree; 10 | DomItem *currentElement; 11 | public: 12 | XSaxHandler(DomModel *regola); 13 | ~XSaxHandler(); 14 | 15 | bool startElement(const QString &namespaceURI, const QString &localName, 16 | const QString &qName, const QXmlAttributes &attributes); 17 | bool endElement(const QString &namespaceURI, const QString &localName, 18 | const QString &qName); 19 | bool characters(const QString &str); 20 | bool fatalError(const QXmlParseException &exception); 21 | bool error(const QXmlParseException &exception); 22 | QString errorString() const; 23 | }; 24 | 25 | #endif // XSAXHANDLER_H 26 | -------------------------------------------------------------------------------- /xsdeditor/XSDScene.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #include "xsdwindow.h" 24 | 25 | XSDScene::XSDScene() 26 | { 27 | } 28 | 29 | XSDScene::~XSDScene() 30 | { 31 | } 32 | 33 | void XSDScene::updateBounds() 34 | { 35 | QRectF nullRect; 36 | setSceneRect(nullRect); 37 | QRectF bounds(0, 0, 0, 0); 38 | foreach(QGraphicsItem * item, items()) { 39 | QRectF itemBounds = item->boundingRect(); 40 | bounds = bounds.united(itemBounds); 41 | } 42 | bounds.setWidth(bounds.width() * 1.1); 43 | bounds.setHeight(bounds.height() * 1.1); 44 | setSceneRect(bounds); 45 | } 46 | 47 | void XSDScene::gotoItem(QGraphicsItem *item) 48 | { 49 | if(NULL == item) { 50 | return ; 51 | } 52 | setFocusItem(item); 53 | item->setSelected(true); 54 | QPointF itemPos = item->scenePos(); 55 | foreach(QGraphicsView * view, views()) { 56 | view->centerOn(itemPos); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /xsdeditor/XsdException.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | #include "xsdeditor/xschema.h" 23 | #include "utils.h" 24 | 25 | XsdException::XsdException(const QString &theCause) : _cause(theCause) 26 | { 27 | Utils::error(QString("TODO: exception thrown, cause:%1 ").arg(theCause)); 28 | } 29 | 30 | XsdException::XsdException() 31 | { 32 | } 33 | 34 | const char* XsdException::what() const throw() 35 | { 36 | return _cause.toAscii().data(); 37 | } 38 | 39 | QString XsdException::cause() const throw() 40 | { 41 | return _cause; 42 | } 43 | 44 | XsdException::~XsdException() throw() 45 | { 46 | } 47 | 48 | void XsdError(const QString &message) 49 | { 50 | throw new XsdException(message); 51 | } 52 | -------------------------------------------------------------------------------- /xsdeditor/validator/xelementcontent.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | 24 | #ifndef XELEMENTCONTENT_H 25 | #define XELEMENTCONTENT_H 26 | 27 | #include "xsdeditor/validator/xsingleelementcontent.h" 28 | 29 | class XValidationContext; 30 | 31 | #include 32 | 33 | class XElementContent : public QObject 34 | { 35 | Q_OBJECT 36 | 37 | QList _allowedItems; 38 | QList _forbiddenItems; 39 | 40 | void reset(); 41 | public: 42 | XElementContent(); 43 | ~XElementContent(); 44 | 45 | XSchemaObject *item(const QString &itemName); 46 | QList &allowedItems(); 47 | XSingleElementContent *addAllowed(XValidationContext *context, XSchemaObject *object); 48 | }; 49 | 50 | #endif // XELEMENTCONTENT_H 51 | -------------------------------------------------------------------------------- /xsdeditor/validator/xvalidationcontext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #ifndef XVALIDATIONCONTEXT_H 24 | #define XVALIDATIONCONTEXT_H 25 | 26 | #include 27 | 28 | #include "xsdeditor/validator/xelementcontent.h" 29 | 30 | class XValidationContext : public QObject 31 | { 32 | Q_OBJECT 33 | XElementContent *_content; 34 | bool _isError; 35 | QString _errorMessage; 36 | XSingleElementContent *_currentTarget; 37 | public: 38 | XValidationContext(XElementContent *rootContent); 39 | ~XValidationContext(); 40 | 41 | void setError(const QString &errorMessage); 42 | XSingleElementContent *currentTarget(); 43 | void setCurrentTarget(XSingleElementContent *newTarget); 44 | XSingleElementContent *addAllowed(XSingleElementContent *parent, XSchemaObject *object); 45 | }; 46 | 47 | #endif // XVALIDATIONCONTEXT_H 48 | -------------------------------------------------------------------------------- /xsdeditor/widgets/XEditorInterface.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #ifndef XEDITORINTERFACE_H 24 | #define XEDITORINTERFACE_H 25 | 26 | #include "xsdeditor/xschema.h" 27 | 28 | class XEditorInterface 29 | { 30 | public: 31 | //legacy code 32 | virtual ~XEditorInterface() {} 33 | 34 | virtual void setTarget(XSchemaObject *newTarget) = 0; 35 | virtual XSchemaObject *target() = 0; 36 | }; 37 | 38 | Q_DECLARE_INTERFACE(XEditorInterface, 39 | "org.qxmledit.XEditorInterface/1.0") 40 | 41 | #endif // XEDITORINTERFACE_H 42 | -------------------------------------------------------------------------------- /xsdeditor/widgets/xsdattributeeditor.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | #ifndef XSDATTRIBUTEEDITOR_H 23 | #define XSDATTRIBUTEEDITOR_H 24 | 25 | #include 26 | #include "xsdeditor/xschema.h" 27 | #include "xsdeditor/widgets/XEditorInterface.h" 28 | 29 | namespace Ui 30 | { 31 | class XsdAttributeEditor; 32 | } 33 | 34 | class XsdAttributeEditor : public QWidget, public XEditorInterface 35 | { 36 | Q_OBJECT 37 | Q_INTERFACES(XEditorInterface) 38 | 39 | XSchemaAttribute *_target; 40 | 41 | public: 42 | explicit XsdAttributeEditor(QWidget *parent = 0); 43 | ~XsdAttributeEditor(); 44 | 45 | void setTarget(XSchemaObject *newTarget); 46 | XSchemaObject *target() ; 47 | 48 | protected: 49 | void changeEvent(QEvent *e); 50 | 51 | private: 52 | Ui::XsdAttributeEditor *ui; 53 | }; 54 | 55 | #endif // XSDATTRIBUTEEDITOR_H 56 | -------------------------------------------------------------------------------- /xsdeditor/widgets/xsdattributeeditor.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | XsdAttributeEditor 4 | 5 | 6 | 7 | 0 8 | 0 9 | 456 10 | 59 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 90 20 | 30 21 | 221 22 | 16 23 | 24 | 25 | 26 | Attribute editor 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /xsdeditor/widgets/xsdchoiceeditor.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | #ifndef XSDCHOICEEDITOR_H 23 | #define XSDCHOICEEDITOR_H 24 | 25 | #include 26 | #include "xsdeditor/xschema.h" 27 | #include "xsdeditor/widgets/XEditorInterface.h" 28 | 29 | namespace Ui 30 | { 31 | class XsdChoiceEditor; 32 | } 33 | 34 | class XsdChoiceEditor : public QWidget, public XEditorInterface 35 | { 36 | Q_OBJECT 37 | Q_INTERFACES(XEditorInterface) 38 | 39 | XSchemaChoice *_target; 40 | 41 | public: 42 | explicit XsdChoiceEditor(QWidget *parent = 0); 43 | ~XsdChoiceEditor(); 44 | 45 | void setTarget(XSchemaObject *newTarget); 46 | XSchemaObject *target() ; 47 | 48 | protected: 49 | void changeEvent(QEvent *e); 50 | 51 | private: 52 | Ui::XsdChoiceEditor *ui; 53 | }; 54 | 55 | #endif // XSDCHOICEEDITOR_H 56 | -------------------------------------------------------------------------------- /xsdeditor/widgets/xsdchoiceeditor.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | XsdChoiceEditor 4 | 5 | 6 | 7 | 0 8 | 0 9 | 429 10 | 73 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 90 20 | 20 21 | 251 22 | 16 23 | 24 | 25 | 26 | Choice editor 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /xsdeditor/widgets/xsdgenericeditor.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #ifndef XSDGENERICEDITOR_H 24 | #define XSDGENERICEDITOR_H 25 | 26 | #include 27 | #include 28 | 29 | // generic editor/inspector 30 | 31 | namespace Ui 32 | { 33 | class XSDGenericEditor; 34 | } 35 | 36 | class XMethInfo; 37 | class XDescriptor1; 38 | 39 | class XSDGenericEditor : public QWidget 40 | { 41 | Q_OBJECT 42 | QObject *_target; 43 | QMap _widgets; 44 | QMap _properties; 45 | 46 | public: 47 | explicit XSDGenericEditor(QWidget *parent = 0); 48 | ~XSDGenericEditor(); 49 | 50 | void setTarget(QObject *newTarget, XDescriptor1 &descriptor); 51 | 52 | protected: 53 | void changeEvent(QEvent *e); 54 | 55 | private: 56 | Ui::XSDGenericEditor *ui; 57 | 58 | private slots: 59 | void textPropertyChanged(const char*propertyName); 60 | void on_field_editTextChanged(const QString & text); 61 | }; 62 | 63 | #endif // XSDGENERICEDITOR_H 64 | -------------------------------------------------------------------------------- /xsdeditor/widgets/xsdgenericeditor.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | XSDGenericEditor 4 | 5 | 6 | 7 | 0 8 | 0 9 | 508 10 | 135 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 20 | 10 21 | 46 22 | 14 23 | 24 | 25 | 26 | Generic editor 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /xsdeditor/widgets/xsdrooteditor.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | #ifndef XSDROOTEDITOR_H 23 | #define XSDROOTEDITOR_H 24 | 25 | #include 26 | #include "xsdeditor/xschema.h" 27 | #include "xsdeditor/widgets/XEditorInterface.h" 28 | 29 | namespace Ui 30 | { 31 | class XsdRootEditor; 32 | } 33 | 34 | class XsdRootEditor : public QWidget, public XEditorInterface 35 | { 36 | Q_OBJECT 37 | Q_INTERFACES(XEditorInterface) 38 | 39 | XSDSchema *_target; 40 | 41 | public: 42 | explicit XsdRootEditor(QWidget *parent = 0); 43 | ~XsdRootEditor(); 44 | 45 | void setTarget(XSchemaObject *newTarget); 46 | XSchemaObject *target() ; 47 | 48 | protected: 49 | void changeEvent(QEvent *e); 50 | 51 | private: 52 | Ui::XsdRootEditor *ui; 53 | }; 54 | 55 | #endif // XSDROOTEDITOR_H 56 | -------------------------------------------------------------------------------- /xsdeditor/widgets/xsdsequenceeditor.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | #ifndef XSDSEQUENCEEDITOR_H 23 | #define XSDSEQUENCEEDITOR_H 24 | 25 | #include 26 | 27 | #include "xsdeditor/xschema.h" 28 | #include "xsdeditor/widgets/XEditorInterface.h" 29 | namespace Ui 30 | { 31 | class XsdSequenceEditor; 32 | } 33 | 34 | class XsdSequenceEditor : public QWidget, public XEditorInterface 35 | { 36 | Q_OBJECT 37 | Q_INTERFACES(XEditorInterface) 38 | 39 | XSchemaSequence *_target; 40 | 41 | public: 42 | explicit XsdSequenceEditor(QWidget *parent = 0); 43 | ~XsdSequenceEditor(); 44 | 45 | void setTarget(XSchemaObject *newTarget); 46 | XSchemaObject *target() ; 47 | 48 | protected: 49 | void changeEvent(QEvent *e); 50 | 51 | private: 52 | Ui::XsdSequenceEditor *ui; 53 | }; 54 | 55 | #endif // XSDSEQUENCEEDITOR_H 56 | -------------------------------------------------------------------------------- /xsdeditor/widgets/xsdsequenceeditor.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | XsdSequenceEditor 4 | 5 | 6 | 7 | 0 8 | 0 9 | 439 10 | 113 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 20 | 40 21 | 301 22 | 16 23 | 24 | 25 | 26 | sequence editor 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /xsdeditor/xsdcontroller.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #include "xsdeditor/xsdcontroller.h" 24 | 25 | XsdController::XsdController(QObject *parent) : 26 | QObject(parent) 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /xsdeditor/xsdcontroller.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #ifndef XSDCONTROLLER_H 24 | #define XSDCONTROLLER_H 25 | 26 | #include 27 | 28 | class XsdController : public QObject 29 | { 30 | Q_OBJECT 31 | public: 32 | explicit XsdController(QObject *parent = 0); 33 | 34 | signals: 35 | 36 | public slots: 37 | 38 | }; 39 | 40 | #endif // XSDCONTROLLER_H 41 | -------------------------------------------------------------------------------- /xsdeditor/xsddefinitions.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #ifndef XSDDEFINITIONS_H 24 | #define XSDDEFINITIONS_H 25 | 26 | 27 | #endif // XSDDEFINITIONS_H 28 | -------------------------------------------------------------------------------- /xsdeditor/xsdparseutils.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #ifndef XSDPARSEUTILS_H 24 | #define XSDPARSEUTILS_H 25 | 26 | class XScanContext 27 | { 28 | public: 29 | bool childFound; 30 | bool fieldFound; 31 | bool selectorFound; 32 | XScanContext() { 33 | childFound = false ; 34 | fieldFound = false ; 35 | selectorFound = false ; 36 | } 37 | }; 38 | 39 | 40 | #endif // XSDPARSEUTILS_H 41 | -------------------------------------------------------------------------------- /xsdeditor/xsdplugin.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #ifndef XSDPLUGIN_H 24 | #define XSDPLUGIN_H 25 | 26 | #include "global.h" 27 | 28 | #include "plugin.h" 29 | 30 | class LIBQXMLEDITSHARED_EXPORT XsdPlugin : public IQXmlEditPlugIn 31 | { 32 | Q_OBJECT 33 | 34 | public: 35 | XsdPlugin(); 36 | ~XsdPlugin(); 37 | 38 | QString name() ; 39 | QString description() ; 40 | QString version() ; 41 | bool go(QWidget *parent, DomModel *data); 42 | bool goTest(QWidget *parent); 43 | }; 44 | 45 | #endif // XSDPLUGIN_H 46 | -------------------------------------------------------------------------------- /xsdeditor/xsdtypes.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #ifndef XSDTYPES_H 24 | #define XSDTYPES_H 25 | 26 | enum EXType { 27 | xsd_NONE, 28 | xsd_anyURI, 29 | xsd_base64Binary, 30 | xsd_boolean, 31 | xsd_byte, 32 | xsd_date, 33 | xsd_dateTime, 34 | xsd_decimal, 35 | xsd_double, 36 | xsd_duration, 37 | xsd_float, 38 | xsd_gDay, 39 | xsd_gMonth, 40 | xsd_gMonthDay, 41 | xsd_gYear, 42 | xsd_gYearMonth, 43 | xsd_hexBinary, 44 | xsd_ID, 45 | xsd_IDREF, 46 | xsd_IDREFS, 47 | xsd_int, 48 | xsd_integer, 49 | xsd_language, 50 | xsd_long, 51 | xsd_Name, 52 | xsd_NCName, 53 | xsd_negativeInteger, 54 | xsd_NMTOKEN, 55 | xsd_NMTOKENS, 56 | xsd_nonNegativeInteger, 57 | xsd_nonPositiveInteger, 58 | xsd_normalizedString, 59 | xsd_positiveInteger, 60 | xsd_QName, 61 | xsd_short, 62 | xsd_string, 63 | xsd_time, 64 | xsd_token, 65 | xsd_unsignedByte, 66 | xsd_unsignedInt, 67 | xsd_unsignedLong, 68 | xsd_unsignedShort 69 | 70 | }; 71 | 72 | #endif // XSDTYPES_H 73 | -------------------------------------------------------------------------------- /xsdeditor/xtypes.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This file is part of QXmlEdit * 3 | * Copyright (C) 2011 by Luca Bellonda and individual contributors * 4 | * as indicated in the AUTHORS file * 5 | * lbellonda _at_ gmail.com * 6 | * * 7 | * This library is free software; you can redistribute it and/or * 8 | * modify it under the terms of the GNU Library General Public * 9 | * License as published by the Free Software Foundation; either * 10 | * version 2 of the License, or (at your option) any later version. * 11 | * * 12 | * This library is distributed in the hope that it will be useful, * 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * Library General Public License for more details. * 16 | * * 17 | * You should have received a copy of the GNU Library General Public * 18 | * License along with this library; if not, write to the * 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 20 | * Boston, MA 02110-1301 USA * 21 | **************************************************************************/ 22 | 23 | #ifndef XTYPES_H 24 | #define XTYPES_H 25 | 26 | 27 | #endif // XTYPES_H 28 | --------------------------------------------------------------------------------