Fix typo.
--HG-- branch : develop
This commit is contained in:
parent
bdaba68a7e
commit
c522651b6b
|
@ -30,8 +30,8 @@
|
|||
#include "ui_vwidgetgroups.h"
|
||||
#include "../vtools/dialogs/tools/dialoggroup.h"
|
||||
#include "../vtools/undocommands/delgroup.h"
|
||||
#include "../vtools/undocommands/changegroupvisivility.h"
|
||||
#include "../vtools/undocommands/changemultiplegroupsvisivility.h"
|
||||
#include "../vtools/undocommands/changegroupvisibility.h"
|
||||
#include "../vtools/undocommands/changemultiplegroupsvisibility.h"
|
||||
#include "../vpatterndb/vcontainer.h"
|
||||
|
||||
#include <QMenu>
|
||||
|
@ -61,10 +61,10 @@ VWidgetGroups::~VWidgetGroups()
|
|||
delete ui;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
void VWidgetGroups::SetGroupVisivility(vidtype id, bool visible) const
|
||||
void VWidgetGroups::SetGroupVisibility(vidtype id, bool visible) const
|
||||
{
|
||||
ChangeGroupVisivility *changeGroup = new ChangeGroupVisivility(doc, id, visible);
|
||||
connect(changeGroup, &ChangeGroupVisivility::UpdateGroup, this, [this](vidtype id, bool visible)
|
||||
ChangeGroupVisibility *changeGroup = new ChangeGroupVisibility(doc, id, visible);
|
||||
connect(changeGroup, &ChangeGroupVisibility::UpdateGroup, this, [this](vidtype id, bool visible)
|
||||
{
|
||||
int row = GroupRow(id);
|
||||
if (row == -1)
|
||||
|
@ -85,8 +85,8 @@ void VWidgetGroups::SetGroupVisivility(vidtype id, bool visible) const
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VWidgetGroups::SetMultipleGroupsVisibility(const QVector<vidtype> &groups, bool visible) const
|
||||
{
|
||||
auto *changeGroups = new ChangeMultipleGroupsVisivility(doc, groups, visible);
|
||||
connect(changeGroups, &ChangeMultipleGroupsVisivility::UpdateMultipleGroups, this,
|
||||
auto *changeGroups = new ChangeMultipleGroupsVisibility(doc, groups, visible);
|
||||
connect(changeGroups, &ChangeMultipleGroupsVisibility::UpdateMultipleGroups, this,
|
||||
[this](const QMap<vidtype, bool> &groups)
|
||||
{
|
||||
QMap<vidtype, bool>::const_iterator i = groups.constBegin();
|
||||
|
@ -138,7 +138,7 @@ void VWidgetGroups::GroupVisibilityChanged(int row, int column)
|
|||
}
|
||||
QTableWidgetItem *item = ui->tableWidget->item(row, column);
|
||||
const quint32 id = item->data(Qt::UserRole).toUInt();
|
||||
SetGroupVisivility(id, not doc->GetGroupVisivility(id));
|
||||
SetGroupVisibility(id, not doc->GetGroupVisibility(id));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -173,7 +173,7 @@ void VWidgetGroups::CtxMenu(const QPoint &pos)
|
|||
for (int r = 0; r < ui->tableWidget->rowCount(); ++r)
|
||||
{
|
||||
QTableWidgetItem *rowItem = ui->tableWidget->item(r, 0);
|
||||
if (rowItem and visibility != doc->GetGroupVisivility(rowItem->data(Qt::UserRole).toUInt()))
|
||||
if (rowItem and visibility != doc->GetGroupVisibility(rowItem->data(Qt::UserRole).toUInt()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ void VWidgetGroups::CtxMenu(const QPoint &pos)
|
|||
};
|
||||
|
||||
QScopedPointer<QMenu> menu(new QMenu());
|
||||
QAction *triggerVisibilityMenu = doc->GetGroupVisivility(id) ?
|
||||
QAction *triggerVisibilityMenu = doc->GetGroupVisibility(id) ?
|
||||
menu->addAction(QIcon(QStringLiteral("://icon/16x16/closed_eye.png")), tr("Hide")) :
|
||||
menu->addAction(QIcon(QStringLiteral("://icon/16x16/open_eye.png")), tr("Show"));
|
||||
|
||||
|
@ -199,7 +199,7 @@ void VWidgetGroups::CtxMenu(const QPoint &pos)
|
|||
|
||||
if (selectedAction == triggerVisibilityMenu)
|
||||
{
|
||||
SetGroupVisivility(id, not doc->GetGroupVisivility(id));
|
||||
SetGroupVisibility(id, not doc->GetGroupVisibility(id));
|
||||
}
|
||||
else if (selectedAction == actionRename)
|
||||
{
|
||||
|
@ -235,7 +235,7 @@ void VWidgetGroups::CtxMenu(const QPoint &pos)
|
|||
{
|
||||
QTableWidgetItem *rowItem = ui->tableWidget->item(r, 0);
|
||||
quint32 i = rowItem->data(Qt::UserRole).toUInt();
|
||||
if (doc->GetGroupVisivility(i))
|
||||
if (doc->GetGroupVisibility(i))
|
||||
{
|
||||
groups.append(i);
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ void VWidgetGroups::CtxMenu(const QPoint &pos)
|
|||
{
|
||||
QTableWidgetItem *rowItem = ui->tableWidget->item(r, 0);
|
||||
quint32 i = rowItem->data(Qt::UserRole).toUInt();
|
||||
if (not doc->GetGroupVisivility(i))
|
||||
if (not doc->GetGroupVisibility(i))
|
||||
{
|
||||
groups.append(i);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ private:
|
|||
VAbstractPattern *doc;
|
||||
|
||||
void FillTable(const QMap<quint32, QPair<QString, bool> > &groups);
|
||||
void SetGroupVisivility(vidtype id, bool visible) const;
|
||||
void SetGroupVisibility(vidtype id, bool visible) const;
|
||||
void SetMultipleGroupsVisibility(const QVector<vidtype> &groups, bool visible) const;
|
||||
|
||||
int GroupRow(vidtype id) const;
|
||||
|
|
|
@ -2699,7 +2699,7 @@ bool VAbstractPattern::GroupIsEmpty(quint32 id)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
bool VAbstractPattern::GetGroupVisivility(quint32 id)
|
||||
bool VAbstractPattern::GetGroupVisibility(quint32 id)
|
||||
{
|
||||
QDomElement group = elementById(id, TagGroup);
|
||||
if (group.isElement())
|
||||
|
|
|
@ -201,7 +201,7 @@ public:
|
|||
QDomElement AddItemToGroup(quint32 toolId, quint32 objectId, quint32 groupId);
|
||||
QDomElement RemoveItemFromGroup(quint32 toolId, quint32 objectId, quint32 groupId);
|
||||
bool GroupIsEmpty(quint32 id);
|
||||
bool GetGroupVisivility(quint32 id);
|
||||
bool GetGroupVisibility(quint32 id);
|
||||
|
||||
QString PieceDrawName(quint32 id);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file changegroupvisivility.cpp
|
||||
** @file changegroupVisibility.cpp
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 14 7, 2019
|
||||
**
|
||||
|
@ -25,12 +25,12 @@
|
|||
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
#include "changegroupvisivility.h"
|
||||
#include "changegroupvisibility.h"
|
||||
#include "../vmisc/vabstractapplication.h"
|
||||
#include "../vwidgets/vmaingraphicsview.h"
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
ChangeGroupVisivility::ChangeGroupVisivility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent)
|
||||
ChangeGroupVisibility::ChangeGroupVisibility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent)
|
||||
: VUndoCommand(QDomElement(), doc, parent),
|
||||
m_newVisibility(visible),
|
||||
m_nameActivDraw(doc->GetNameActivPP())
|
||||
|
@ -49,11 +49,11 @@ ChangeGroupVisivility::ChangeGroupVisivility(VAbstractPattern *doc, vidtype id,
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
ChangeGroupVisivility::~ChangeGroupVisivility()
|
||||
ChangeGroupVisibility::~ChangeGroupVisibility()
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void ChangeGroupVisivility::undo()
|
||||
void ChangeGroupVisibility::undo()
|
||||
{
|
||||
qCDebug(vUndo, "Undo.");
|
||||
|
||||
|
@ -61,7 +61,7 @@ void ChangeGroupVisivility::undo()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void ChangeGroupVisivility::redo()
|
||||
void ChangeGroupVisibility::redo()
|
||||
{
|
||||
qCDebug(vUndo, "Redo.");
|
||||
|
||||
|
@ -69,7 +69,7 @@ void ChangeGroupVisivility::redo()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void ChangeGroupVisivility::Do(bool visible)
|
||||
void ChangeGroupVisibility::Do(bool visible)
|
||||
{
|
||||
doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file changegroupvisivility.h
|
||||
** @file changegroupVisibility.h
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 14 7, 2019
|
||||
**
|
||||
|
@ -25,17 +25,17 @@
|
|||
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
#ifndef CHANGEGROUPVISIVILITY_H
|
||||
#define CHANGEGROUPVISIVILITY_H
|
||||
#ifndef CHANGEGROUPVISIBILITY_H
|
||||
#define CHANGEGROUPVISIBILITY_H
|
||||
|
||||
#include "vundocommand.h"
|
||||
|
||||
class ChangeGroupVisivility : public VUndoCommand
|
||||
class ChangeGroupVisibility : public VUndoCommand
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ChangeGroupVisivility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent = nullptr);
|
||||
virtual ~ChangeGroupVisivility();
|
||||
ChangeGroupVisibility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent = nullptr);
|
||||
virtual ~ChangeGroupVisibility();
|
||||
virtual void undo() override;
|
||||
virtual void redo() override;
|
||||
|
||||
|
@ -43,7 +43,7 @@ signals:
|
|||
void UpdateGroup(vidtype id, bool visible);
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(ChangeGroupVisivility)
|
||||
Q_DISABLE_COPY(ChangeGroupVisibility)
|
||||
|
||||
bool m_oldVisibility{true};
|
||||
bool m_newVisibility{true};
|
||||
|
@ -52,4 +52,4 @@ private:
|
|||
void Do(bool visible);
|
||||
};
|
||||
|
||||
#endif // CHANGEGROUPVISIVILITY_H
|
||||
#endif // CHANGEGROUPVISIBILITY_H
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file changemultiplegroupsvisivility.cpp
|
||||
** @file changemultiplegroupsVisibility.cpp
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 15 7, 2019
|
||||
**
|
||||
|
@ -25,12 +25,12 @@
|
|||
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
#include "changemultiplegroupsvisivility.h"
|
||||
#include "changemultiplegroupsvisibility.h"
|
||||
#include "../vmisc/vabstractapplication.h"
|
||||
#include "../vwidgets/vmaingraphicsview.h"
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
ChangeMultipleGroupsVisivility::ChangeMultipleGroupsVisivility(VAbstractPattern *doc, const QVector<vidtype> &groups,
|
||||
ChangeMultipleGroupsVisibility::ChangeMultipleGroupsVisibility(VAbstractPattern *doc, const QVector<vidtype> &groups,
|
||||
bool visible, QUndoCommand *parent)
|
||||
: VUndoCommand(QDomElement(), doc, parent),
|
||||
m_groups(groups),
|
||||
|
@ -55,7 +55,7 @@ ChangeMultipleGroupsVisivility::ChangeMultipleGroupsVisivility(VAbstractPattern
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void ChangeMultipleGroupsVisivility::undo()
|
||||
void ChangeMultipleGroupsVisibility::undo()
|
||||
{
|
||||
qCDebug(vUndo, "Undo.");
|
||||
|
||||
|
@ -94,9 +94,9 @@ void ChangeMultipleGroupsVisivility::undo()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void ChangeMultipleGroupsVisivility::redo()
|
||||
void ChangeMultipleGroupsVisibility::redo()
|
||||
{
|
||||
qCDebug(vUndo, "ChangeMultipleGroupsVisivility::redo");
|
||||
qCDebug(vUndo, "ChangeMultipleGroupsVisibility::redo");
|
||||
|
||||
doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file changemultiplegroupsvisivility.h
|
||||
** @file changemultiplegroupsVisibility.h
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 15 7, 2019
|
||||
**
|
||||
|
@ -25,18 +25,18 @@
|
|||
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
#ifndef CHANGEMULTIPLEGROUPSVISIVILITY_H
|
||||
#define CHANGEMULTIPLEGROUPSVISIVILITY_H
|
||||
#ifndef CHANGEMULTIPLEGROUPSVISIBILITY_H
|
||||
#define CHANGEMULTIPLEGROUPSVISIBILITY_H
|
||||
|
||||
#include "vundocommand.h"
|
||||
|
||||
class ChangeMultipleGroupsVisivility : public VUndoCommand
|
||||
class ChangeMultipleGroupsVisibility : public VUndoCommand
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ChangeMultipleGroupsVisivility(VAbstractPattern *doc, const QVector<vidtype> &groups, bool visible,
|
||||
ChangeMultipleGroupsVisibility(VAbstractPattern *doc, const QVector<vidtype> &groups, bool visible,
|
||||
QUndoCommand *parent = nullptr);
|
||||
virtual ~ChangeMultipleGroupsVisivility() =default;
|
||||
virtual ~ChangeMultipleGroupsVisibility() =default;
|
||||
virtual void undo() override;
|
||||
virtual void redo() override;
|
||||
|
||||
|
@ -44,7 +44,7 @@ signals:
|
|||
void UpdateMultipleGroups(const QMap<vidtype, bool> &groups);
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(ChangeMultipleGroupsVisivility)
|
||||
Q_DISABLE_COPY(ChangeMultipleGroupsVisibility)
|
||||
|
||||
QVector<vidtype> m_groups;
|
||||
bool m_newVisibility{true};
|
||||
|
@ -52,4 +52,4 @@ private:
|
|||
const QString m_nameActivDraw{};
|
||||
};
|
||||
|
||||
#endif // CHANGEMULTIPLEGROUPSVISIVILITY_H
|
||||
#endif // CHANGEMULTIPLEGROUPSVISIBILITY_H
|
|
@ -4,8 +4,8 @@
|
|||
HEADERS += \
|
||||
$$PWD/addtocalc.h \
|
||||
$$PWD/addpatternpiece.h \
|
||||
$$PWD/changegroupvisivility.h \
|
||||
$$PWD/changemultiplegroupsvisivility.h \
|
||||
$$PWD/changegroupvisibility.h \
|
||||
$$PWD/changemultiplegroupsvisibility.h \
|
||||
$$PWD/movespoint.h \
|
||||
$$PWD/movespline.h \
|
||||
$$PWD/movesplinepath.h \
|
||||
|
@ -36,8 +36,8 @@ HEADERS += \
|
|||
SOURCES += \
|
||||
$$PWD/addtocalc.cpp \
|
||||
$$PWD/addpatternpiece.cpp \
|
||||
$$PWD/changegroupvisivility.cpp \
|
||||
$$PWD/changemultiplegroupsvisivility.cpp \
|
||||
$$PWD/changegroupvisibility.cpp \
|
||||
$$PWD/changemultiplegroupsvisibility.cpp \
|
||||
$$PWD/movespoint.cpp \
|
||||
$$PWD/movespline.cpp \
|
||||
$$PWD/movesplinepath.cpp \
|
||||
|
|
Loading…
Reference in New Issue
Block a user