From: GiWoong Kim Date: Tue, 3 Mar 2015 02:49:00 +0000 (+0900) Subject: menu: modified screenshot class name X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~560 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1c9b8a8fab423c0666cdd6a51c14db265fec364;p=sdk%2Femulator%2Fqemu.git menu: modified screenshot class name Screenshot -> ScreenShotDialog Change-Id: I516cfffbf5973a4c5abe140498e66332a587b63f Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/ui/menu/Makefile.objs b/tizen/src/ui/menu/Makefile.objs index 087c0405f4..bb9a371fed 100644 --- a/tizen/src/ui/menu/Makefile.objs +++ b/tizen/src/ui/menu/Makefile.objs @@ -1,5 +1,5 @@ obj-$(CONFIG_QT) += aboutdialog.o moc_aboutdialog.o -obj-$(CONFIG_QT) += screenshot.o moc_screenshot.o +obj-$(CONFIG_QT) += screenshotdialog.o moc_screenshotdialog.o obj-$(CONFIG_QT) += detailedinfodialog.o moc_detailedinfodialog.o obj-$(CONFIG_QT) += contextmenu.o moc_contextmenu.o obj-$(CONFIG_QT) += menuitem.o @@ -16,6 +16,6 @@ $(obj)/moc_detailedinfodialog.cpp: $(obj)/detailedinfodialog.h $(obj)/moc_contextmenu.o: $(obj)/moc_contextmenu.cpp $(obj)/moc_contextmenu.cpp: $(obj)/contextmenu.h moc $< -o $@ -$(obj)/moc_screenshot.o: $(obj)/moc_screenshot.cpp -$(obj)/moc_screenshot.cpp: $(obj)/screenshot.h +$(obj)/moc_screenshotdialog.o: $(obj)/moc_screenshotdialog.cpp +$(obj)/moc_screenshotdialog.cpp: $(obj)/screenshotdialog.h moc $< -o $@ diff --git a/tizen/src/ui/menu/contextmenu.cpp b/tizen/src/ui/menu/contextmenu.cpp index ec22e1f115..7426ebc51e 100644 --- a/tizen/src/ui/menu/contextmenu.cpp +++ b/tizen/src/ui/menu/contextmenu.cpp @@ -733,7 +733,7 @@ void ContextMenu::slotShowScreenshot(const QPixmap &screenshot) qDebug("show screenshot"); if (screenshotDialog == NULL) { - screenshotDialog = new Screenshot(parent, screenshot); + screenshotDialog = new ScreenShotDialog(parent, screenshot); } screenshotDialog->slotRefresh(screenshot); diff --git a/tizen/src/ui/menu/contextmenu.h b/tizen/src/ui/menu/contextmenu.h index bc6896904e..7d48f21c2c 100644 --- a/tizen/src/ui/menu/contextmenu.h +++ b/tizen/src/ui/menu/contextmenu.h @@ -35,7 +35,7 @@ #include "detailedinfodialog.h" #include "aboutdialog.h" -#include "screenshot.h" +#include "screenshotdialog.h" #include "menu/menuitem.h" class MainWindow; @@ -60,7 +60,7 @@ public: QSignalMapper *getScaleMapper(); QSignalMapper *getControllerMapper(); - Screenshot *screenshotDialog; + ScreenShotDialog *screenshotDialog; signals: diff --git a/tizen/src/ui/menu/screenshot.cpp b/tizen/src/ui/menu/screenshot.cpp deleted file mode 100644 index 9ca468ebf8..0000000000 --- a/tizen/src/ui/menu/screenshot.cpp +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Qt Screenshot - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Munkyu Im - * Sangho Park - * - * 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 - -#include "screenshot.h" -#include "screenshotview.h" -#include "mainwindow.h" - -Screenshot::Screenshot(QWidget *parent, const QPixmap &pixmap) : - QDialog(parent), screenshotPixmap(pixmap) -{ - this->win = (MainWindow *)parent; - - setWindowTitle("Screen Shot - " + win->uiInfo->vmName + - " : " + QString::number(get_device_serial_number())); - setWindowIcon(QIcon(":/icons/screen_shot.png")); - - createItems(); - - setImage(); - - toolbar->addAction(saveAct); - toolbar->addAction(copyAct); - toolbar->addAction(refreshAct); - toolbar->addSeparator(); - toolbar->addWidget(slider); - gridlayout->addWidget(toolbar, 0, 0); - gridlayout->addWidget(view, 1, 0); - gridlayout->addWidget(statusBar, 2, 0); - - setLayout(gridlayout); - - resize(win->uiInfo->getMainSize()); -} - -void Screenshot::slotCopy() -{ - qDebug("copy to clipboard"); - - QClipboard* clipboard = QApplication::clipboard(); - QPixmap pixmap(screenshotPixmap); - clipboard->clear(); - clipboard->setPixmap(pixmap); -} - -QString Screenshot::getRatio() -{ - return ratioStr; -} - -void Screenshot::setRatio(int level) -{ - switch (level) { - case 0: - ratio = 0.125; - break; - case 1: - ratio = 0.25; - break; - case 2: - ratio = 0.50; - break; - case 3: - ratio = 1; - break; - case 4: - ratio = 2; - break; - case 5: - ratio = 4; - break; - } - ratioStr = QString::number(ratio * 100).append("%"); -} - -void Screenshot::slotScaleChanged(int level) -{ - qDebug("scale changed: %d", level); - - sliderLevel = level; - QPixmap pixmap(screenshotPixmap); - setRatio(level); - scene->clear(); - scene->addPixmap(pixmap.scaled(pixmap.size() * ratio, - Qt::KeepAspectRatio, Qt::FastTransformation)); - slider->setToolTip(ratioStr); - - updateStatusBar(); -} - -int Screenshot::getSliderLevel() -{ - return sliderLevel; -} - -void Screenshot::slotRefresh(const QPixmap &pixmap) -{ - qDebug("refresh"); - - this->frameBuf = pixmap; - - ratioStr = "100%"; - sliderLevel = 3; - slider->setValue(3); - scene->clear(); - - // TODO: once - QMatrix rm; - rm.rotate(getRotateAngle()); - screenshotPixmap = screenshotPixmap.transformed(rm); - scene->addPixmap(screenshotPixmap); - slider->setToolTip(ratioStr); -} - -void Screenshot::setStatusBar(qreal xx, qreal yy) -{ - posX = QString::number(xx); - posY = QString::number(yy); - - updateStatusBar(); -} - -void Screenshot::updateStatusBar() -{ - statusBar->showMessage("x: " + posX + ", y:" + posY + - " (" + QString::number(screenshotPixmap.width()) + - "x" + QString::number(screenshotPixmap.height()) + - ", " + qPrintable(getRatio()) + ")"); -} - -bool Screenshot::slotSave() -{ - qDebug("save"); - - QString vmname = win->uiInfo->vmName; - QDateTime currentDateTime = QDateTime::currentDateTime(); - QString date = currentDateTime.toString("yyyy-MM-dd-HHmmss"); - QString filePath = QDir::homePath() + QDir::separator() + vmname + "-" + date + ".png"; - QString filterName = "Image files (*.png *.jpg *.jpeg *.bmp *.ppm *.xbm *.xpm);;" - "All files (*.*)"; - QString filename = QFileDialog::getSaveFileName(this, "Save Image", filePath, filterName); - - if (filename.isEmpty()) { - qDebug("can not have file"); - return false; - } else { - QPixmap pixmap(screenshotPixmap); - qDebug() << filename; - pixmap.save(filename); - } - - return true; -} - -int Screenshot::getRotateAngle() -{ - return win->uiInfo->getMainFormDisplayType()->getAngle(); -} - -void Screenshot::createItems() -{ - statusBar = new QStatusBar(this); - toolbar = new QToolBar(this); - - slider = new QSlider(Qt::Horizontal, this); - slider->setTickPosition(QSlider::TicksAbove); - slider->setRange(0, 5); - slider->setValue(3); - sliderLevel = 3; - slider->setFixedWidth(100); - slider->setToolTip("100%"); - connect(slider, SIGNAL(valueChanged(int)), this, SLOT(slotScaleChanged(int))); - - gridlayout = new QGridLayout(this); - gridlayout->setContentsMargins(0, 0, 0, 0); - - saveAct = new QAction(tr("&Save"), this); - saveAct->setShortcuts(QKeySequence::Save); - saveAct->setIcon(QIcon(":/icons/save_screenshot_dialog.png")); - saveAct->setToolTip("Save to file"); - connect(saveAct, SIGNAL(triggered()), this, SLOT(slotSave())); - - copyAct = new QAction(tr("&Copy"), this); - copyAct->setShortcuts(QKeySequence::Copy); - copyAct->setIcon(QIcon(":/icons/copy_screenshot_dialog.png")); - copyAct->setToolTip("Copy to clipboard"); - connect(copyAct, SIGNAL(triggered()), this, SLOT(slotCopy())); - - refreshAct = new QAction(tr("&Refresh"), this); - refreshAct->setShortcuts(QKeySequence::Refresh); - refreshAct->setIcon(QIcon(":/icons/refresh_screenshot_dialog.png")); - refreshAct->setToolTip("Refresh Image"); - connect(refreshAct, SIGNAL(triggered()), - win->getPopupMenu(), SLOT(slotRequestScreenshot())); -} - -void Screenshot::setImage() -{ - scene = new QGraphicsScene(this); - - qDebug() << screenshotPixmap; - - QMatrix rm; - rm.rotate(getRotateAngle()); - screenshotPixmap = screenshotPixmap.transformed(rm); - scene->addPixmap(screenshotPixmap); - - view = new ScreenshotView(scene, this); - ratioStr = "100%"; - view->setScene(scene); - view->setMouseTracking(true); - - QScrollArea *area = new QScrollArea(this); - area->setFixedSize(screenshotPixmap.width(), screenshotPixmap.height()); - view->setCornerWidget(area); - view->verticalScrollBar()->setValue(1); - view->horizontalScrollBar()->setValue(1); -} - -void Screenshot::showEvent(QShowEvent *event) -{ - Q_UNUSED(event) - - // TODO: - move(win->geometry().center().x(), - win->geometry().center().y() - (geometry().size().height() / 2)); -} - -Screenshot::~Screenshot() -{ - qDebug("destroy screenshot dialog"); - - win->getPopupMenu()->screenshotDialog = NULL; -} diff --git a/tizen/src/ui/menu/screenshot.h b/tizen/src/ui/menu/screenshot.h deleted file mode 100644 index bd1c0ff45b..0000000000 --- a/tizen/src/ui/menu/screenshot.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Qt Screenshot - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Munkyu Im - * Sangho Park - * - * 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 - -#include - -class MainWindow; - -class Screenshot : public QDialog -{ - Q_OBJECT - -public: - explicit Screenshot(QWidget *parent, const QPixmap &screenshot); - ~Screenshot(); - - void setStatusBar(qreal xx, qreal yy); - int getSliderLevel(); - int getRotateAngle(); - QString getRatio(); - - QPixmap frameBuf; - -public slots: - void slotRefresh(const QPixmap &); - -protected: - void showEvent(QShowEvent *event); - QGraphicsScene* scene; - -private: - void createItems(); - void setImage(); - void setRatio(int level); - void updateStatusBar(); - - MainWindow *win; - QString posX; - QString posY; - QGridLayout *gridlayout; - QGraphicsView* view; - int sliderLevel; - QLabel *label; - QSlider *slider; - QPixmap screenshotPixmap; - QToolBar *toolbar; - - QStatusBar *statusBar; - QMenu *fileMenu; - QMenu *editMenu; - QMenu *helpMenu; - QToolBar *toolBar; - float ratio; - QString ratioStr; - QAction *saveAct; - QAction *copyAct; - QAction *refreshAct; - -private slots: - bool slotSave(); - void slotCopy(); - void slotScaleChanged(int level); -}; - -#endif // SCREENSHOT_H diff --git a/tizen/src/ui/menu/screenshotdialog.cpp b/tizen/src/ui/menu/screenshotdialog.cpp new file mode 100644 index 0000000000..0fb1c811fa --- /dev/null +++ b/tizen/src/ui/menu/screenshotdialog.cpp @@ -0,0 +1,262 @@ +/* + * Qt Screenshot + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Munkyu Im + * GiWoong Kim + * Sangho Park + * + * 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 + +#include "screenshotdialog.h" +#include "screenshotview.h" +#include "mainwindow.h" + +ScreenShotDialog::ScreenShotDialog(QWidget *parent, const QPixmap &pixmap) : + QDialog(parent), screenshotPixmap(pixmap) +{ + this->win = (MainWindow *)parent; + + setWindowTitle("Screen Shot - " + win->uiInfo->vmName + + " : " + QString::number(get_device_serial_number())); + setWindowIcon(QIcon(":/icons/screen_shot.png")); + + createItems(); + + setImage(); + + toolbar->addAction(saveAct); + toolbar->addAction(copyAct); + toolbar->addAction(refreshAct); + toolbar->addSeparator(); + toolbar->addWidget(slider); + gridlayout->addWidget(toolbar, 0, 0); + gridlayout->addWidget(view, 1, 0); + gridlayout->addWidget(statusBar, 2, 0); + + setLayout(gridlayout); + + resize(win->uiInfo->getMainSize()); +} + +void ScreenShotDialog::createItems() +{ + statusBar = new QStatusBar(this); + toolbar = new QToolBar(this); + + slider = new QSlider(Qt::Horizontal, this); + slider->setTickPosition(QSlider::TicksAbove); + slider->setRange(0, 5); + slider->setValue(3); + sliderLevel = 3; + slider->setFixedWidth(100); + slider->setToolTip("100%"); + connect(slider, SIGNAL(valueChanged(int)), this, SLOT(slotScaleChanged(int))); + + gridlayout = new QGridLayout(this); + gridlayout->setContentsMargins(0, 0, 0, 0); + + saveAct = new QAction(tr("&Save"), this); + saveAct->setShortcuts(QKeySequence::Save); + saveAct->setIcon(QIcon(":/icons/save_screenshot_dialog.png")); + saveAct->setToolTip("Save to file"); + connect(saveAct, SIGNAL(triggered()), this, SLOT(slotSave())); + + copyAct = new QAction(tr("&Copy"), this); + copyAct->setShortcuts(QKeySequence::Copy); + copyAct->setIcon(QIcon(":/icons/copy_screenshot_dialog.png")); + copyAct->setToolTip("Copy to clipboard"); + connect(copyAct, SIGNAL(triggered()), this, SLOT(slotCopy())); + + refreshAct = new QAction(tr("&Refresh"), this); + refreshAct->setShortcuts(QKeySequence::Refresh); + refreshAct->setIcon(QIcon(":/icons/refresh_screenshot_dialog.png")); + refreshAct->setToolTip("Refresh Image"); + connect(refreshAct, SIGNAL(triggered()), + win->getPopupMenu(), SLOT(slotRequestScreenshot())); +} + +void ScreenShotDialog::setImage() +{ + scene = new QGraphicsScene(this); + + qDebug() << screenshotPixmap; + + QMatrix rm; + rm.rotate(getRotateAngle()); + screenshotPixmap = screenshotPixmap.transformed(rm); + scene->addPixmap(screenshotPixmap); + + view = new ScreenShotView(scene, this); + ratioStr = "100%"; + view->setScene(scene); + view->setMouseTracking(true); + + QScrollArea *area = new QScrollArea(this); + area->setFixedSize(screenshotPixmap.width(), screenshotPixmap.height()); + view->setCornerWidget(area); + view->verticalScrollBar()->setValue(1); + view->horizontalScrollBar()->setValue(1); +} + +int ScreenShotDialog::getRotateAngle() +{ + return win->uiInfo->getMainFormDisplayType()->getAngle(); +} + +QString ScreenShotDialog::getRatio() +{ + return ratioStr; +} + +void ScreenShotDialog::setRatio(int level) +{ + switch (level) { + case 0: + ratio = 0.125; + break; + case 1: + ratio = 0.25; + break; + case 2: + ratio = 0.50; + break; + case 3: + ratio = 1; + break; + case 4: + ratio = 2; + break; + case 5: + ratio = 4; + break; + } + ratioStr = QString::number(ratio * 100).append("%"); +} + +int ScreenShotDialog::getSliderLevel() +{ + return sliderLevel; +} + +bool ScreenShotDialog::slotSave() +{ + qDebug("save"); + + QString vmname = win->uiInfo->vmName; + QDateTime currentDateTime = QDateTime::currentDateTime(); + QString date = currentDateTime.toString("yyyy-MM-dd-HHmmss"); + QString filePath = QDir::homePath() + QDir::separator() + vmname + "-" + date + ".png"; + QString filterName = "Image files (*.png *.jpg *.jpeg *.bmp *.ppm *.xbm *.xpm);;" + "All files (*.*)"; + QString filename = QFileDialog::getSaveFileName(this, "Save Image", filePath, filterName); + + if (filename.isEmpty()) { + qDebug("can not have file"); + return false; + } + + QPixmap pixmap(screenshotPixmap); + qDebug() << filename; + pixmap.save(filename); + + return true; +} + +void ScreenShotDialog::slotCopy() +{ + qDebug("copy to clipboard"); + + QClipboard* clipboard = QApplication::clipboard(); + QPixmap pixmap(screenshotPixmap); + clipboard->clear(); + clipboard->setPixmap(pixmap); +} + +void ScreenShotDialog::slotRefresh(const QPixmap &pixmap) +{ + qDebug("refresh"); + + frameBuf = pixmap; + + ratioStr = "100%"; + sliderLevel = 3; + slider->setValue(3); + scene->clear(); + + // TODO: once + QMatrix rm; + rm.rotate(getRotateAngle()); + screenshotPixmap = screenshotPixmap.transformed(rm); + scene->addPixmap(screenshotPixmap); + slider->setToolTip(ratioStr); +} + +void ScreenShotDialog::slotScaleChanged(int level) +{ + qDebug("scale changed: %d", level); + + sliderLevel = level; + QPixmap pixmap(screenshotPixmap); + setRatio(level); + scene->clear(); + scene->addPixmap(pixmap.scaled(pixmap.size() * ratio, + Qt::KeepAspectRatio, Qt::FastTransformation)); + slider->setToolTip(ratioStr); + + updateStatusBar(); +} + +void ScreenShotDialog::setStatusBar(qreal xx, qreal yy) +{ + posX = QString::number(xx); + posY = QString::number(yy); + + updateStatusBar(); +} + +void ScreenShotDialog::updateStatusBar() +{ + statusBar->showMessage("x: " + posX + ", y:" + posY + + " (" + QString::number(screenshotPixmap.width()) + + "x" + QString::number(screenshotPixmap.height()) + + ", " + qPrintable(getRatio()) + ")"); +} + +void ScreenShotDialog::showEvent(QShowEvent *event) +{ + Q_UNUSED(event) + + // TODO: + move(win->geometry().center().x(), + win->geometry().center().y() - (geometry().size().height() / 2)); +} + +ScreenShotDialog::~ScreenShotDialog() +{ + qDebug("destroy screenshot dialog"); + + win->getPopupMenu()->screenshotDialog = NULL; +} diff --git a/tizen/src/ui/menu/screenshotdialog.h b/tizen/src/ui/menu/screenshotdialog.h new file mode 100644 index 0000000000..87bd1570d6 --- /dev/null +++ b/tizen/src/ui/menu/screenshotdialog.h @@ -0,0 +1,95 @@ +/* + * Qt Screenshot + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Munkyu Im + * GiWoong Kim + * Sangho Park + * + * 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 + +#include + +class MainWindow; + +class ScreenShotDialog : public QDialog +{ + Q_OBJECT + +public: + explicit ScreenShotDialog(QWidget *parent, const QPixmap &screenshot); + ~ScreenShotDialog(); + + int getRotateAngle(); + QString getRatio(); + int getSliderLevel(); + void setStatusBar(qreal xx, qreal yy); + + QPixmap frameBuf; + +public slots: + bool slotSave(); + void slotCopy(); + void slotRefresh(const QPixmap &); + +protected: + void showEvent(QShowEvent *event); + + QGraphicsScene *scene; + +private: + void createItems(); + void setImage(); + void setRatio(int level); + void updateStatusBar(); + + MainWindow *win; + QString posX; + QString posY; + QGridLayout *gridlayout; + QGraphicsView *view; + int sliderLevel; + QLabel *label; + QSlider *slider; + QPixmap screenshotPixmap; + QToolBar *toolbar; + + QStatusBar *statusBar; + QMenu *fileMenu; + QMenu *editMenu; + QMenu *helpMenu; + QToolBar *toolBar; + float ratio; + QString ratioStr; + QAction *saveAct; + QAction *copyAct; + QAction *refreshAct; + +private slots: + void slotScaleChanged(int level); +}; + +#endif // SCREENSHOT_H diff --git a/tizen/src/ui/menu/screenshotview.cpp b/tizen/src/ui/menu/screenshotview.cpp index 8c70088f5a..987744462e 100644 --- a/tizen/src/ui/menu/screenshotview.cpp +++ b/tizen/src/ui/menu/screenshotview.cpp @@ -30,19 +30,19 @@ #include #include "screenshotview.h" -#include "screenshot.h" +#include "screenshotdialog.h" -ScreenshotView::ScreenshotView(QGraphicsScene *scene, QWidget *parent) : +ScreenShotView::ScreenShotView(QGraphicsScene *scene, QWidget *parent) : QGraphicsView(scene, parent) { setBackgroundRole(QPalette::Dark); } -void ScreenshotView::mouseMoveEvent(QMouseEvent *event) +void ScreenShotView::mouseMoveEvent(QMouseEvent *event) { int max_x; int max_y; - Screenshot *screenshot = (Screenshot *)(this->parent()); + ScreenShotDialog *screenshot = (ScreenShotDialog *)(this->parent()); QPointF fixedPos = this->mapToScene(event->pos()); int sliderLevel = screenshot->getSliderLevel(); @@ -103,7 +103,7 @@ void ScreenshotView::mouseMoveEvent(QMouseEvent *event) } } -ScreenshotView::~ScreenshotView() +ScreenShotView::~ScreenShotView() { /* do nothing */ } diff --git a/tizen/src/ui/menu/screenshotview.h b/tizen/src/ui/menu/screenshotview.h index 94e43bae93..a112e6662a 100644 --- a/tizen/src/ui/menu/screenshotview.h +++ b/tizen/src/ui/menu/screenshotview.h @@ -32,11 +32,11 @@ #include -class ScreenshotView: public QGraphicsView +class ScreenShotView: public QGraphicsView { public: - ScreenshotView(QGraphicsScene *scene, QWidget *parent); - ~ScreenshotView(); + ScreenShotView(QGraphicsScene *scene, QWidget *parent); + ~ScreenShotView(); protected: void mouseMoveEvent(QMouseEvent *event);