#include "formbase.h"
#include "ui_formbase.h"


formBase::formBase(QString aID, int aEditMode, QWidget *parent) :
    QWidget(parent),
    mDocumentID(aID),
    mNeedSave(false),
    ui(new Ui::formBase)
{

    if(aID.isEmpty())
    {
        newDocument();
    }
    else
    {
        openDocument(aID);
    }
}

formBase::~formBase()
{
    delete ui;
}

void formBase::newDocument()
{
    mEditMode = false;
}

void formBase::openDocument(QString id)
{
    mEditMode = true;
}

void formBase::save()
{

}

bool formBase::needsave()
{
    return mNeedSave;
}

void formBase::setEditMode(bool aMode)
{
    mEditMode = aMode;
}


