mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 06:15:32 +00:00
27 lines
No EOL
489 B
C++
27 lines
No EOL
489 B
C++
|
|
#include "document.hpp"
|
|
|
|
CSMDoc::Document::Document()
|
|
{
|
|
connect (&mUndoStack, SIGNAL (cleanChanged (bool)), this, SLOT (modificationStateChanged (bool)));
|
|
}
|
|
|
|
QUndoStack& CSMDoc::Document::getUndoStack()
|
|
{
|
|
return mUndoStack;
|
|
}
|
|
|
|
int CSMDoc::Document::getState() const
|
|
{
|
|
int state = 0;
|
|
|
|
if (!mUndoStack.isClean())
|
|
state |= State_Modified;
|
|
|
|
return state;
|
|
}
|
|
|
|
void CSMDoc::Document::modificationStateChanged (bool clean)
|
|
{
|
|
emit stateChanged (getState(), this);
|
|
} |