#ifndef FORMBASE_H
#define FORMBASE_H

#include <QWidget>

namespace Ui {
  class formBase;
}

class formBase : public QWidget
{
  Q_OBJECT

public:
    explicit formBase(QString aID = "", int aEditMode = 0, QWidget *parent = nullptr);
    ~formBase();

    virtual void newDocument() = 0;
    virtual void openDocument(QString id) = 0;
    virtual void save() = 0;
    virtual bool needsave() = 0;
    virtual void setEditMode(bool aMode) = 0;
    virtual void closeDocument(){};

private:
    Ui::formBase *ui;

protected:
    QString mDocumentID;
    bool mEditMode;
    bool mNeedSave;

};

#endif // FORMBASE_H
