Completely remove unsupported XML editor.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-01-03 20:16:04 +02:00
parent ab2e682e1e
commit f4a2d64497
7 changed files with 8 additions and 2013 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,379 +0,0 @@
/************************************************************************
**
** @file dialogpatternxmledit.h
** @author Patrick Proy <patrick(at)proy.org>
** @date 14 5, 2014
**
** @brief Include file for the XML editor dialog
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2013-2015 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Valentina is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#ifndef DIALOGPATTERNXMLEDIT_H
#define DIALOGPATTERNXMLEDIT_H
#include <QDialog>
#include <QStandardItemModel>
#include "../xml/vpattern.h"
//********************************************************************************************
/**
* @brief The vXMLTreeElement class : node/attribute of xml pattern. Used by vXMLTreeView
*
*/
#define BACKGROUND_COLOR_ATTRIBUTE QBrush(Qt::GlobalColor::cyan)
#define BACKGROUND_COLOR_INACTIVE_NODE QBrush(Qt::GlobalColor::gray)
class VXMLTreeElement : public QStandardItem
{
public:
/**
* @brief vXMLTreeElement
* @param name : display name
* @param nodetype : node type (node, attribute, root)
* @param source : the source dom node
*/
VXMLTreeElement (QString name, short int nodetype, QDomNode source, bool editor);
VXMLTreeElement (QString name, int nodetype);
~VXMLTreeElement ();
static const short int TypeNode;
static const short int TypeAttr;
static const short int TypeRoot;
/**
* @brief setNodeValue : set value of node (content or attribute)
* @param value : the value
*/
void SetTreeNodeValue(QString value);
/**
* @brief displayText : text to display
* @return text to display
*/
QString DisplayText();
/**
* @brief getDocNode
* @return current document node
*/
QDomNode GetDocNode();
/**
* @brief SetDocNode set tree element DomNode
*/
inline void SetDocNode(QDomNode node)
{
this->DocNode=node;
}
inline void SetAddedNode(bool state) {this->addedNode=state;}
inline bool GetAddedNode() {return this->addedNode;}
QString GettreeNodeName();
QString GettreeNodeValue();
/**
* @brief GettreeNodeValueSet check if value has been set
* @return true if value is set
*/
bool GettreeNodeValueSet();
void SetTreeNodeName(QString value);
/**
* @brief getelementType
* @return elementType value
*/
short int GetelementType();
bool IsSelectable();
void SetSetlectable(bool value);
inline void SetFatherElement(VXMLTreeElement* parent)
{
this->parentnode=parent;
}
inline VXMLTreeElement* GetFatherElement()
{
return this->parentnode;
}
private:
/**
* @brief DocNode : link to current document node
*/
QDomNode DocNode;
/**
* @brief parentnode parent node of this element. If null then the DocNode must be valid
*/
VXMLTreeElement* parentnode;
/**
* @brief addedNode : true if node is added by editor (implies empty DocNode)
*/
bool addedNode;
/**
* @brief type : element type (node, attribute, text value of node)
*/
short int elementType;
/**
* @brief nodeValue : Attribute or node value
*/
QString treeNodeValue;
/**
* @brief treeNodeValueSet : true if value has been set
*/
bool treeNodeValueSet;
/**
* @brief nodeValue : Attribute or node value
*/
QString treeNodeName;
/**
* @brief selectable : can item be selected to be changed (ex : false if father deleted).
*/
bool selectable;
Q_DISABLE_COPY(VXMLTreeElement)
};
inline bool VXMLTreeElement::IsSelectable()
{
return this->selectable;
}
inline void VXMLTreeElement::SetSetlectable(bool value)
{
this->selectable=value;
}
inline short int VXMLTreeElement::GetelementType()
{
return this->elementType;
}
inline QDomNode VXMLTreeElement::GetDocNode()
{
return this->DocNode;
}
inline QString VXMLTreeElement::GettreeNodeName()
{
return this->treeNodeName;
}
inline bool VXMLTreeElement::GettreeNodeValueSet()
{
return this->treeNodeValueSet;
}
//********************************************************************************************
/**
* @brief The vXMLTreeView class : container to display/edit xml pattern
*/
class VXMLTreeView : public QStandardItemModel
{
public:
explicit VXMLTreeView (QObject *parent = 0);
void appendchain(VXMLTreeElement* elmt);
/**
* @brief The TreeElement struct : chained list of vXMLTreeElement
*/
typedef struct TreeElementchain
{
VXMLTreeElement* elmt;
TreeElementchain* next;
} TreeElementchain;
TreeElementchain * getCurrent();
void SetCurrent(TreeElementchain * value);
TreeElementchain * GetLast();
TreeElementchain * GetItems();
/**
* @brief clearTree : clear tree elements and listed items.
*/
void ClearTree();
~VXMLTreeView ();
private:
Q_DISABLE_COPY(VXMLTreeView)
/**
* @brief items : root of chained list of vXMLTreeElement
*/
TreeElementchain * items;
/**
* @brief current : used to parse in iteration.
*/
TreeElementchain * current;
/**
* @brief last : used to parse in iteration.
*/
TreeElementchain * last;
};
inline VXMLTreeView::TreeElementchain * VXMLTreeView::getCurrent()
{
return this->current;
}
inline void VXMLTreeView::SetCurrent(VXMLTreeView::TreeElementchain * value)
{
this->current=value;
}
inline VXMLTreeView::TreeElementchain * VXMLTreeView::GetLast()
{
return this->last;
}
inline VXMLTreeView::TreeElementchain * VXMLTreeView::GetItems()
{
return this->items;
}
//********************************************************************************************
namespace Ui
{
class DialogPatternXmlEdit;
}
/**
* @brief The DialogPatternXmlEdit class : ui dialog for XML editing of pattern
*/
class DialogPatternXmlEdit : public QDialog
{
Q_OBJECT
public:
explicit DialogPatternXmlEdit(QWidget *parent = 0, VPattern *xmldoc = 0);
~DialogPatternXmlEdit();
/**
* @brief clear_edit_data : clear input boxes and disables buttons.
*/
void ClearEditData();
void NameTextEdited(QString newtext);
void ValueTextEdited(QString newtext);
void ButtonSetClicked();
void ButtonCancelClicked();
void ButtonDeleteAttributeClicked();
void ButtonAddSonClicked();
void ButtonAddAttributeClicked();
void ButtonApplyChangesClicked();
void ButtonUndoLastChange();
void ButtonDeleteNode();
// Stack of changes definition
typedef struct ChangesStackElement
{
short int type;
VXMLTreeElement *element;
QString *newText;
QString *oldText;
bool changedText;
QString *newValue;
QString *oldValue;
bool changedValue;
ChangesStackElement* next;
} ChangesStackElement;
// Change stack functions
ChangesStackElement* CreateStackElement(short int typechange);
void RemoveChangeStackElement(ChangesStackElement* elmt);
void ClearStack();
bool treeChange;
VXMLTreeElement* currentNodeEdited;
short int currentNodeEditedStatus;
ChangesStackElement* currentNodeEditedStack;
/**
* @brief UndoChange : undo change in change stack element
* @param current : change to undo
* @return true if undo has been done, false on error
*/
bool UndoChange(ChangesStackElement* current);
/**
* @brief DeleteNodeAndSons : delete node and all it's attribute and sons below
* @param currentNode : node to delete
* @param onlydeactivate : if true, dont delete just deactivate sons and attributes
* @return false if changes couldn't be done
*/
bool DeleteNodeAndSons(VXMLTreeElement *currentNode, bool onlydeactivate);
/**
* @brief ApplyAttributeChange change or add attribute for node
* @param domElement : node containing attribute
* @return true on success
*/
bool ApplyAttributeChange(QDomNode domElement, QString name, QString value);
/**
* @brief ApplyNodeChange Change name or text content of node
* @param domElement node
* @param value text content of node
* @return true on success
*/
bool ApplyNodeChange(QDomNode domElement, QString name, QString value);
/**
* @brief ApplyNodeAdd add node as child of domElement and set DocNode of treeElement
* @param treeElement the XMLTreeElement of added node
* @return true on success
*/
bool ApplyNodeAdd(QDomNode domElement, VXMLTreeElement* treeElement, QString name, QString value);
/**
* @brief ApplyAttributeDelete delete attribute for node
* @param name attribute name
* @return true on success
*/
bool ApplyAttributeDelete(QDomNode domElement, QString name);
/**
* @brief ApplyNodeDelete delete node domElement
* @return true on success
*/
bool ApplyNodeDelete(QDomNode domElement);
/**
* @brief CheckChanges Check if changes made are OK
* @param message error message returned if false
* @param testRoot root of DOM to test
* @return true if validated, false otherwise
*/
bool CheckChanges(QString &message, QDomNode testRoot);
private slots:
void BaseSelectionChanged(int value);
void ElementClicked ( const QModelIndex & index );
private:
Q_DISABLE_COPY(DialogPatternXmlEdit)
Ui::DialogPatternXmlEdit *ui;
VPattern *doc;
QDomElement root;
QStandardItem *rootNode;
//typedef struct rootbases { vXMLTreeElement * root; QString name; } rootbases;
VXMLTreeElement ** rootBases;
qint16 rootBasesNum;
void ReadNodes(QDomNode dNode, VXMLTreeElement* root, VXMLTreeView *xmlmodel, bool refresh);
VXMLTreeView* xmlmodel;
// Stack of changes
static const short int ChangeTypeDelete;
static const short int ChangeTypeAdd;
static const short int ChangeTypeModify;
// Stack of changes
ChangesStackElement* changeStackRoot;
ChangesStackElement* changeStackLast;
};
#endif // DIALOGPATTERNXMLEDIT_H

