diff --git a/snapshot.cpp b/snapshot.cpp new file mode 100644 --- /dev/null +++ b/snapshot.cpp @@ -0,0 +1,36 @@ + +#include + +#include "snapshot.h" +#include "snapshotview.h" + +#include + +SnapShot::SnapShot(QMainWindow* parent, QString name) : + QObject(parent), + _menuAction(name, this) +{ + view = NULL; + mainWindow = parent; + connect(&_menuAction, &QAction::triggered, this, &SnapShot::show); +} + +QAction* SnapShot::menuAction() +{ + return &_menuAction; +} + +void SnapShot::show() +{ + if (view == NULL) + { + qDebug() << "view == NULL"; + view = new SnapShotView(mainWindow, this); + } + view->show(); +} + +void SnapShot::hide() +{ + +}