Skip to content

Commit

Permalink
reflects interface updates
Browse files Browse the repository at this point in the history
  • Loading branch information
diemmarkus committed Nov 26, 2018
1 parent da5b1d2 commit cec0be6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
5 changes: 3 additions & 2 deletions AffineTransformations/src/DkImgTransformationsPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "DkMath.h"
#include "DkBaseViewPort.h"
#include "DkUtils.h"
#include "DkToolbars.h"

#include <QMouseEvent>

Expand Down Expand Up @@ -740,8 +741,8 @@ void DkImgTransformationsViewPort::setVisible(bool visible) {
}


if (imgTransformationsToolbar)
emit showToolBar(imgTransformationsToolbar, visible);
if (imgTransformationsToolbar)
nmc::DkToolBarManager::inst().showToolBar(imgTransformationsToolbar, visible);

setMode(defaultMode);
DkPluginViewPort::setVisible(visible);
Expand Down
2 changes: 1 addition & 1 deletion AffineTransformations/src/DkImgTransformationsPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ enum {
class DkImgTransformationsPlugin : public QObject, nmc::DkViewPortInterface {
Q_OBJECT
Q_INTERFACES(nmc::DkViewPortInterface)
Q_PLUGIN_METADATA(IID "com.nomacs.ImageLounge.DkAffineTransformationsPlugin/3.4" FILE "DkAffineTransformationsPlugin.json")
Q_PLUGIN_METADATA(IID "com.nomacs.ImageLounge.DkAffineTransformationsPlugin/3.5" FILE "DkAffineTransformationsPlugin.json")

public:

Expand Down
12 changes: 3 additions & 9 deletions PaintPlugin/src/DkPaintPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*******************************************************************************************************/

#include "DkPaintPlugin.h"
#include "DkToolbars.h"

#include <QDebug>
#include <QMouseEvent>
Expand All @@ -47,12 +48,6 @@ DkPaintPlugin::DkPaintPlugin() {
**/
DkPaintPlugin::~DkPaintPlugin() {

qDebug() << "[PAINT PLUGIN] deleted...";

if (viewport) {
viewport->deleteLater();
viewport = 0;
}
}

/**
Expand Down Expand Up @@ -131,7 +126,6 @@ DkPaintViewPort::DkPaintViewPort(QWidget* parent, Qt::WindowFlags flags) : DkPlu
}

DkPaintViewPort::~DkPaintViewPort() {
qDebug() << "[PAINT VIEWPORT] deleted...";

saveSettings();

Expand Down Expand Up @@ -401,7 +395,7 @@ bool DkPaintViewPort::isCanceled() {
void DkPaintViewPort::setVisible(bool visible) {

if (paintToolbar)
emit showToolBar(paintToolbar, visible);
nmc::DkToolBarManager::inst().showToolBar(paintToolbar, visible);

DkPluginViewPort::setVisible(visible);
}
Expand Down Expand Up @@ -430,7 +424,7 @@ void DkPaintToolBar::createIcons() {
icons[apply_icon] = nmc::DkImage::loadIcon(":/nomacs/img/save.svg");
icons[cancel_icon] = nmc::DkImage::loadIcon(":/nomacs/img/close.svg");
icons[pan_icon] = nmc::DkImage::loadIcon(":/nomacs/img/pan.svg");
icons[pan_icon].addPixmap(nmc::DkImage::loadIcon(":/nomacs/img/pan_checked.svg"), QIcon::Normal, QIcon::On);
icons[pan_icon].addPixmap(nmc::DkImage::loadIcon(":/nomacs/img/pan-checked.svg"), QIcon::Normal, QIcon::On);
icons[undo_icon] = nmc::DkImage::loadIcon(":/nomacs/img/rotate-cc.svg");
}

Expand Down
2 changes: 1 addition & 1 deletion PaintPlugin/src/DkPaintPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class DkPaintToolBar;
class DkPaintPlugin : public QObject, nmc::DkViewPortInterface {
Q_OBJECT
Q_INTERFACES(nmc::DkViewPortInterface)
Q_PLUGIN_METADATA(IID "com.nomacs.ImageLounge.DkPaintPlugin/3.3" FILE "DkPaintPlugin.json")
Q_PLUGIN_METADATA(IID "com.nomacs.ImageLounge.DkPaintPlugin/3.4" FILE "DkPaintPlugin.json")

public:

Expand Down

0 comments on commit cec0be6

Please sign in to comment.