Commit 6bf0c3b6 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

ScreenShotCropper: Fix build + use Qt5-style connects

Do not include by default in tools though.

Change-Id: I83f6ae7467355ab00401df52e875e2aa6a6d5b39
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Alessandro Portale's avatarAlessandro Portale <alessandro.portale@qt.io>
parent 6567db9c
......@@ -39,7 +39,6 @@ public:
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
public slots:
void setImage(const QImage &image);
void setArea(const QRect &area);
......
QTC_PLUGIN_DEPENDS += coreplugin
QTC_LIB_DEPENDS += utils
include(../../qtcreatortool.pri)
SOURCES += \
main.cpp\
screenshotcropperwindow.cpp \
......@@ -10,10 +14,7 @@ HEADERS += \
../../plugins/qtsupport/screenshotcropper.h
INCLUDEPATH += \
../../plugins/qtsupport \
../../plugins
.
FORMS += \
screenshotcropperwindow.ui
isEqual(QT_MAJOR_VERSION, 5):QT += widgets
......@@ -35,10 +35,10 @@ ScreenShotCropperWindow::ScreenShotCropperWindow(QWidget *parent)
, ui(new Ui::ScreenShotCropperWindow)
{
ui->setupUi(this);
connect(ui->m_filenamesList, SIGNAL(currentRowChanged(int)), SLOT(selectImage(int)));
connect(ui->m_cropImageView, SIGNAL(cropAreaChanged(QRect)), SLOT(setArea(QRect)));
connect(ui->m_buttonBox, SIGNAL(accepted()), SLOT(saveData()));
connect(ui->m_buttonBox, SIGNAL(rejected()), SLOT(close()));
connect(ui->m_filenamesList, &QListWidget::currentRowChanged, this, &ScreenShotCropperWindow::selectImage);
connect(ui->m_cropImageView, &CropImageView::cropAreaChanged, this, &ScreenShotCropperWindow::setArea);
connect(ui->m_buttonBox, &QDialogButtonBox::accepted, this, &ScreenShotCropperWindow::saveData);
connect(ui->m_buttonBox, &QDialogButtonBox::rejected, this, &QWidget::close);
}
ScreenShotCropperWindow::~ScreenShotCropperWindow()
......
......@@ -25,8 +25,9 @@
#pragma once
#include <qtsupport/screenshotcropper.h>
#include <QMainWindow>
#include "screenshotcropper.h"
using namespace QtSupport::Internal;
......@@ -42,7 +43,6 @@ public:
void loadData(const QString &areasXmlFile, const QString &imagesFolder);
public slots:
void selectImage(int index);
void setArea(const QRect &area);
void saveData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment