Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
IViewGraphicsPixmapItem.cpp 559 B
#include "IViewGraphicsPixmapItem.h"

IViewGraphicsPixmapItem::IViewGraphicsPixmapItem(QObject*     parent,
                                                 IController* controller,
                                                 IModel*      model)
: QObject(parent)
, IView(controller, model)
{
}

void IViewGraphicsPixmapItem::setNewModel(IModel* model)
{
    if (getModel() != nullptr) {
        QObject::disconnect(getModel(), 0, this, 0);
    }

    setModel(model);

    if (getModel() != nullptr) {
        connectModelView();
    }

    update();
}