View File

@ -1,373 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DialogPatternXmlEdit</class>
<widget class="QDialog" name="DialogPatternXmlEdit">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>664</width>
<height>459</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>1</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>300</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<property name="windowTitle">
<string>XML Editor</string>
</property>
<property name="windowIcon">
<iconset resource="../../../libs/vmisc/share/resources/icon.qrc">
<normaloff>:/icon/64x64/icon64x64.png</normaloff>:/icon/64x64/icon64x64.png</iconset>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,0">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="3,1">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTreeView" name="treeView_main">
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="headerHidden">
<bool>true</bool>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout" columnstretch="0" columnminimumwidth="0">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<property name="leftMargin">
<number>9</number>
</property>
<item row="9" column="0">
<widget class="QLabel" name="label_Value">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Value:</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLineEdit" name="lineEdit_Value">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLineEdit" name="lineEdit_Name">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_Name">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Name:</string>
</property>
</widget>
</item>
<item row="5" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item row="0" column="1">
<widget class="QLabel" name="label_type_value">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&lt;No selection&gt;</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_type_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Type:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pushButton_Add_attribute">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Add attribute</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton_Add_son">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Add son</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="11" column="0">
<layout class="QFormLayout" name="formLayout">
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QPushButton" name="pushButton_Remove_attribute">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Remove attribute</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="pushButton_Remove_Node">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Remove node</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pushButton_Set_Values">
<property name="enabled">
<bool>false</bool>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Set</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton_Cancel_Values">
<property name="enabled">
<bool>false</bool>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="pushButton_Apply_Changes">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Apply changes</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="pushButton_Undo_Last_Change">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Undo last</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="checkBox_Apply_Changes">
<property name="text">
<string>Immediately apply</string>
</property>
<property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_Base_Selection">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Base selection</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QComboBox" name="comboBox_Base_Selection"/>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>5</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../../../libs/vmisc/share/resources/icon.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>DialogPatternXmlEdit</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -35,6 +35,5 @@
#include "dialogpatternproperties.h" #include "dialogpatternproperties.h"
#include "dialognewpattern.h" #include "dialognewpattern.h"
#include "dialogaboutapp.h" #include "dialogaboutapp.h"
#include "dialogpatternxmledit.h"
#endif // DIALOGS_H #endif // DIALOGS_H

