diff --git a/AffineTransformations/src/DkAffineTransformationsPlugin.json b/AffineTransformations/src/DkAffineTransformationsPlugin.json index 334c780..93eef40 100644 --- a/AffineTransformations/src/DkAffineTransformationsPlugin.json +++ b/AffineTransformations/src/DkAffineTransformationsPlugin.json @@ -3,7 +3,7 @@ "AuthorName" : "Tim Jerman", "Company" : "", "DateCreated" : "2014-06-01", - "DateModified" : "2017-04-21", + "DateModified" : "2017-11-06", "Description" : "Apply affine transformations to the selected image. The available transformations are: scale, rotation (with automatic skewness detection), and shear.", "Tagline" : "Transform and rotate images", "PluginId" : "7a4a50a45ddb408ba46a16a40e6518fd", diff --git a/FakeMiniaturesPlugin/src/DkFakeMiniaturesPlugin.json b/FakeMiniaturesPlugin/src/DkFakeMiniaturesPlugin.json index 89ba030..6808c39 100644 --- a/FakeMiniaturesPlugin/src/DkFakeMiniaturesPlugin.json +++ b/FakeMiniaturesPlugin/src/DkFakeMiniaturesPlugin.json @@ -3,7 +3,7 @@ "AuthorName" : "Tim Jerman", "Company" : "", "DateCreated" : "2014-06-01", - "DateModified" : "2017-04-21", + "DateModified" : "2017-11-06", "Description" : "On the preview image select (by mouse click move and release) the region without blurring. A blur is applyied depending on the distance from this region. The amount of blur and saturation can be changed with the sliders on the right of the dialog.", "Tagline" : "Apply a fake miniature filter (tilt shift effect) to the image.", "PluginId" : "a2ac7b68866b4ab29fb1df3e170b8f0d", diff --git a/NikonPlugin/src/DkNikonPlugin.cpp b/NikonPlugin/src/DkNikonPlugin.cpp index b9232e2..2387f04 100644 --- a/NikonPlugin/src/DkNikonPlugin.cpp +++ b/NikonPlugin/src/DkNikonPlugin.cpp @@ -65,6 +65,14 @@ DkNikonPlugin::~DkNikonPlugin() { } } +void DkNikonPlugin::setVisible(bool visible) { + + if (!viewport) + return; + + viewport->setVisible(visible); +} + /** * Returns descriptive image **/ @@ -94,15 +102,9 @@ QSharedPointer DkNikonPlugin::runPlugin(const QString &ru return image; }; -/** -* returns paintViewPort -**/ -nmc::DkPluginViewPort* DkNikonPlugin::getViewPort() { +bool DkNikonPlugin::createViewPort(QWidget * parent) { - if (!viewport) { - // >DIR: dummy viewport [4.7.2014 markus] - viewport = new DkNikonViewPort(); - } + viewport = new DkNikonViewPort(parent); if (!maidFacade) { QMainWindow* mainWindow = getMainWindow(); @@ -110,8 +112,8 @@ nmc::DkPluginViewPort* DkNikonPlugin::getViewPort() { maidFacade = new MaidFacade(mainWindow); if (maidFacade->init()) { - - + + if (!camControls) { // get last location @@ -119,7 +121,7 @@ nmc::DkPluginViewPort* DkNikonPlugin::getViewPort() { int dockLocation = settings.value("camControlsLocation", Qt::RightDockWidgetArea).toInt(); camControls = new DkCamControls(maidFacade, tr("Camera Controls")); - + if (mainWindow) mainWindow->addDockWidget((Qt::DockWidgetArea)dockLocation, camControls); @@ -128,9 +130,10 @@ nmc::DkPluginViewPort* DkNikonPlugin::getViewPort() { connect(camControls, SIGNAL(closeSignal()), getViewPort(), SIGNAL(closePlugin())); } - camControls->setVisible(true); + camControls->setVisible(true); - } else { + } + else { QMessageBox warningDialog(mainWindow); warningDialog.setWindowTitle(tr("MAID Library could not be opened")); warningDialog.setText(tr("The MAID library could not be opened. Camera controls will be disabled.")); @@ -144,6 +147,14 @@ nmc::DkPluginViewPort* DkNikonPlugin::getViewPort() { } } + return true; +} + +/** +* returns paintViewPort +**/ +nmc::DkPluginViewPort* DkNikonPlugin::getViewPort() { + return viewport; } diff --git a/NikonPlugin/src/DkNikonPlugin.h b/NikonPlugin/src/DkNikonPlugin.h index 10a85b8..0062e95 100644 --- a/NikonPlugin/src/DkNikonPlugin.h +++ b/NikonPlugin/src/DkNikonPlugin.h @@ -82,10 +82,14 @@ class DkNikonPlugin : public QObject, nmc::DkViewPortInterface { QImage image() const override; QSharedPointer runPlugin(const QString &runID = QString(), QSharedPointer image = QSharedPointer()) const override; - nmc::DkPluginViewPort* getViewPort(); + nmc::DkPluginViewPort* getViewPort() override; void deleteViewPort(); virtual bool closesOnImageChange() {return false;}; + void setVisible(bool visible) override; + + bool createViewPort(QWidget* parent) override; + protected: nmc::DkPluginViewPort* viewport; DkCamControls* camControls; diff --git a/NikonPlugin/src/DkNikonPlugin.json b/NikonPlugin/src/DkNikonPlugin.json index 0dbd30d..70cdf7c 100644 --- a/NikonPlugin/src/DkNikonPlugin.json +++ b/NikonPlugin/src/DkNikonPlugin.json @@ -3,7 +3,7 @@ "AuthorName" : "Thomas Lang", "Company" : "", "DateCreated" : "2014-06-01", - "DateModified" : "2017-03-23", + "DateModified" : "2017-11-06", "Description" : "Control Nikon D4 using nomacs.", "Tagline" : "Live preview and controls for Nikon D4.", "PluginId" : "87c51045b38744caa9f389e000d64f3f", diff --git a/PageExtractionPlugin/src/DkPageExtractionPlugin.json b/PageExtractionPlugin/src/DkPageExtractionPlugin.json index d0b1008..d421c91 100644 --- a/PageExtractionPlugin/src/DkPageExtractionPlugin.json +++ b/PageExtractionPlugin/src/DkPageExtractionPlugin.json @@ -3,7 +3,7 @@ "AuthorName" : "Markus Diem, Thomas Lang", "Company" : "Computer Vision Lab", "DateCreated" : "2015-08-27", - "DateModified" : "2017-04-21", + "DateModified" : "2017-11-06", "Description" : "This plugin detects document pages and either crops the image accordingly or annotates the region.", "Tagline" : "Detect document pages in images", "PluginId" : "4acb88c461024cb080ae5cd15d0ef0ec", diff --git a/PaintPlugin/src/DkPaintPlugin.json b/PaintPlugin/src/DkPaintPlugin.json index 50b1e13..f33911c 100644 --- a/PaintPlugin/src/DkPaintPlugin.json +++ b/PaintPlugin/src/DkPaintPlugin.json @@ -3,7 +3,7 @@ "AuthorName" : "Tim Jerman", "Company" : "", "DateCreated" : "2014-05-01", - "DateModified" : "2017-04-21", + "DateModified" : "2017-11-06", "Description" : "Paint on an image. The color, size and opacity of the brush can be changed.", "Tagline" : "Draw with adjustable brushes to an image.", "PluginId" : "ad970ef36cc24737afd2b53ad015ff0d",