QCAD
Open Source 2D CAD
RTransactionStack Class Reference

Copyright (c) 2011-2015 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. More...
 
void reset ()
 
 RTransactionStack (RStorage &storage)
 Copyright (c) 2011-2015 by Andrew Mustun. More...
 
QList< RTransactionundo ()
 Undoes the last transaction. More...
 
 ~RTransactionStack ()
 

Private Attributes

RStoragestorage
 

Additional Inherited Members

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

Detailed Description

Copyright (c) 2011-2015 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 ( RStorage storage)

Copyright (c) 2011-2015 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 ( )

Member Function Documentation

QString RTransactionStack::getRedoableTransactionText ( ) const
QString RTransactionStack::getUndoableTransactionText ( ) const
bool RTransactionStack::isRedoAvailable ( ) const
bool RTransactionStack::isUndoAvailable ( ) const
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.
void RTransactionStack::reset ( )
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

RStorage& RTransactionStack::storage
private

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