View File

@ -10,7 +10,6 @@ HEADERS += \
$$PWD/dialogpatternproperties.h \ $$PWD/dialogpatternproperties.h \
$$PWD/dialognewpattern.h \ $$PWD/dialognewpattern.h \
$$PWD/dialogaboutapp.h \ $$PWD/dialogaboutapp.h \
$$PWD/dialogpatternxmledit.h \
$$PWD/configpages/configurationpage.h \ $$PWD/configpages/configurationpage.h \
$$PWD/configpages/patternpage.h \ $$PWD/configpages/patternpage.h \
$$PWD/configpages/communitypage.h \ $$PWD/configpages/communitypage.h \
@ -28,7 +27,6 @@ SOURCES += \
$$PWD/dialogpatternproperties.cpp \ $$PWD/dialogpatternproperties.cpp \
$$PWD/dialognewpattern.cpp \ $$PWD/dialognewpattern.cpp \
$$PWD/dialogaboutapp.cpp \ $$PWD/dialogaboutapp.cpp \
$$PWD/dialogpatternxmledit.cpp \
$$PWD/configpages/configurationpage.cpp \ $$PWD/configpages/configurationpage.cpp \
$$PWD/configpages/patternpage.cpp \ $$PWD/configpages/patternpage.cpp \
$$PWD/configpages/communitypage.cpp \ $$PWD/configpages/communitypage.cpp \
@ -45,7 +43,6 @@ FORMS += \
$$PWD/dialogpatternproperties.ui \ $$PWD/dialogpatternproperties.ui \
$$PWD/dialognewpattern.ui \ $$PWD/dialognewpattern.ui \
$$PWD/dialogaboutapp.ui \ $$PWD/dialogaboutapp.ui \
$$PWD/dialogpatternxmledit.ui \
$$PWD/dialoglayoutsettings.ui \ $$PWD/dialoglayoutsettings.ui \
$$PWD/dialoglayoutprogress.ui \ $$PWD/dialoglayoutprogress.ui \
$$PWD/dialogsavelayout.ui \ $$PWD/dialogsavelayout.ui \

View File

@ -2499,7 +2499,6 @@ void MainWindow::Clear()
ui->actionZoomOriginal->setEnabled(false); ui->actionZoomOriginal->setEnabled(false);
ui->actionHistory->setEnabled(false); ui->actionHistory->setEnabled(false);
ui->actionTable->setEnabled(false); ui->actionTable->setEnabled(false);
ui->actionEdit_pattern_code->setEnabled(false);
ui->actionLast_tool->setEnabled(false); ui->actionLast_tool->setEnabled(false);
ui->actionShowCurveDetails->setEnabled(false); ui->actionShowCurveDetails->setEnabled(false);
ui->actionLoadIndividual->setEnabled(false); ui->actionLoadIndividual->setEnabled(false);
@ -2735,7 +2734,6 @@ void MainWindow::SetEnableWidgets(bool enable)
ui->actionSave->setEnabled(enable && not patternReadOnly); ui->actionSave->setEnabled(enable && not patternReadOnly);
ui->actionSaveAs->setEnabled(enable); ui->actionSaveAs->setEnabled(enable);
ui->actionPattern_properties->setEnabled(enable && designStage); ui->actionPattern_properties->setEnabled(enable && designStage);
ui->actionEdit_pattern_code->setEnabled(enable && designStage);
ui->actionZoomIn->setEnabled(enable); ui->actionZoomIn->setEnabled(enable);
ui->actionZoomOut->setEnabled(enable); ui->actionZoomOut->setEnabled(enable);
ui->actionArrowTool->setEnabled(enable && designStage); ui->actionArrowTool->setEnabled(enable && designStage);
@ -3674,13 +3672,6 @@ void MainWindow::CreateActions()
}); });
ui->actionPattern_properties->setEnabled(false); ui->actionPattern_properties->setEnabled(false);
connect(ui->actionEdit_pattern_code, &QAction::triggered, RECEIVER(this)[this]()
{
DialogPatternXmlEdit *pattern = new DialogPatternXmlEdit (this, doc);
pattern->setAttribute(Qt::WA_DeleteOnClose, true);
pattern->show();
});
connect(ui->actionClosePattern, &QAction::triggered, RECEIVER(this)[this]() connect(ui->actionClosePattern, &QAction::triggered, RECEIVER(this)[this]()
{ {
if (MaybeSave()) if (MaybeSave())
@ -3713,7 +3704,6 @@ void MainWindow::CreateActions()
connect(ui->actionSaveAsTiledPDF, &QAction::triggered, this, &MainWindow::SaveAsTiledPDF); connect(ui->actionSaveAsTiledPDF, &QAction::triggered, this, &MainWindow::SaveAsTiledPDF);
connect(ui->actionPrint, &QAction::triggered, this, &MainWindow::PrintOrigin); connect(ui->actionPrint, &QAction::triggered, this, &MainWindow::PrintOrigin);
connect(ui->actionPrintTiled, &QAction::triggered, this, &MainWindow::PrintTiled); connect(ui->actionPrintTiled, &QAction::triggered, this, &MainWindow::PrintTiled);
ui->actionEdit_pattern_code->setEnabled(false);
//Actions for recent files loaded by a main window application. //Actions for recent files loaded by a main window application.
for (int i = 0; i < MaxRecentFiles; ++i) for (int i = 0; i < MaxRecentFiles; ++i)

View File

@ -55,7 +55,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>117</width> <width>100</width>
<height>358</height> <height>358</height>
</rect> </rect>
</property> </property>
@ -427,7 +427,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>130</width> <width>100</width>
<height>110</height> <height>110</height>
</rect> </rect>
</property> </property>
@ -536,7 +536,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>130</width> <width>100</width>
<height>248</height> <height>248</height>
</rect> </rect>
</property> </property>
@ -798,7 +798,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>130</width> <width>100</width>
<height>248</height> <height>248</height>
</rect> </rect>
</property> </property>
@ -1063,7 +1063,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>130</width> <width>100</width>
<height>58</height> <height>58</height>
</rect> </rect>
</property> </property>
@ -1143,8 +1143,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>130</width> <width>100</width>
<height>326</height> <height>196</height>
</rect> </rect>
</property> </property>
<attribute name="icon"> <attribute name="icon">
@ -1321,7 +1321,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>130</width> <width>100</width>
<height>104</height> <height>104</height>
</rect> </rect>
</property> </property>
@ -1585,7 +1585,6 @@
<addaction name="actionLast_tool"/> <addaction name="actionLast_tool"/>
<addaction name="actionShowCurveDetails"/> <addaction name="actionShowCurveDetails"/>
<addaction name="actionPattern_properties"/> <addaction name="actionPattern_properties"/>
<addaction name="actionEdit_pattern_code"/>
</widget> </widget>
<widget class="QMenu" name="menuMeasurements"> <widget class="QMenu" name="menuMeasurements">
<property name="title"> <property name="title">
@ -2212,17 +2211,6 @@
<enum>QAction::NoRole</enum> <enum>QAction::NoRole</enum>
</property> </property>
</action> </action>
<action name="actionEdit_pattern_code">
<property name="text">
<string>Edit pattern XML code</string>
</property>
<property name="shortcut">
<string notr="true"/>
</property>
<property name="menuRole">
<enum>QAction::NoRole</enum>
</property>
</action>
<action name="actionZoomOriginal"> <action name="actionZoomOriginal">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>