diff --git a/Implementation/GUI/NewLayerDock.h b/Implementation/GUI/NewLayerDock.h
index e1053cdcad87f937407cd6a80dd5c29eff37b871..7f049f998e9d000405c940c9498c2f9ad1f5d1ee 100644
--- a/Implementation/GUI/NewLayerDock.h
+++ b/Implementation/GUI/NewLayerDock.h
@@ -21,10 +21,8 @@ class NewLayerDock : public QObject
public:
NewLayerDock(InteractionTool *interaction);
~NewLayerDock();
- //QDockWidget *getDockWidget();
void setColorVect(QVector<QRgb> colorVect);
QDockWidget *createNewLayerDock();
- //void setDrawColorIndex(int i);
signals:
void updateHasLayer(bool b);
@@ -38,7 +36,6 @@ private slots:
void standartColorVect();
void smallColorVect();
void customColorVect();
- //void newLayer();
void addNewLayer();
void setNewColor();
void setNewLayerX(int w);
@@ -46,8 +43,6 @@ private slots:
void setNewLayerColor();
private:
-
-
toolParameters_t *param;
QDockWidget *dockWidget;
int drawColorIndex=0;
diff --git a/Implementation/GUI/TranslationDock.h b/Implementation/GUI/TranslationDock.h
index 0cb466bbde857b8099607ae1b7232b6c935dd5a5..8a68e6460ea92422405662ab69e4c269a7043518 100644
--- a/Implementation/GUI/TranslationDock.h
+++ b/Implementation/GUI/TranslationDock.h
@@ -1,8 +1,6 @@
-
-
#ifndef TRANSLATIONDOCK_H
#define TRANSLATIONDOCK_H
-//#include "imageviewer.h"
+
#include "InteractionTool.h"
#include <QDockWidget>
#include <QCheckBox>
@@ -18,9 +16,7 @@ class TranslationDock : public QObject
Q_OBJECT
public:
TranslationDock(InteractionTool *interaction);
- //void init(ImageViewer *mainWindow);
~TranslationDock();
- //QDockWidget *getDockWidget();
void doTranslationII(toolParameters_t *param);
QDockWidget *createTranslateDock();
@@ -38,7 +34,6 @@ private:
toolParameters_t *param;
QDockWidget *dockWidget;
- //ImageViewer *mainWindow;
InteractionTool *interactionTool;
QCheckBox *mirrorCheckbox;
QLineEdit *zoomXInp;
diff --git a/Implementation/GUI/imageviewer.cpp b/Implementation/GUI/imageviewer.cpp
index ccee3e90e3cc49c4e6dfec290ed67b8a0e390d17..476545db62dddb7002f3d33709e344da3a13bc6c 100644
--- a/Implementation/GUI/imageviewer.cpp
+++ b/Implementation/GUI/imageviewer.cpp
@@ -69,17 +69,17 @@ bool ImageViewer::loadFile(const QString &fileName){
if (newImage==nullptr){
return false;
}
-
+ hasLayer=true;
return true;
}
void ImageViewer::setImage(QImage newImage){//remove Parameter
image = newImage;
imageLabel->setPixmap(QPixmap::fromImage(image));
- fitToWindowAct->setEnabled(true);
+ //fitToWindowAct->setEnabled(true);
updateActions();
- if (!fitToWindowAct->isChecked())
- imageLabel->adjustSize();
+ //if (!fitToWindowAct->isChecked())
+ imageLabel->adjustSize();
}
bool ImageViewer::saveFile(const QString &fileName){
@@ -127,7 +127,7 @@ void ImageViewer::open(){
QFileDialog dialog(this, tr("Open File"));
initializeImageFileDialog(dialog, QFileDialog::AcceptOpen);
while (dialog.exec() == QDialog::Accepted && !loadFile(dialog.selectedFiles().first())) {}
- hasLayer=true;
+
colorDock->updateColors();
layerDock->updateLayerCount();
updateVisible();
@@ -169,6 +169,7 @@ void ImageViewer::createActions(){
QAction *openAct = fileMenu->addAction(tr("&Open..."), this, &ImageViewer::open);
openAct->setShortcut(QKeySequence::Open);
saveAsAct = fileMenu->addAction(tr("&Save As..."), this, &ImageViewer::saveAs);
+ saveAsAct->setShortcut(QKeySequence::Save);
saveAsAct->setEnabled(false);
fileMenu->addSeparator();
QAction *exitAct = fileMenu->addAction(tr("E&xit"), this, &QWidget::close);
@@ -181,18 +182,16 @@ void ImageViewer::createActions(){
zoomOutAct->setShortcut(QKeySequence::ZoomOut);
zoomOutAct->setEnabled(false);
normalSizeAct = viewMenu->addAction(tr("&Normal Size"), this, &ImageViewer::normalSize);
- normalSizeAct->setShortcut(tr("Ctrl+S"));
+ normalSizeAct->setShortcut(tr("Ctrl+0"));
normalSizeAct->setEnabled(false);
- viewMenu->addSeparator();
- //fitToWindowAct = viewMenu->addAction(tr("&Fit to Window"), this, &ImageViewer::fitToWindow);
- //fitToWindowAct->setEnabled(false);
- //fitToWindowAct->setCheckable(true);
- //fitToWindowAct->setShortcut(tr("Ctrl+F"));
QMenu *toolMenu = menuBar()->addMenu(tr("&Tools"));
drawToolAct = toolMenu->addAction(tr("&Draw"), this, &ImageViewer::draw);
+ drawToolAct->setShortcut(tr("Ctrl+D"));
drawToolAct->setEnabled(false);
newLayerAct = toolMenu->addAction(tr("&New Layer"), this, &ImageViewer::newLayer);
+ newLayerAct->setShortcut(tr("Ctrl+N"));
translateAct = toolMenu->addAction(tr("&Translate"), this, &ImageViewer::translate);
+ translateAct->setShortcut(tr("Ctrl+T"));
translateAct->setEnabled(false);
makeToShaped = toolMenu->addAction(tr("&Make Shaped"), this, &ImageViewer::makeShaped);
makeToShaped->setEnabled(false);
@@ -203,9 +202,10 @@ void ImageViewer::createActions(){
}
void ImageViewer::updateActions(){
- zoomInAct->setEnabled(!fitToWindowAct->isChecked());
- zoomOutAct->setEnabled(!fitToWindowAct->isChecked());
- normalSizeAct->setEnabled(!fitToWindowAct->isChecked());
+ saveAsAct->setEnabled(hasLayer);
+ zoomInAct->setEnabled(hasLayer);
+ zoomOutAct->setEnabled(hasLayer);
+ normalSizeAct->setEnabled(hasLayer);
drawToolAct->setEnabled(hasLayer);
translateAct->setEnabled(hasLayer);
makeToShaped->setEnabled(hasLayer);
diff --git a/Implementation/GUI/imageviewer.h b/Implementation/GUI/imageviewer.h
index de46da24baaa47ecf0f62fbcd814e8f7a37af748..f78af45c6b799d5b2e19f6d90092dc0e913d980c 100644
--- a/Implementation/GUI/imageviewer.h
+++ b/Implementation/GUI/imageviewer.h
@@ -1,3 +1,4 @@
+
#include "InteractionTool.h"
#include "TranslationDock.h"
#include "NewLayerDock.h"
@@ -8,6 +9,8 @@
#ifndef IMAGEVIEWER_H
#define IMAGEVIEWER_H
+
+
#include <QMainWindow>
#include <QImage>
#include <vector>
@@ -20,6 +23,18 @@
#include <QLabel>
#include <QCheckBox>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QLabel;
+class QMenu;
+class QScrollArea;
+class QScrollBar;
+QT_END_NAMESPACE
+
+//typedef enum drawModus {pencil, lines, notFilledRect, filledRect} drawModus_e;
+
+//! [0]
class ImageViewer : public QMainWindow
{
Q_OBJECT
@@ -28,8 +43,15 @@ public:
ImageViewer(QWidget *parent = nullptr);
bool loadFile(const QString &);
bool getHasLayer();
+ //void updateColors();
+ //void updateLayers();
+ //void updateLayerCount();
QVector<QRgb> getColorVect();
+public slots:
+ //void updateVisible();
+ //void newLayer();
+
protected:
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
@@ -38,6 +60,9 @@ protected:
private slots:
void open();
void saveAs();
+ //void print();
+ //void copy();
+ //void paste();
void zoomIn();
void zoomOut();
void normalSize();
@@ -73,31 +98,46 @@ private:
QLabel *imageLabel;
QScrollArea *scrollArea;
QMenu *viewMenu;
+ //QDockWidget *colorDock;
QDockWidget *layerDockW;
QVector<QRgb> colorVect;
QVector<QRgb> newColorVect;
QPixmap *pixmap;
+ //QCheckBox *ignoreShaped;
+ //QRadioButton *newColormap[4];
QPoint move;
+ //QPolygon polyVis;
bool moveStart = false;
+ //bool isNewLayerColor = false;
double scaleFactor = 1.0;
bool hasLayer=false;
toolParameters_t *param = nullptr;
InteractionTool *interactionTool;
QAction *makeToShaped;
- QAction *drawToolAct;
+ QAction *drawTool;
QAction *newLayerAct;
QAction *translateAct;
+ QAction *drawToolAct;
TranslationDock *transLationDock;
NewLayerDock *newLayerDock;
DrawDock *drawDock;
LayerDock *layerDock;
ColorDock *colorDock;
+
+
+/*#ifndef QT_NO_PRINTER
+ QPrinter printer;
+#endif
+*/
QAction *saveAsAct;
+ //QAction *printAct;
+ //QAction *copyAct;
QAction *zoomInAct;
QAction *zoomOutAct;
QAction *normalSizeAct;
QAction *fitToWindowAct;
QAction *showColorsAct;
};
+//! [0]
#endif
diff --git a/Implementation/GUI/imageviewer.pro b/Implementation/GUI/imageviewer.pro
index 658f6789004ae724ac9c571790b5ed3435de5ea7..05704223cff791c87b5361fac424b1c6dd71b541 100644
--- a/Implementation/GUI/imageviewer.pro
+++ b/Implementation/GUI/imageviewer.pro
@@ -12,7 +12,6 @@ HEADERS = imageviewer.h \
Picture.h \
Tool.h \
TranslationDock.h \
- main.h \
tools/drawTool.h \
tools/floydSteinberg.h \
tools/merge.h \
diff --git a/Implementation/GUI/main.cpp b/Implementation/GUI/main.cpp
index 035c7696930f5ea155aef2a91b0c3c1cb7456ea7..7de1931a5b68ca38923e341cb6697517f95eaf01 100644
--- a/Implementation/GUI/main.cpp
+++ b/Implementation/GUI/main.cpp
@@ -56,16 +56,8 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- QGuiApplication::setApplicationDisplayName(ImageViewer::tr("Image Viewer"));
- QCommandLineParser commandLineParser;
- commandLineParser.addHelpOption();
- commandLineParser.addPositionalArgument(ImageViewer::tr("[file]"), ImageViewer::tr("Image file to open."));
- commandLineParser.process(QCoreApplication::arguments());
+ QGuiApplication::setApplicationDisplayName(ImageViewer::tr("IntelliPhoto"));
ImageViewer imageViewer;
- if (!commandLineParser.positionalArguments().isEmpty()
- && !imageViewer.loadFile(commandLineParser.positionalArguments().front())) {
- return -1;
- }
imageViewer.show();
return app.exec();
}
diff --git a/Implementation/GUI/main.h b/Implementation/GUI/main.h
deleted file mode 100644
index fb5f0cd30df6a26fa073a6c95c6e4e98abfa837f..0000000000000000000000000000000000000000
--- a/Implementation/GUI/main.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef MAIN_H
-#define MAIN_H
-
-#endif /* !MAIN_H */
diff --git a/Implementation/GUI/tools/drawTool.cpp b/Implementation/GUI/tools/drawTool.cpp
index 2794700f1899271f81f97520a99eb86eb2a31d23..4133b860045b16b5ae0cb12aec2f8763ae417cda 100644
--- a/Implementation/GUI/tools/drawTool.cpp
+++ b/Implementation/GUI/tools/drawTool.cpp
@@ -13,16 +13,10 @@ bool DrawTool::initTool(toolParameters_t *param){
}
bool DrawTool::useTool(){
- //QPainter painter(pic->getCurrentLayerAsQ());
QImage *tempImage = new QImage(pic->getCurrentLayerAsQ()->width(), pic->getCurrentLayerAsQ()->height(), QImage::Format_ARGB32);
tempImage->fill(QColor(0,0,0,0));
QPainter painter(tempImage);
QImage *qPic = pic->getCurrentLayer()->qImage;
- /*for(int i = -5; i <= 5; i++){
- for(int j = -5; j <= 5; j++){
- qPic->setPixel(point+QPoint(i,j),2);
- }
- }*/
QColor white(255,255,255,255);
QPen pen(white);
pen.setWidth(w);
diff --git a/Implementation/GUI/tools/merge.cpp b/Implementation/GUI/tools/merge.cpp
index df092031072d8d3e12bccc22411b099de01daf65..bb690a50c81586e3c33b83f1d1478f73c996b378 100644
--- a/Implementation/GUI/tools/merge.cpp
+++ b/Implementation/GUI/tools/merge.cpp
@@ -50,8 +50,6 @@ bool MergeTool::useTool(){
QImage *p1 = pic->getLayerAsQ(layerIndex1);
QImage *p2 = pic->getLayerAsQ(layerIndex2);
QImage *newPic = new QImage(maxX,maxY,QImage::Format_ARGB32);
- //newPic->fill(QColor(0,0,0,0));
- //newPic->setColorTable(pic->getLayerAsQ(layerIndex1)->colorTable());
QPainter painter(newPic);
painter.drawImage(p1xa,p1ya,*pic->getLayerAsQ(layerIndex1));
painter.drawImage(p2xa,p2ya,*pic->getLayerAsQ(layerIndex2));
@@ -87,200 +85,6 @@ bool MergeTool::useTool(){
}
}
}
-
-
- /*int width1;
- int height1;
- int width2;
- int height2;
- int w0=0;
- int h0=0;
- int w2=0;
- int h2=0;
- int w1=0;
- int h1=0;
-
- bool shaped = false;
-
- width1=pic->getLayerAsQ(layerIndex1)->width();
- height1=pic->getLayerAsQ(layerIndex1)->height();
- width2=pic->getLayerAsQ(layerIndex2)->width();
- height2=pic->getLayerAsQ(layerIndex2)->height();
- if (pic->xOffset(layerIndex1)>pic->xOffset(layerIndex2)){
- w0=pic->xOffset(layerIndex2);
- w2=pic->xOffset(layerIndex1);
- } else {
- w0=pic->xOffset(layerIndex1);
- w2=pic->xOffset(layerIndex2);
- }
- if (pic->yOffset(layerIndex1)>pic->yOffset(layerIndex2)){
- h0 = pic->yOffset(layerIndex2);
- h2 = pic->yOffset(layerIndex1);
- } else {
- h0 = pic->yOffset(layerIndex1);
- h2 = pic->yOffset(layerIndex2);
- }
- if (pic->isShaped(layerIndex1)){
- shaped= true;
- }
- if (width1>width2){
- w1=width1;
- } else {
- w1=width2;
- }
- if (height1>height2){
- h1 = height1;
- } else {
- h1 = height2;
- }
- //QImage tempImage = QImage(pic->getCurrentLayerAsQ()->width(), pic->getCurrentLayerAsQ()->height(), QImage::Format_ARGB32);
- //tempImage.fill(QColor(0,0,0,0));
- //QPainter painter(&tempImage);
- QImage *newPic = new QImage(w1+w2-w0,h1+h2-h0,QImage::Format_ARGB32);
- newPic->fill(QColor(0,0,0,0));
- //newPic->setColorTable(pic->getLayerAsQ(layerIndex1)->colorTable());
- QPainter painter(newPic);
- painter.drawImage(pic->xOffset(layerIndex2)-w0,pic->yOffset(layerIndex2)-h0,*pic->getLayerAsQ(layerIndex2));
- painter.drawImage(pic->xOffset(layerIndex1)-w0,pic->yOffset(layerIndex1)-h0,*pic->getLayerAsQ(layerIndex1));
- FloydSteiberg fs = FloydSteiberg();
- painter.end();
- QImage *newPic2 = fs.getIndexed(newPic,pic->getLayerAsQ(layerIndex1)->colorTable());
- /*if(width1>width2&&height1<height2){
- for (int i = width2; i < w1; i++){
- for (int j = height1; j < h1; j++){
- newPic2->setPixel(i,j,255);
- }
- }
- shaped=true;
- }
- if(width1<width2&&height1>height2){
- for (int i = width1; i < w1; i++){
- for (int j = height2; j < h1; j++){
- newPic2->setPixel(i,j,255);
- }
- }
- shaped=true;
- }*/
- /*int p1xa = pic->xOffset(layerIndex1)-w0;
- int p1xe = p1xa+width1;
- int p1ya = pic->yOffset(layerIndex1)-h0;
- int p1ye = p1ya+height1;
- int p2xa = pic->xOffset(layerIndex2)-w0;
- int p2xe = p2xa+width2;
- int p2ya = pic->yOffset(layerIndex2)-h0;
- int p2ye = p2ya+height2;
- QImage *p1 = pic->getLayerAsQ(layerIndex1);
- QImage *p2 = pic->getLayerAsQ(layerIndex2);
- bool s1=pic->isShaped(layerIndex1);
- bool s2=pic->isShaped(layerIndex2);
- QColor trans(0,0,0,0);
- for (int i = 0; i < w1+w2-w0; i++){
- for (int j = 0; j < h1+h2-h0; j++){
- /*if (newPic->pixelColor(i,j)==trans){
- newPic2->setPixel(i,j,255);
- shaped=true;
- }
- if(i<p1xa||i>=p1xe||j<p1ya||j>=p1ye){
- if (i<p2xa||i>=p2xe||j<p2ya||j>=p2ye){
- newPic2->setPixel(i,j,255);
- shaped=true;
- } else {
- if(s2&&p2->pixelIndex(i-p2xa,j-p2ya)==255){
- newPic2->setPixel(i,j,255);
- shaped=true;
- }
- }
-
- } else {
- if(i<p2xa||i>=p2xe||j<p2ya||j>=p2ye){
- if (s1&&p1->pixelIndex(i-p1xa,j-p1ya)==255){
- newPic2->setPixel(i,j,255);
- shaped=true;
- }
- } else {
- if (s1&&p1->pixelIndex(i-p1xa,j-p1ya)==255&&s2&&p2->pixelIndex(i-p2xa,j-p2ya)==255){
- newPic2->setPixel(i,j,255);
- shaped=true;
- }
- }
- }
-
-
- }
- }
- //shaped=true;
- /*if(width1>width2){
- if(height1>height2){
- //newPic = new QImage(*pic->getLayerAsQ(layerIndex1));
- //newPic->setColorTable(colorVect);
- newPic = new QImage(width1,height2,QImage::Format_Indexed8);
- newPic->setColorTable(colorVect);
- for (int i = 0; i < width1; i++){
- for (int j = 0; j < height1; j++){
- newPic->setPixel(i,j,pic->getLayerAsQ(layerIndex1)->pixelIndex(i,j));
- if(pic->getLayerAsQ(layerIndex1)->pixelIndex(i,j)==255&&(i<=width2&&j<height2)){
- newPic->setPixel(i,j,pic->getLayerAsQ(layerIndex2)->pixelIndex(i,j));
- }
- }
- }
- } else {
- shaped=true;
- newPic = new QImage(width1,height2,QImage::Format_Indexed8);
- newPic->setColorTable(colorVect);
- for (int i = 0; i < width1; i++){
- for (int j = 0; j < height1; j++){
- newPic->setPixel(i,j,pic->getLayerAsQ(layerIndex1)->pixelIndex(i,j));
- if(pic->getLayerAsQ(layerIndex1)->pixelIndex(i,j)==255&&i<=width2){
- newPic->setPixel(i,j,pic->getLayerAsQ(layerIndex2)->pixelIndex(i,j));
- }
- }
- for (int j = height1; j < height2; j++){
- newPic->setPixel(i,j,pic->getLayerAsQ(layerIndex2)->pixelIndex(i,j));
- if (i>=width2){
- newPic->setPixel(i,j,255);
- }
- }
- }
- }
- } else {
- if(height1>height2){
- newPic = new QImage(width2,height1,QImage::Format_Indexed8);
- newPic->setColorTable(colorVect);
- shaped=true;
- for (int j = 0; j < height1; j++){
- for (int i = 0; i < width1; i++){
- newPic->setPixel(i,j,pic->getLayerAsQ(layerIndex1)->pixelIndex(i,j));
- if(pic->getLayerAsQ(layerIndex1)->pixelIndex(i,j)==255&&j<=height2){
- newPic->setPixel(i,j,pic->getLayerAsQ(layerIndex2)->pixelIndex(i,j));
- }
- }
- for (int i = width1; i < width2; i++){
- newPic->setPixel(i,j,pic->getLayerAsQ(layerIndex2)->pixelIndex(i,j));
- if (j>=height2){
- newPic->setPixel(i,j,255);
- }
- }
-
- }
- } else {
- newPic = new QImage(width2,height2,QImage::Format_Indexed8);
- newPic->setColorTable(colorVect);
- for (int i = 0; i < width2; i++){
- for (int j = 0; j < height2; j++){
- if(i >=width1||j>=height1){
- newPic->setPixel(i,j,pic->getLayerAsQ(layerIndex2)->pixelIndex(i,j));
-
- } else {
- newPic->setPixel(i,j,pic->getLayerAsQ(layerIndex1)->pixelIndex(i,j));
- if(pic->getLayerAsQ(layerIndex1)->pixelIndex(i,j)==255){
- newPic->setPixel(i,j,pic->getLayerAsQ(layerIndex2)->pixelIndex(i,j));
- }
- }
- }
- }
- }
- }*/
- //QImage *newPic2 = new QImage(newPic->convertToFormat(QImage::Format_Indexed8,colorVect));
pic->addCurrentLayer(newPic2);
pic->setCurrentXOffset(xOffset);
pic->setCurrentYOffset(yOffset);
diff --git a/Implementation/GUI/tools/newLayer.cpp b/Implementation/GUI/tools/newLayer.cpp
index 76f5e7012c4cba39a17c67d03107319831a44a84..0189effa3bb2b57cca27df283b2ef7d501ec3dc3 100644
--- a/Implementation/GUI/tools/newLayer.cpp
+++ b/Implementation/GUI/tools/newLayer.cpp
@@ -12,10 +12,6 @@ bool NewLayer::initTool(toolParameters_t *param){
}
bool NewLayer::useTool(){
- //qPic->convertTo(QImage::Format_Indexed8,Qt::OrderedAlphaDither);
- //qPic->convertTo(QImage::Format_ARGB32,Qt::OrderedAlphaDither);
-
- //*qPic = qPic->convertToFormat(QImage::Format_Indexed8, colorVect, Qt::PreferDither);
FloydSteiberg fs = FloydSteiberg();
QImage *qPic2 = fs.getIndexed(qPic,colorVect);
delete qPic;
diff --git a/Implementation/GUI/tools/polygon.cpp b/Implementation/GUI/tools/polygon.cpp
index 8b1cbefaf4a50f2e39dd2bc925efd51fba69be1c..a9c96f8b6420046cd46be12ad274f19e7b8cbac4 100644
--- a/Implementation/GUI/tools/polygon.cpp
+++ b/Implementation/GUI/tools/polygon.cpp
@@ -12,16 +12,10 @@ bool PolygonTool::initTool(toolParameters_t *param){
}
bool PolygonTool::useTool(){
- //QPainter painter(pic->getCurrentLayerAsQ());
QImage tempImage = QImage(pic->getCurrentLayerAsQ()->width(), pic->getCurrentLayerAsQ()->height(), QImage::Format_ARGB32);
tempImage.fill(QColor(0,0,0,0));
QPainter painter(&tempImage);
QImage *qPic = pic->getCurrentLayer()->qImage;
- /*for(int i = -5; i <= 5; i++){
- for(int j = -5; j <= 5; j++){
- qPic->setPixel(point+QPoint(i,j),2);
- }
- }*/
QBrush pen(QColor(255,255,255,255));
painter.setBrush(pen);
painter.drawPolygon(poly);
diff --git a/Implementation/GUI/tools/translationTool.cpp b/Implementation/GUI/tools/translationTool.cpp
index b68a15a4dba3ae53e4e9a8a00ceee36ab487fa38..578b2d406e09625183374ccb3ec3b56fe2930927 100644
--- a/Implementation/GUI/tools/translationTool.cpp
+++ b/Implementation/GUI/tools/translationTool.cpp
@@ -12,7 +12,6 @@ bool TranslationTool::initTool(toolParameters_t *param){
bool TranslationTool::useTool(){
QImage *qPic = new QImage(pic->getCurrentLayerAsQ()->transformed(mat));
- //qPic->setColorTable(colorVect);
bool shaped = pic->isShaped();
int xOffset=pic->currentXOffset();
int yOffset=pic->currentYOffset();
@@ -21,7 +20,6 @@ bool TranslationTool::useTool(){
}
QImage *qPic2 = new QImage(qPic->convertToFormat(QImage::Format_Indexed8,colorVect));
- //qPic2->setColorTable(colorVect);
if(isRot){
QPolygon poly = mat.mapToPolygon(QRect(0,0,pic->getCurrentLayerAsQ()->width(),pic->getCurrentLayerAsQ()->height()));
int x[4]={poly.point(0).x(),poly.point(1).x(),poly.point(2).x(),poly.point(3).x()};
diff --git a/Implementation/build-imageviewer-Desktop-Debug/Makefile b/Implementation/build-imageviewer-Desktop-Debug/Makefile
index a1908298898c91d6d575b956097f8d4b2a44650b..7d89c3d96e2c6bed8a91f6cefa6287a3ecce7324 100644
--- a/Implementation/build-imageviewer-Desktop-Debug/Makefile
+++ b/Implementation/build-imageviewer-Desktop-Debug/Makefile
@@ -233,7 +233,6 @@ DIST = /usr/lib/qt/mkspecs/features/spec_pre.prf \
../GUI/Picture.h \
../GUI/Tool.h \
../GUI/TranslationDock.h \
- ../GUI/main.h \
../GUI/tools/drawTool.h \
../GUI/tools/floydSteinberg.h \
../GUI/tools/merge.h \
@@ -538,7 +537,7 @@ distdir: FORCE
@test -d $(DISTDIR) || mkdir -p $(DISTDIR)
$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
$(COPY_FILE) --parents /usr/lib/qt/mkspecs/features/data/dummy.cpp $(DISTDIR)/
- $(COPY_FILE) --parents ../GUI/imageviewer.h ../GUI/ColorDock.h ../GUI/DrawDock.h ../GUI/InteractionTool.h ../GUI/LayerDock.h ../GUI/ManipulationTool.h ../GUI/NewLayerDock.h ../GUI/Picture.h ../GUI/Tool.h ../GUI/TranslationDock.h ../GUI/main.h ../GUI/tools/drawTool.h ../GUI/tools/floydSteinberg.h ../GUI/tools/merge.h ../GUI/tools/movetool.h ../GUI/tools/newLayer.h ../GUI/tools/polygon.h ../GUI/tools/translationTool.h $(DISTDIR)/
+ $(COPY_FILE) --parents ../GUI/imageviewer.h ../GUI/ColorDock.h ../GUI/DrawDock.h ../GUI/InteractionTool.h ../GUI/LayerDock.h ../GUI/ManipulationTool.h ../GUI/NewLayerDock.h ../GUI/Picture.h ../GUI/Tool.h ../GUI/TranslationDock.h ../GUI/tools/drawTool.h ../GUI/tools/floydSteinberg.h ../GUI/tools/merge.h ../GUI/tools/movetool.h ../GUI/tools/newLayer.h ../GUI/tools/polygon.h ../GUI/tools/translationTool.h $(DISTDIR)/
$(COPY_FILE) --parents ../GUI/imageviewer.cpp ../GUI/ColorDock.cpp ../GUI/DrawDock.cpp ../GUI/InteractionTool.cpp ../GUI/LayerDock.cpp ../GUI/ManipulationTool.cpp ../GUI/NewLayerDock.cpp ../GUI/Picture.cpp ../GUI/TranslationDock.cpp ../GUI/main.cpp ../GUI/tools/drawTool.cpp ../GUI/tools/floydSteinberg.cpp ../GUI/tools/merge.cpp ../GUI/tools/movetool.cpp ../GUI/tools/newLayer.cpp ../GUI/tools/polygon.cpp ../GUI/tools/translationTool.cpp $(DISTDIR)/
diff --git a/Implementation/build-imageviewer-Desktop-Debug/TranslationDock.o b/Implementation/build-imageviewer-Desktop-Debug/TranslationDock.o
index 26d666ef89d810e460d1df47f244726e9118a632..ec81bd6fa9f905717964ca45821270959493b9c1 100644
Binary files a/Implementation/build-imageviewer-Desktop-Debug/TranslationDock.o and b/Implementation/build-imageviewer-Desktop-Debug/TranslationDock.o differ
diff --git a/Implementation/build-imageviewer-Desktop-Debug/drawTool.o b/Implementation/build-imageviewer-Desktop-Debug/drawTool.o
index 2bbf83c8686a017b527beb5c1d1017ed2ae0d17d..126ebe954b4ae597b9bb9c3e3cd5f7264fcfd347 100644
Binary files a/Implementation/build-imageviewer-Desktop-Debug/drawTool.o and b/Implementation/build-imageviewer-Desktop-Debug/drawTool.o differ
diff --git a/Implementation/build-imageviewer-Desktop-Debug/imageviewer b/Implementation/build-imageviewer-Desktop-Debug/imageviewer
index 4eda79d87f4e47e6050294d5554e053072dab27e..216c4d86ddc0e442110ba89dc2638ccc3e30fe18 100755
Binary files a/Implementation/build-imageviewer-Desktop-Debug/imageviewer and b/Implementation/build-imageviewer-Desktop-Debug/imageviewer differ
diff --git a/Implementation/build-imageviewer-Desktop-Debug/imageviewer.o b/Implementation/build-imageviewer-Desktop-Debug/imageviewer.o
index d0b8e7a87a55dc8556c774416f837a05a421fd8f..5cef22dfd9537a5baec2ee86e700e24433a0f68b 100644
Binary files a/Implementation/build-imageviewer-Desktop-Debug/imageviewer.o and b/Implementation/build-imageviewer-Desktop-Debug/imageviewer.o differ
diff --git a/Implementation/build-imageviewer-Desktop-Debug/main.o b/Implementation/build-imageviewer-Desktop-Debug/main.o
index d9d292b5b3e351c1e8e792e5299a7bc13caab6c8..9102b594aaedec48f4366596bb62ca2d64ede529 100644
Binary files a/Implementation/build-imageviewer-Desktop-Debug/main.o and b/Implementation/build-imageviewer-Desktop-Debug/main.o differ
diff --git a/Implementation/build-imageviewer-Desktop-Debug/merge.o b/Implementation/build-imageviewer-Desktop-Debug/merge.o
index e137cd64d5f386e5fd877daea3541be1f69bb2a2..cc16a575f2ee98cfd412b735a81e91cad36fcf2f 100644
Binary files a/Implementation/build-imageviewer-Desktop-Debug/merge.o and b/Implementation/build-imageviewer-Desktop-Debug/merge.o differ
diff --git a/Implementation/build-imageviewer-Desktop-Debug/moc_imageviewer.o b/Implementation/build-imageviewer-Desktop-Debug/moc_imageviewer.o
index fce7457547e25e59e7fc9883d1d311d78c11903c..187adac4e26ddd8ac0216c21acfabc27929674bf 100644
Binary files a/Implementation/build-imageviewer-Desktop-Debug/moc_imageviewer.o and b/Implementation/build-imageviewer-Desktop-Debug/moc_imageviewer.o differ
diff --git a/Implementation/build-imageviewer-Desktop-Debug/newLayer.o b/Implementation/build-imageviewer-Desktop-Debug/newLayer.o
index fe8361585e93c2e6ade4832200975d09c8fe3a31..d27d065b22d6dea3650c878372509128de66bd79 100644
Binary files a/Implementation/build-imageviewer-Desktop-Debug/newLayer.o and b/Implementation/build-imageviewer-Desktop-Debug/newLayer.o differ
diff --git a/Implementation/build-imageviewer-Desktop-Debug/polygon.o b/Implementation/build-imageviewer-Desktop-Debug/polygon.o
index 24f846f85dcfc7deac8e5db53189b9ec9d0352e9..89c724513213200b3d85ed97285364d5660ab91d 100644
Binary files a/Implementation/build-imageviewer-Desktop-Debug/polygon.o and b/Implementation/build-imageviewer-Desktop-Debug/polygon.o differ
diff --git a/Implementation/build-imageviewer-Desktop-Debug/translationTool.o b/Implementation/build-imageviewer-Desktop-Debug/translationTool.o
index 3b3780d4391b0f2c9ad3d621b6be69c970a0c615..8a54d104999d59b4e7c074ba6ec7118856241e45 100644
Binary files a/Implementation/build-imageviewer-Desktop-Debug/translationTool.o and b/Implementation/build-imageviewer-Desktop-Debug/translationTool.o differ
diff --git a/Implementation/build-imageviewer-Desktop-Release/Makefile b/Implementation/build-imageviewer-Desktop-Release/Makefile
index 16b3104ff838c44bc54b4ce3a5104c2963b10d45..447e784bd248fa3d901811b5ffc43842ba780d6f 100644
--- a/Implementation/build-imageviewer-Desktop-Release/Makefile
+++ b/Implementation/build-imageviewer-Desktop-Release/Makefile
@@ -203,6 +203,7 @@ DIST = /usr/lib/qt/mkspecs/features/spec_pre.prf \
/usr/lib/qt/mkspecs/features/qt_config.prf \
/usr/lib/qt/mkspecs/linux-g++/qmake.conf \
/usr/lib/qt/mkspecs/features/spec_post.prf \
+ ../GUI/.qmake.stash \
/usr/lib/qt/mkspecs/features/exclusive_builds.prf \
/usr/lib/qt/mkspecs/features/toolchain.prf \
/usr/lib/qt/mkspecs/features/default_pre.prf \
@@ -232,7 +233,6 @@ DIST = /usr/lib/qt/mkspecs/features/spec_pre.prf \
../GUI/Picture.h \
../GUI/Tool.h \
../GUI/TranslationDock.h \
- ../GUI/main.h \
../GUI/tools/drawTool.h \
../GUI/tools/floydSteinberg.h \
../GUI/tools/merge.h \
@@ -373,6 +373,7 @@ Makefile: ../GUI/imageviewer.pro /usr/lib/qt/mkspecs/linux-g++/qmake.conf /usr/l
/usr/lib/qt/mkspecs/features/qt_config.prf \
/usr/lib/qt/mkspecs/linux-g++/qmake.conf \
/usr/lib/qt/mkspecs/features/spec_post.prf \
+ .qmake.stash \
/usr/lib/qt/mkspecs/features/exclusive_builds.prf \
/usr/lib/qt/mkspecs/features/toolchain.prf \
/usr/lib/qt/mkspecs/features/default_pre.prf \
@@ -500,6 +501,7 @@ Makefile: ../GUI/imageviewer.pro /usr/lib/qt/mkspecs/linux-g++/qmake.conf /usr/l
/usr/lib/qt/mkspecs/features/qt_config.prf:
/usr/lib/qt/mkspecs/linux-g++/qmake.conf:
/usr/lib/qt/mkspecs/features/spec_post.prf:
+.qmake.stash:
/usr/lib/qt/mkspecs/features/exclusive_builds.prf:
/usr/lib/qt/mkspecs/features/toolchain.prf:
/usr/lib/qt/mkspecs/features/default_pre.prf:
@@ -535,7 +537,7 @@ distdir: FORCE
@test -d $(DISTDIR) || mkdir -p $(DISTDIR)
$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
$(COPY_FILE) --parents /usr/lib/qt/mkspecs/features/data/dummy.cpp $(DISTDIR)/
- $(COPY_FILE) --parents ../GUI/imageviewer.h ../GUI/ColorDock.h ../GUI/DrawDock.h ../GUI/InteractionTool.h ../GUI/LayerDock.h ../GUI/ManipulationTool.h ../GUI/NewLayerDock.h ../GUI/Picture.h ../GUI/Tool.h ../GUI/TranslationDock.h ../GUI/main.h ../GUI/tools/drawTool.h ../GUI/tools/floydSteinberg.h ../GUI/tools/merge.h ../GUI/tools/movetool.h ../GUI/tools/newLayer.h ../GUI/tools/polygon.h ../GUI/tools/translationTool.h $(DISTDIR)/
+ $(COPY_FILE) --parents ../GUI/imageviewer.h ../GUI/ColorDock.h ../GUI/DrawDock.h ../GUI/InteractionTool.h ../GUI/LayerDock.h ../GUI/ManipulationTool.h ../GUI/NewLayerDock.h ../GUI/Picture.h ../GUI/Tool.h ../GUI/TranslationDock.h ../GUI/tools/drawTool.h ../GUI/tools/floydSteinberg.h ../GUI/tools/merge.h ../GUI/tools/movetool.h ../GUI/tools/newLayer.h ../GUI/tools/polygon.h ../GUI/tools/translationTool.h $(DISTDIR)/
$(COPY_FILE) --parents ../GUI/imageviewer.cpp ../GUI/ColorDock.cpp ../GUI/DrawDock.cpp ../GUI/InteractionTool.cpp ../GUI/LayerDock.cpp ../GUI/ManipulationTool.cpp ../GUI/NewLayerDock.cpp ../GUI/Picture.cpp ../GUI/TranslationDock.cpp ../GUI/main.cpp ../GUI/tools/drawTool.cpp ../GUI/tools/floydSteinberg.cpp ../GUI/tools/merge.cpp ../GUI/tools/movetool.cpp ../GUI/tools/newLayer.cpp ../GUI/tools/polygon.cpp ../GUI/tools/translationTool.cpp $(DISTDIR)/
diff --git a/Implementation/build-imageviewer-Desktop-Release/imageviewer.o b/Implementation/build-imageviewer-Desktop-Release/imageviewer.o
index 80f36ffceb16d7a0db6c2a51b1da5c4bf9f405a9..174cffa4bf0476a32b9e060e5da0577b99cefdf9 100644
Binary files a/Implementation/build-imageviewer-Desktop-Release/imageviewer.o and b/Implementation/build-imageviewer-Desktop-Release/imageviewer.o differ
diff --git a/Implementation/build-imageviewer-Desktop-Release/main.o b/Implementation/build-imageviewer-Desktop-Release/main.o
index dcd3a43ace2292c9ac5374f2b7f77e4e43511b8c..98aece804140c962ab3ba62a5881d8fcbbbabc36 100644
Binary files a/Implementation/build-imageviewer-Desktop-Release/main.o and b/Implementation/build-imageviewer-Desktop-Release/main.o differ
diff --git a/Implementation/build-imageviewer-Desktop-Release/moc_imageviewer.o b/Implementation/build-imageviewer-Desktop-Release/moc_imageviewer.o
index d1beddb05b01b8446f8d351094cd0e920bd714ae..37f7c8b6112ffbae2f58f16446f530982b273839 100644
Binary files a/Implementation/build-imageviewer-Desktop-Release/moc_imageviewer.o and b/Implementation/build-imageviewer-Desktop-Release/moc_imageviewer.o differ