QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RTransactionStack Class Reference

Copyright (c) 2011-2018 by Andrew Mustun. More...

#include <RTransactionStack.h>

Inheritance diagram for RTransactionStack:
RNonCopyable

Public Member Functions

QString getRedoableTransactionText () const
 
QString getUndoableTransactionText () const
 
bool isRedoAvailable () const
 
bool isUndoAvailable () const
 
QList< RTransactionredo ()
 Redoes the last transaction.
 
void reset ()
 
 RTransactionStack (RStorage &storage)
 Copyright (c) 2011-2018 by Andrew Mustun.
 
QList< RTransactionundo ()
 Undoes the last transaction.
 
 ~RTransactionStack ()
 

Private Attributes

RStoragestorage
 

Additional Inherited Members

- Private Member Functions inherited from RNonCopyable
 RNonCopyable ()
 
virtual ~RNonCopyable ()
 

Detailed Description

Copyright (c) 2011-2018 by Andrew Mustun.

All rights reserved.

This file is part of the QCAD project.

QCAD 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.

QCAD 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 QCAD. A transaction stack handles transactions on a document. Transactions are stored in a storage implementation. Transactions can be undone and redone.

Constructor & Destructor Documentation

◆ RTransactionStack()

RTransactionStack::RTransactionStack ( RStorage & storage)

Copyright (c) 2011-2018 by Andrew Mustun.

All rights reserved.

This file is part of the QCAD project.

QCAD 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.

QCAD 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 QCAD.

◆ ~RTransactionStack()

RTransactionStack::~RTransactionStack ( )

Member Function Documentation

◆ getRedoableTransactionText()

QString RTransactionStack::getRedoableTransactionText ( ) const

◆ getUndoableTransactionText()

QString RTransactionStack::getUndoableTransactionText ( ) const

◆ isRedoAvailable()

bool RTransactionStack::isRedoAvailable ( ) const

◆ isUndoAvailable()

bool RTransactionStack::isUndoAvailable ( ) const

◆ redo()

QList< RTransaction > RTransactionStack::redo ( )

Redoes the last transaction.

Returns
Set of affected entity IDs. Higher level callers can use this set to update scenes, views, etc accordingly.

◆ reset()

void RTransactionStack::reset ( )

◆ undo()

QList< RTransaction > RTransactionStack::undo ( )

Undoes the last transaction.

Returns
Transaction that was undone. The transaction contains a set of affected entity IDs. Higher level callers can use this set to update scenes, views, etc accordingly.

Member Data Documentation

◆ storage

RStorage& RTransactionStack::storage
private

The documentation for this class was generated from the following files: