screenshot supports rotation angle now.
Change-Id: Id0d85ee621d8b4870697babbb576e77790c7a51e
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
obj-$(CONFIG_QT) += screenshot.o moc_screenshot.o
obj-$(CONFIG_QT) += detailedinfodialog.o moc_detailedinfodialog.o
obj-$(CONFIG_QT) += contextmenu.o moc_contextmenu.o
-obj-$(CONFIG_QT) += screenshotview.o moc_screenshotview.o
+obj-$(CONFIG_QT) += screenshotview.o
$(obj)/moc_aboutdialog.o: $(obj)/moc_aboutdialog.cpp
$(obj)/moc_aboutdialog.cpp: $(obj)/aboutdialog.h
$(obj)/moc_screenshot.o: $(obj)/moc_screenshot.cpp
$(obj)/moc_screenshot.cpp: $(obj)/screenshot.h
moc $< -o $@
-$(obj)/moc_screenshotview.o: $(obj)/moc_screenshotview.cpp
-$(obj)/moc_screenshotview.cpp: $(obj)/screenshotview.h
- moc $< -o $@
\ No newline at end of file
+/*
+ * Qt Screenshot
+ *
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Munkyu Im <munkyu.im@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
#include <QtWidgets>
#include <qtoolbutton.h>
#include "screenshot.h"
ratioStr = "100%";
slider->setValue(3);
scene->clear();
+
+ QMatrix rm;
+ rm.rotate(getRotateAngle());
+ screenshotPixmap = screenshotPixmap.transformed(rm);
scene->addPixmap(screenshotPixmap);
slider->setToolTip(ratioStr);
-
}
void Screenshot::setStatusBar(qreal posX, qreal posY) {
}
}
+int Screenshot::getRotateAngle() {
+ int rotateAngle = ((MainWindow *)(this->parent()->parent()))->getUIState()->mainFormAngle;
+ qDebug("rotaedAngle: %d", rotateAngle);
+ return rotateAngle;
+}
+
void Screenshot::makeWidgets() {
toolbar = new QToolBar(this);
scene = new QGraphicsScene(this);
qDebug() << screenshotPixmap;
+
+ QMatrix rm;
+ rm.rotate(getRotateAngle());
+ screenshotPixmap = screenshotPixmap.transformed(rm);
scene->addPixmap(screenshotPixmap);
view = new ScreenshotView(scene, this);
+/*
+ * Qt Screenshot
+ *
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Munkyu Im <munkyu.im@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
#ifndef SCREENSHOT_H
#define SCREENSHOT_H
void setImage();
void setRatio(int level);
void updateStatusBar();
+ int getRotateAngle();
QString posX;
+/*
+ * Qt Screenshot
+ *
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Munkyu Im <munkyu.im@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
#include "screenshotview.h"
#include "screenshot.h"
-#ifndef SCREENSHOTIMAGE_H
-#define SCREENSHOTIMAGE_H
+/*
+ * Qt Screenshot
+ *
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Munkyu Im <munkyu.im@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#ifndef SCREENSHOTVIEW_H
+#define SCREENSHOTVIEW_H
#include <QtWidgets>