mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Forget qet.cpp and qet.h from previous comit.
Add new function for create QAction used for edit the depth of items. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5402 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -343,11 +343,11 @@ void ChangeNamesCommand::redo() {
|
||||
*/
|
||||
ChangeZValueCommand::ChangeZValueCommand(
|
||||
ElementScene *elmt,
|
||||
ChangeZValueCommand::Option o,
|
||||
QET::DepthOption o,
|
||||
QUndoCommand *parent
|
||||
) :
|
||||
ElementEditionCommand(elmt, nullptr, parent),
|
||||
option(o)
|
||||
m_option(o)
|
||||
{
|
||||
// retrieve all primitives but terminals
|
||||
QList<QGraphicsItem *> items_list = m_scene -> zItems(ElementScene::SortByZValue | ElementScene::SelectedOrNot);
|
||||
@@ -356,16 +356,16 @@ ChangeZValueCommand::ChangeZValueCommand(
|
||||
foreach(QGraphicsItem *qgi, items_list) undo_hash.insert(qgi, qgi -> zValue());
|
||||
|
||||
// choisit le nom en fonction du traitement
|
||||
if (option == BringForward) {
|
||||
if (m_option == QET::BringForward) {
|
||||
setText(QObject::tr("amener au premier plan", "undo caption"));
|
||||
applyBringForward(items_list);
|
||||
} else if (option == Raise) {
|
||||
} else if (m_option == QET::Raise) {
|
||||
setText(QObject::tr("rapprocher", "undo caption"));
|
||||
applyRaise(items_list);
|
||||
} else if (option == Lower) {
|
||||
} else if (m_option == QET::Lower) {
|
||||
setText(QObject::tr("éloigner", "undo caption"));
|
||||
applyLower(items_list);
|
||||
} else if (option == SendBackward) {
|
||||
} else if (m_option == QET::SendBackward) {
|
||||
setText(QObject::tr("envoyer au fond", "undo caption"));
|
||||
applySendBackward(items_list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user