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:
blacksun
2018-06-20 18:35:06 +00:00
parent 8386002ef3
commit 24812944eb
8 changed files with 59 additions and 159 deletions

View File

@@ -197,17 +197,11 @@ class ChangeNamesCommand : public ElementEditionCommand {
This command changes the zValue of a set of primitives when editing an
electrical element.
*/
class ChangeZValueCommand : public ElementEditionCommand {
// constructors, destructor
class ChangeZValueCommand : public ElementEditionCommand
{
// constructors, destructor
public:
/// List the various kind of changes for the zValue
enum Option {
BringForward, ///< Bring primitives to the foreground so they have the highest zValue
Raise, ///< Raise primitives one layer above their current one; zValues are incremented
Lower, ///< Send primitives one layer below their current one; zValues are decremented
SendBackward ///< Send primitives to the background so they have the lowest zValue
};
ChangeZValueCommand(ElementScene *, Option, QUndoCommand * = nullptr);
ChangeZValueCommand(ElementScene *, QET::DepthOption , QUndoCommand * = nullptr);
~ChangeZValueCommand() override;
private:
ChangeZValueCommand(const ChangeZValueCommand &);
@@ -230,7 +224,7 @@ class ChangeZValueCommand : public ElementEditionCommand {
/// associates impacted primitives with their new zValues
QHash<QGraphicsItem *, qreal> redo_hash;
/// kind of treatment to apply
Option option;
QET::DepthOption m_option;
};
/**