#include <groups_widget.h>
Public Slots | |
void | updateGroups () |
void | showGroups (QMap< quint32, QString > groups) |
void | showAllGroups () |
void | hideAllGroups () |
void | lockAllGroups () |
void | unlockAllGroups () |
void | addGroupToList () |
void | deleteGroupFromList () |
void | editGroup () |
quint32 | getGroupId () |
QString | getCurrentGroupName () |
void | setAddGroupEnabled (bool value) |
void | clear () |
Public Member Functions | |
GroupsWidget (VContainer *data, VAbstractPattern *doc, QWidget *parent=nullptr) | |
virtual | ~GroupsWidget () |
Private Slots | |
void | groupVisibilityChanged (int row, int column) |
void | groupLockChanged (int row, int column) |
void | renameGroup (int row, int column) |
void | groupContextMenu (const QPoint &pos) |
void | draftBlockHasGroups (bool value) |
Private Member Functions | |
void | fillTable (const QMap< quint32, GroupAttributes > &groups) |
void | fillGroupItemList () |
void | addGroupItem (const quint32 &toolId, const quint32 &objId, const Tool &tooltype) |
addGroupItem Add group item with description in listwidget. More... | |
void | groupItemContextMenu (const QPoint &pos) |
ContextMenu show context menu for group objects. More... | |
void | itemDoubleClicked (QListWidgetItem *item) |
Handle double clicking of list item. More... | |
void | zoomToObject (QSharedPointer< VPointF > point) |
zoomToObject zoom to selected (point) object. More... | |
void | setGroupVisibility (QTableWidgetItem *item, const quint32 &groupId, const bool &visible) |
QString | getPointName (quint32 pointId) |
getPointName get the name of the point by tool id. More... | |
quint32 | attrUInt (const QDomElement &domElement, const QString &name) |
attrUInt get unsigned integer attribute. More... | |
QString | getObjName (quint32 id) |
getObjName get the name of the graphics object. More... | |
void | splitterMoved (int pos, int index) |
splitterMoved Save splitter state whenever it's moved. More... | |
void | headerClicked (int index) |
headerClicked Sort state whenever header section clicked. More... | |
Private Attributes | |
Ui::GroupsWidget * | ui |
VAbstractPattern * | m_doc |
VContainer * | m_data |
bool | m_patternHasGroups |
quint32 | m_currentGroupId |
Definition at line 72 of file groups_widget.h.
|
explicit |
Definition at line 104 of file groups_widget.cpp.
References addGroupToList(), deleteGroupFromList(), draftBlockHasGroups(), editGroup(), fillGroupItemList(), groupContextMenu(), groupItemContextMenu(), groupLockChanged(), groupVisibilityChanged(), headerClicked(), hideAllGroups(), itemDoubleClicked(), lockAllGroups(), VAbstractPattern::patternHasGroups(), renameGroup(), showAllGroups(), splitterMoved(), and unlockAllGroups().
|
virtual |
Definition at line 148 of file groups_widget.cpp.
References ui.
|
private |
addGroupItem Add group item with description in listwidget.
toolID | ToolID of item to add to list. |
objId | ObjectID of item to add to list. |
tooltype | Tooltype of item to add to list. |
Definition at line 756 of file groups_widget.cpp.
References AbstractSpline, AlongLine, AnchorPoint, Arc, ArcIntersectAxis, ArcWithLength, Arrow, AttrArc, AttrDartP1, AttrDartP2, AttrDartP3, AttrFirstPoint, AttrSecondPoint, VToolCutSpline::AttrSpline, VToolCutSplinePath::AttrSplinePath, BasePoint, Bisector, CubicBezier, CubicBezierPath, CurveIntersectAxis, Cut, CutArc, CutSpline, CutSplinePath, DoublePoint, EllipticalArc, EndLine, VExceptionBadId::ErrorMessage(), Group, Height, InsertNodes, InternalPath, LAST_ONE_DO_NOT_USE, Line, LineIntersect, LineIntersectAxis, LinePoint, Midpoint, MirrorByAxis, MirrorByLine, Move, NodeArc, NodeElArc, NodePoint, NodeSpline, NodeSplinePath, Normal, NULL_ID, Piece, PointFromArcAndTangent, PointFromCircleAndTangent, PointOfContact, PointOfIntersection, PointOfIntersectionArcs, PointOfIntersectionCircles, PointOfIntersectionCurves, Rotation, SCASSERT, ShoulderPoint, SinglePoint, Spline, SplinePath, splPath, Triangle, TrueDarts, and Union.
Referenced by fillGroupItemList().
|
slot |
Definition at line 303 of file groups_widget.cpp.
References VAbstractPattern::createGroup(), VContainer::getNextId(), VAbstractPattern::groupNameExists(), m_doc, NULL_ID, qApp, SCASSERT, updateGroups(), and AddGroup::updateGroups().
Referenced by MainWindow::addGroupToList(), and GroupsWidget().
|
private |
attrUInt get unsigned integer attribute.
domElement | Dom Element. |
name | Name of Attribute. |
Definition at line 1079 of file groups_widget.cpp.
References VDomDocument::GetParametrUInt(), and m_doc.
Referenced by itemDoubleClicked().
|
slot |
Definition at line 685 of file groups_widget.cpp.
References ui.
Referenced by MainWindow::CleanLayout().
|
slot |
Definition at line 359 of file groups_widget.cpp.
References getGroupId(), VAbstractPattern::getGroupLock(), m_doc, qApp, ui, updateGroups(), and DelGroup::updateGroups().
Referenced by MainWindow::deleteGroupFromList(), and GroupsWidget().
|
privateslot |
Definition at line 667 of file groups_widget.cpp.
References m_patternHasGroups, and ui.
Referenced by GroupsWidget().
|
slot |
Definition at line 378 of file groups_widget.cpp.
References VAbstractPattern::getGroupColor(), VAbstractPattern::getGroupLineType(), VAbstractPattern::getGroupLineWeight(), VAbstractPattern::getGroupLock(), VAbstractPattern::getGroupName(), VAbstractPattern::groupNameExists(), m_doc, NULL_ID, qApp, VAbstractPattern::setGroupColor(), VAbstractPattern::setGroupLineType(), VAbstractPattern::setGroupLineWeight(), VAbstractPattern::setGroupName(), ui, and updateGroups().
Referenced by MainWindow::editGroup(), and GroupsWidget().
|
private |
Definition at line 718 of file groups_widget.cpp.
References addGroupItem(), getCurrentGroupName(), VAbstractPattern::getGroupByName(), VAbstractPattern::getGroupObjHistory(), m_doc, VAbstractPattern::parseItemElement(), and ui.
Referenced by GroupsWidget(), and updateGroups().
|
private |
Definition at line 587 of file groups_widget.cpp.
References GroupAttributes::color, VAbstractPattern::isGroupEmpty(), GroupAttributes::locked, m_doc, makeHeaderName(), GroupAttributes::name, setGroupVisibility(), ui, and GroupAttributes::visible.
Referenced by updateGroups().
|
slot |
|
slot |
Definition at line 692 of file groups_widget.cpp.
References ui.
Referenced by deleteGroupFromList(), groupItemContextMenu(), and zoomToObject().
|
private |
getObjName get the name of the graphics object.
toolId | Id of the tool the object belongs to. |
Definition at line 1090 of file groups_widget.cpp.
References VException::DetailedInformation(), VExceptionBadId::ErrorMessage(), VContainer::GetGObject(), and m_data.
|
private |
getPointName get the name of the point by tool id.
toolId | Id of the tool the object belongs to. |
Definition at line 1067 of file groups_widget.cpp.
References VContainer::GeometricObject(), and m_data.
|
privateslot |
Definition at line 467 of file groups_widget.cpp.
References VAbstractPattern::getGroupColor(), VAbstractPattern::getGroupLineType(), VAbstractPattern::getGroupLineWeight(), VAbstractPattern::getGroupLock(), VAbstractPattern::getGroupName(), VAbstractPattern::groupNameExists(), m_doc, NULL_ID, qApp, VAbstractPattern::setGroupColor(), VAbstractPattern::setGroupLineType(), VAbstractPattern::setGroupLineWeight(), VAbstractPattern::setGroupName(), ui, updateGroups(), and DelGroup::updateGroups().
Referenced by GroupsWidget().
|
private |
ContextMenu show context menu for group objects.
pos | Mouse position of right click. |
Definition at line 1111 of file groups_widget.cpp.
References VAbstractPattern::addGroupItem(), getGroupId(), VAbstractPattern::getGroupLock(), VAbstractPattern::getGroupsContainingItem(), m_doc, qApp, VAbstractPattern::removeGroupItem(), SCASSERT, ui, updateGroups(), MoveGroupItem::updateGroups(), RemoveGroupItem::updateGroups(), and VAbstractMainWindow::updateGroups().
Referenced by GroupsWidget().
|
privateslot |
Definition at line 169 of file groups_widget.cpp.
References VAbstractPattern::getGroupLock(), m_doc, VAbstractPattern::setGroupLock(), and ui.
Referenced by GroupsWidget().
|
privateslot |
Definition at line 154 of file groups_widget.cpp.
References VAbstractPattern::getGroupLock(), VAbstractPattern::getGroupVisibility(), m_doc, setGroupVisibility(), and ui.
Referenced by GroupsWidget().
|
private |
headerClicked Sort state whenever header section clicked.
index |
Definition at line 1371 of file groups_widget.cpp.
Referenced by GroupsWidget().
|
slot |
Definition at line 250 of file groups_widget.cpp.
References VAbstractPattern::getGroupLock(), m_doc, setGroupVisibility(), and ui.
Referenced by GroupsWidget(), and MainWindow::hideAllGroups().
|
private |
Handle double clicking of list item.
item | selected list widget item. |
Definition at line 1225 of file groups_widget.cpp.
References AllCurves, Arc, AttrFirstPoint, attrUInt(), CubicBezier, CubicBezierPath, Curve, VContainer::DataGObjects(), VDomDocument::elementById(), EllipticalArc, VContainer::GeometricObject(), VContainer::GetGObject(), m_data, m_doc, NULL_ID, Path, Point, Spline, SplinePath, VAbstractPattern::TagLine, Unknown, and zoomToObject().
Referenced by GroupsWidget().
|
slot |
Definition at line 271 of file groups_widget.cpp.
References m_doc, VAbstractPattern::setGroupLock(), and ui.
Referenced by GroupsWidget(), and MainWindow::lockAllGroups().
|
privateslot |
Definition at line 192 of file groups_widget.cpp.
References VAbstractPattern::getGroupLock(), m_doc, VAbstractPattern::setGroupName(), ui, and updateGroups().
Referenced by GroupsWidget().
|
slot |
Definition at line 680 of file groups_widget.cpp.
References ui.
Referenced by MainWindow::SetEnableWidgets().
|
private |
Definition at line 1338 of file groups_widget.cpp.
References m_doc, and VAbstractPattern::setGroupVisibility().
Referenced by fillTable(), groupVisibilityChanged(), hideAllGroups(), showAllGroups(), showGroups(), and zoomToObject().
|
slot |
Definition at line 229 of file groups_widget.cpp.
References VAbstractPattern::getGroupLock(), m_doc, setGroupVisibility(), and ui.
Referenced by GroupsWidget(), and MainWindow::showAllGroups().
|
slot |
Definition at line 208 of file groups_widget.cpp.
References setGroupVisibility(), ui, and updateGroups().
Referenced by zoomToObject(), and MainWindow::zoomToPoint().
|
private |
splitterMoved Save splitter state whenever it's moved.
pos | |
index |
Definition at line 1357 of file groups_widget.cpp.
References ui.
Referenced by GroupsWidget().
|
slot |
Definition at line 287 of file groups_widget.cpp.
References m_doc, VAbstractPattern::setGroupLock(), and ui.
Referenced by GroupsWidget(), and MainWindow::unlockAllGroups().
|
slot |
Definition at line 575 of file groups_widget.cpp.
References fillGroupItemList(), fillTable(), VAbstractPattern::getGroups(), m_doc, and ui.
Referenced by MainWindow::addDraftBlock(), addGroupToList(), MainWindow::changeDraftBlock(), deleteGroupFromList(), editGroup(), groupContextMenu(), groupItemContextMenu(), renameGroup(), showGroups(), and MainWindow::updateGroups().
|
private |
zoomToObject zoom to selected (point) object.
point | If selected list item is a point use the item's toolId. if the list item is a curve or line then use the tool's first point. |
Definition at line 1304 of file groups_widget.cpp.
References getGroupId(), VAbstractPattern::getGroupsContainingItem(), VAbstractPattern::getTool(), m_doc, NULL_ID, qApp, SCASSERT, setGroupVisibility(), showGroups(), ui, and VMainGraphicsView::zoomByScale().
Referenced by itemDoubleClicked().
|
private |
Definition at line 108 of file groups_widget.h.
|
private |
Definition at line 106 of file groups_widget.h.
Referenced by getObjName(), getPointName(), and itemDoubleClicked().
|
private |
Definition at line 105 of file groups_widget.h.
Referenced by addGroupToList(), attrUInt(), deleteGroupFromList(), editGroup(), fillGroupItemList(), fillTable(), groupContextMenu(), groupItemContextMenu(), groupLockChanged(), groupVisibilityChanged(), hideAllGroups(), itemDoubleClicked(), lockAllGroups(), renameGroup(), setGroupVisibility(), showAllGroups(), unlockAllGroups(), updateGroups(), and zoomToObject().
|
private |
Definition at line 107 of file groups_widget.h.
Referenced by draftBlockHasGroups().
|
private |
Definition at line 104 of file groups_widget.h.
Referenced by clear(), deleteGroupFromList(), draftBlockHasGroups(), editGroup(), fillGroupItemList(), fillTable(), getCurrentGroupName(), getGroupId(), groupContextMenu(), groupItemContextMenu(), groupLockChanged(), groupVisibilityChanged(), hideAllGroups(), lockAllGroups(), renameGroup(), setAddGroupEnabled(), showAllGroups(), showGroups(), splitterMoved(), unlockAllGroups(), updateGroups(), zoomToObject(), and ~GroupsWidget().