Browse Source

imge cropping added

Syping 4 months ago
parent
commit
414867f13e

+ 44
- 0
ImportDialog.cpp View File

@@ -20,6 +20,7 @@
20 20
 #include "ui_ImportDialog.h"
21 21
 #include "SidebarGenerator.h"
22 22
 #include "StandardPaths.h"
23
+#include "imagecropper.h"
23 24
 #include "AppEnv.h"
24 25
 #include "config.h"
25 26
 #include <QStringBuilder>
@@ -108,6 +109,7 @@ ImportDialog::ImportDialog(QString profileName, QWidget *parent) :
108 109
     // Options menu
109 110
     optionsMenu = new QMenu(this);
110 111
     optionsMenu->addAction(tr("&Import new Picture..."), this, SLOT(importNewPicture()));
112
+    optionsMenu->addAction(tr("&Crop Picture..."), this, SLOT(cropPicture()));
111 113
     ui->cmdOptions->setMenu(optionsMenu);
112 114
 
113 115
     setMaximumSize(sizeHint());
@@ -255,6 +257,48 @@ void ImportDialog::processWatermark(QPainter *snapmaticPainter)
255 257
     snapmaticPainter->drawImage(0, 0, textWatermark);
256 258
 }
257 259
 
260
+void ImportDialog::cropPicture()
261
+{
262
+    qreal screenRatio = AppEnv::screenRatio();
263
+
264
+    QDialog cropDialog(this);
265
+    cropDialog.setWindowTitle(tr("Crop Picture..."));
266
+    cropDialog.setWindowFlags(cropDialog.windowFlags()^Qt::WindowContextHelpButtonHint);
267
+    cropDialog.setModal(true);
268
+
269
+    QVBoxLayout cropLayout;
270
+    cropLayout.setContentsMargins(0, 0, 0, 0);
271
+    cropLayout.setSpacing(0);
272
+    cropDialog.setLayout(&cropLayout);
273
+
274
+    ImageCropper imageCropper(&cropDialog);
275
+    imageCropper.setBackgroundColor(Qt::black);
276
+    imageCropper.setCroppingRectBorderColor(QColor(255, 255, 255, 127));
277
+    imageCropper.setImage(QPixmap::fromImage(workImage, Qt::AutoColor));
278
+    imageCropper.setProportion(QSize(1, 1));
279
+    imageCropper.setFixedSize(workImage.size());
280
+    cropLayout.addWidget(&imageCropper);
281
+
282
+    QHBoxLayout buttonLayout;
283
+    cropLayout.addLayout(&buttonLayout);
284
+
285
+    QPushButton cropButton(&cropDialog);
286
+    cropButton.setMinimumSize(0, 40 * screenRatio);
287
+    cropButton.setText(tr("&Crop"));
288
+    cropButton.setToolTip(tr("Crop Picture"));
289
+    QObject::connect(&cropButton, SIGNAL(clicked(bool)), &cropDialog, SLOT(accept()));
290
+
291
+    buttonLayout.addWidget(&cropButton);
292
+
293
+    cropDialog.show();
294
+    cropDialog.setFixedSize(cropDialog.sizeHint());
295
+    if (cropDialog.exec() == true)
296
+    {
297
+        QImage *croppedImage = new QImage(imageCropper.cropImage().toImage());
298
+        setImage(croppedImage);
299
+    }
300
+}
301
+
258 302
 void ImportDialog::importNewPicture()
259 303
 {
260 304
     QSettings settings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR);

+ 1
- 0
ImportDialog.h View File

@@ -40,6 +40,7 @@ public:
40 40
 
41 41
 private slots:
42 42
     void processImage();
43
+    void cropPicture();
43 44
     void importNewPicture();
44 45
     void on_cbIgnore_toggled(bool checked);
45 46
     void on_cbAvatar_toggled(bool checked);

+ 3
- 0
ImportDialog.ui View File

@@ -307,6 +307,9 @@
307 307
           <property name="text">
308 308
            <string>&amp;Options</string>
309 309
           </property>
310
+          <property name="autoDefault">
311
+           <bool>false</bool>
312
+          </property>
310 313
          </widget>
311 314
         </item>
312 315
         <item>

+ 519
- 0
anpro/imagecropper.cpp View File

@@ -0,0 +1,519 @@
1
+/*****************************************************************************
2
+* ImageCropper Qt Widget for cropping images
3
+* Copyright (C) 2013 Dimka Novikov, to@dimkanovikov.pro
4
+*
5
+* This library is free software; you can redistribute it and/or
6
+* modify it under the terms of the GNU Lesser General Public
7
+* License as published by the Free Software Foundation; either
8
+* version 3 of the License, or any later version.
9
+*
10
+* This library is distributed in the hope that it will be useful,
11
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
+* Lesser General Public License for more details.
14
+*
15
+* You should have received a copy of the GNU Lesser General Public License
16
+* along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
+*****************************************************************************/
18
+
19
+#include "imagecropper.h"
20
+
21
+#include <QMouseEvent>
22
+#include <QPainter>
23
+
24
+namespace {
25
+    static const QSize WIDGET_MINIMUM_SIZE(470, 470);
26
+}
27
+
28
+ImageCropper::ImageCropper(QWidget* parent) :
29
+	QWidget(parent),
30
+	pimpl(new ImageCropperPrivate)
31
+{
32
+	setMinimumSize(WIDGET_MINIMUM_SIZE);
33
+	setMouseTracking(true);
34
+}
35
+
36
+ImageCropper::~ImageCropper()
37
+{
38
+	delete pimpl;
39
+}
40
+
41
+void ImageCropper::setImage(const QPixmap& _image)
42
+{
43
+	pimpl->imageForCropping = _image;
44
+	update();
45
+}
46
+
47
+void ImageCropper::setBackgroundColor(const QColor& _backgroundColor)
48
+{
49
+	pimpl->backgroundColor = _backgroundColor;
50
+	update();
51
+}
52
+
53
+void ImageCropper::setCroppingRectBorderColor(const QColor& _borderColor)
54
+{
55
+	pimpl->croppingRectBorderColor = _borderColor;
56
+	update();
57
+}
58
+
59
+void ImageCropper::setProportion(const QSizeF& _proportion)
60
+{
61
+	// Пропорции хранятся в коэффициентах приращения сторон
62
+	// Таким образом, при изменении размера области выделения,
63
+	// размеры сторон изменяются на размер зависящий от
64
+	// коэффициентов приращения.
65
+
66
+	// Сохраним пропорциональную зависимость области выделения в коэффициентах приращения сторон
67
+	if (pimpl->proportion != _proportion) {
68
+		pimpl->proportion = _proportion;
69
+		// ... расчитаем коэффициенты
70
+		float heightDelta = (float)_proportion.height() / _proportion.width();
71
+		float widthDelta = (float)_proportion.width() / _proportion.height();
72
+		// ... сохраним коэффициенты
73
+		pimpl->deltas.setHeight(heightDelta);
74
+		pimpl->deltas.setWidth(widthDelta);
75
+	}
76
+
77
+	// Обновим пропорции области выделения
78
+	if ( pimpl->isProportionFixed ) {
79
+		float croppintRectSideRelation =
80
+				(float)pimpl->croppingRect.width() / pimpl->croppingRect.height();
81
+		float proportionSideRelation =
82
+				(float)pimpl->proportion.width() / pimpl->proportion.height();
83
+		// Если область выделения не соответствует необходимым пропорциям обновим её
84
+		if (croppintRectSideRelation != proportionSideRelation) {
85
+			bool widthShotrerThenHeight =
86
+					pimpl->croppingRect.width() < pimpl->croppingRect.height();
87
+			// ... установим размер той стороны, что длиннее
88
+			if (widthShotrerThenHeight) {
89
+				pimpl->croppingRect.setHeight(
90
+							pimpl->croppingRect.width() * pimpl->deltas.height());
91
+			} else {
92
+				pimpl->croppingRect.setWidth(
93
+							pimpl->croppingRect.height() * pimpl->deltas.width());
94
+			}
95
+			// ... перерисуем виджет
96
+			update();
97
+		}
98
+	}
99
+
100
+}
101
+
102
+void ImageCropper::setProportionFixed(const bool _isFixed)
103
+{
104
+	if (pimpl->isProportionFixed != _isFixed) {
105
+		pimpl->isProportionFixed = _isFixed;
106
+		setProportion(pimpl->proportion);
107
+	}
108
+}
109
+
110
+const QPixmap ImageCropper::cropImage()
111
+{
112
+	// Получим размер отображаемого изображения
113
+	QSize scaledImageSize =
114
+			pimpl->imageForCropping.scaled(
115
+				this->size(), Qt::KeepAspectRatio, Qt::FastTransformation
116
+				).size();
117
+	// Определим расстояние от левого и верхнего краёв
118
+	float leftDelta = 0;
119
+	float topDelta = 0;
120
+	const float HALF_COUNT = 2;
121
+	if (this->size().height() == scaledImageSize.height()) {
122
+		leftDelta = (this->width() - scaledImageSize.width()) / HALF_COUNT;
123
+	} else {
124
+		topDelta = (this->height() - scaledImageSize.height()) / HALF_COUNT;
125
+	}
126
+	// Определим пропорцию области обрезки по отношению к исходному изображению
127
+	float xScale = (float)pimpl->imageForCropping.width()  / scaledImageSize.width();
128
+	float yScale = (float)pimpl->imageForCropping.height() / scaledImageSize.height();
129
+	// Расчитаем область обрезки с учётом коррекции размеров исходного изображения
130
+	QRectF realSizeRect(
131
+				QPointF(pimpl->croppingRect.left() - leftDelta, pimpl->croppingRect.top() - topDelta),
132
+				pimpl->croppingRect.size());
133
+	// ... корректируем левый и верхний края
134
+	realSizeRect.setLeft((pimpl->croppingRect.left() - leftDelta) * xScale);
135
+	realSizeRect.setTop ((pimpl->croppingRect.top() - topDelta) * yScale);
136
+	// ... корректируем размер
137
+	realSizeRect.setWidth(pimpl->croppingRect.width() * xScale);
138
+	realSizeRect.setHeight(pimpl->croppingRect.height() * yScale);
139
+	// Получаем обрезанное изображение
140
+	return pimpl->imageForCropping.copy(realSizeRect.toRect());
141
+}
142
+
143
+// ********
144
+// Protected section
145
+
146
+void ImageCropper::paintEvent(QPaintEvent* _event)
147
+{
148
+	QWidget::paintEvent( _event );
149
+	//
150
+	QPainter widgetPainter(this);
151
+	// Рисуем изображение по центру виджета
152
+	{
153
+		// ... подгоним изображение для отображения по размеру виджета
154
+		QPixmap scaledImage =
155
+				pimpl->imageForCropping.scaled(this->size(), Qt::KeepAspectRatio, Qt::FastTransformation);
156
+		// ... заливаем фон
157
+		widgetPainter.fillRect( this->rect(), pimpl->backgroundColor );
158
+		// ... рисуем изображение по центру виджета
159
+		if ( this->size().height() == scaledImage.height() ) {
160
+			widgetPainter.drawPixmap( ( this->width() - scaledImage.width() ) / 2, 0, scaledImage );
161
+		} else {
162
+			widgetPainter.drawPixmap( 0, ( this->height() - scaledImage.height() ) / 2, scaledImage );
163
+		}
164
+	}
165
+	// Рисуем область обрезки
166
+	{
167
+		// ... если это первое отображение после инициилизации, то центруем областо обрезки
168
+		if (pimpl->croppingRect.isNull()) {
169
+			const int width = WIDGET_MINIMUM_SIZE.width()/2;
170
+			const int height = WIDGET_MINIMUM_SIZE.height()/2;
171
+			pimpl->croppingRect.setSize(QSize(width, height));
172
+			float x = (this->width() - pimpl->croppingRect.width())/2;
173
+			float y = (this->height() - pimpl->croppingRect.height())/2;
174
+			pimpl->croppingRect.moveTo(x, y);
175
+		}
176
+
177
+		// ... рисуем затемненную область
178
+		QPainterPath p;
179
+		p.addRect(pimpl->croppingRect);
180
+		p.addRect(this->rect());
181
+		widgetPainter.setBrush(QBrush(QColor(0,0,0,120)));
182
+		widgetPainter.setPen(Qt::transparent);
183
+		widgetPainter.drawPath(p);
184
+		// Рамка и контрольные точки
185
+		widgetPainter.setPen(pimpl->croppingRectBorderColor);
186
+		// ... рисуем прямоугольник области обрезки
187
+		{
188
+			widgetPainter.setBrush(QBrush(Qt::transparent));
189
+			widgetPainter.drawRect(pimpl->croppingRect);
190
+		}
191
+		// ... рисуем контрольные точки
192
+		{
193
+			widgetPainter.setBrush(QBrush(pimpl->croppingRectBorderColor));
194
+			// Вспомогательные X координаты
195
+			int leftXCoord   = pimpl->croppingRect.left() - 2;
196
+			int centerXCoord = pimpl->croppingRect.center().x() - 3;
197
+			int rightXCoord  = pimpl->croppingRect.right() - 2;
198
+			// Вспомогательные Y координаты
199
+			int topYCoord    = pimpl->croppingRect.top() - 2;
200
+			int middleYCoord = pimpl->croppingRect.center().y() - 3;
201
+			int bottomYCoord = pimpl->croppingRect.bottom() - 2;
202
+			//
203
+			const QSize pointSize(6, 6);
204
+			//
205
+			QVector<QRect> points;
206
+			points
207
+					// левая сторона
208
+					<< QRect( QPoint(leftXCoord, topYCoord), pointSize )
209
+					<< QRect( QPoint(leftXCoord, middleYCoord), pointSize )
210
+					<< QRect( QPoint(leftXCoord, bottomYCoord), pointSize )
211
+					// центр
212
+					<< QRect( QPoint(centerXCoord, topYCoord), pointSize )
213
+					<< QRect( QPoint(centerXCoord, middleYCoord), pointSize )
214
+					<< QRect( QPoint(centerXCoord, bottomYCoord), pointSize )
215
+					// правая сторона
216
+					<< QRect( QPoint(rightXCoord, topYCoord), pointSize )
217
+					<< QRect( QPoint(rightXCoord, middleYCoord), pointSize )
218
+					<< QRect( QPoint(rightXCoord, bottomYCoord), pointSize );
219
+			//
220
+			widgetPainter.drawRects( points );
221
+		}
222
+		// ... рисуем пунктирные линии
223
+		{
224
+			QPen dashPen(pimpl->croppingRectBorderColor);
225
+			dashPen.setStyle(Qt::DashLine);
226
+			widgetPainter.setPen(dashPen);
227
+			// ... вертикальная
228
+			widgetPainter.drawLine(
229
+						QPoint(pimpl->croppingRect.center().x(), pimpl->croppingRect.top()),
230
+						QPoint(pimpl->croppingRect.center().x(), pimpl->croppingRect.bottom()) );
231
+			// ... горизонтальная
232
+			widgetPainter.drawLine(
233
+						QPoint(pimpl->croppingRect.left(), pimpl->croppingRect.center().y()),
234
+						QPoint(pimpl->croppingRect.right(), pimpl->croppingRect.center().y()) );
235
+		}
236
+	}
237
+	//
238
+	widgetPainter.end();
239
+}
240
+
241
+void ImageCropper::mousePressEvent(QMouseEvent* _event)
242
+{
243
+	if (_event->button() == Qt::LeftButton) {
244
+		pimpl->isMousePressed = true;
245
+		pimpl->startMousePos = _event->pos();
246
+		pimpl->lastStaticCroppingRect = pimpl->croppingRect;
247
+	}
248
+	//
249
+	updateCursorIcon(_event->pos());
250
+}
251
+
252
+void ImageCropper::mouseMoveEvent(QMouseEvent* _event)
253
+{
254
+	QPointF mousePos = _event->pos(); // относительно себя (виджета)
255
+	//
256
+	if (!pimpl->isMousePressed) {
257
+		// Обработка обычного состояния, т.е. не изменяется размер
258
+		// области обрезки, и она не перемещается по виджету
259
+		pimpl->cursorPosition = cursorPosition(pimpl->croppingRect, mousePos);
260
+		updateCursorIcon(mousePos);
261
+	} else if (pimpl->cursorPosition != CursorPositionUndefined) {
262
+		// Обработка действий над областью обрезки
263
+		// ... определим смещение курсора мышки
264
+		QPointF mouseDelta;
265
+		mouseDelta.setX( mousePos.x() - pimpl->startMousePos.x() );
266
+		mouseDelta.setY( mousePos.y() - pimpl->startMousePos.y() );
267
+		//
268
+		if (pimpl->cursorPosition != CursorPositionMiddle) {
269
+			// ... изменяем размер области обрезки
270
+			QRectF newGeometry =
271
+					calculateGeometry(
272
+						pimpl->lastStaticCroppingRect,
273
+						pimpl->cursorPosition,
274
+						mouseDelta);
275
+			// ... пользователь пытается вывернуть область обрезки наизнанку
276
+			if (!newGeometry.isNull()) {
277
+				pimpl->croppingRect = newGeometry;
278
+			}
279
+		} else {
280
+			// ... перемещаем область обрезки
281
+			pimpl->croppingRect.moveTo( pimpl->lastStaticCroppingRect.topLeft() + mouseDelta );
282
+		}
283
+		// Перерисуем виджет
284
+		update();
285
+	}
286
+}
287
+
288
+void ImageCropper::mouseReleaseEvent(QMouseEvent* _event)
289
+{
290
+	pimpl->isMousePressed = false;
291
+	updateCursorIcon(_event->pos());
292
+}
293
+
294
+// ********
295
+// Private section
296
+
297
+namespace {
298
+	// Находится ли точка рядом с координатой стороны
299
+	static bool isPointNearSide (const int _sideCoordinate, const int _pointCoordinate)
300
+	{
301
+		static const int indent = 10;
302
+		return (_sideCoordinate - indent) < _pointCoordinate && _pointCoordinate < (_sideCoordinate + indent);
303
+	}
304
+}
305
+
306
+CursorPosition ImageCropper::cursorPosition(const QRectF& _cropRect, const QPointF& _mousePosition)
307
+{
308
+	CursorPosition cursorPosition = CursorPositionUndefined;
309
+	//
310
+	if ( _cropRect.contains( _mousePosition ) ) {
311
+		// Двухстороннее направление
312
+		if (isPointNearSide(_cropRect.top(), _mousePosition.y()) &&
313
+			isPointNearSide(_cropRect.left(), _mousePosition.x())) {
314
+			cursorPosition = CursorPositionTopLeft;
315
+		} else if (isPointNearSide(_cropRect.bottom(), _mousePosition.y()) &&
316
+				   isPointNearSide(_cropRect.left(), _mousePosition.x())) {
317
+			cursorPosition = CursorPositionBottomLeft;
318
+		} else if (isPointNearSide(_cropRect.top(), _mousePosition.y()) &&
319
+				   isPointNearSide(_cropRect.right(), _mousePosition.x())) {
320
+			cursorPosition = CursorPositionTopRight;
321
+		} else if (isPointNearSide(_cropRect.bottom(), _mousePosition.y()) &&
322
+				   isPointNearSide(_cropRect.right(), _mousePosition.x())) {
323
+			cursorPosition = CursorPositionBottomRight;
324
+		// Одностороннее направление
325
+		} else if (isPointNearSide(_cropRect.left(), _mousePosition.x())) {
326
+			cursorPosition = CursorPositionLeft;
327
+		} else if (isPointNearSide(_cropRect.right(), _mousePosition.x())) {
328
+			cursorPosition = CursorPositionRight;
329
+		} else if (isPointNearSide(_cropRect.top(), _mousePosition.y())) {
330
+			cursorPosition = CursorPositionTop;
331
+		} else if (isPointNearSide(_cropRect.bottom(), _mousePosition.y())) {
332
+			cursorPosition = CursorPositionBottom;
333
+		// Без направления
334
+		} else {
335
+			cursorPosition = CursorPositionMiddle;
336
+		}
337
+	}
338
+	//
339
+	return cursorPosition;
340
+}
341
+
342
+void ImageCropper::updateCursorIcon(const QPointF& _mousePosition)
343
+{
344
+	QCursor cursorIcon;
345
+	//
346
+	switch (cursorPosition(pimpl->croppingRect, _mousePosition))
347
+	{
348
+		case CursorPositionTopRight:
349
+		case CursorPositionBottomLeft:
350
+			cursorIcon = QCursor(Qt::SizeBDiagCursor);
351
+			break;
352
+		case CursorPositionTopLeft:
353
+		case CursorPositionBottomRight:
354
+			cursorIcon = QCursor(Qt::SizeFDiagCursor);
355
+			break;
356
+		case CursorPositionTop:
357
+		case CursorPositionBottom:
358
+			cursorIcon = QCursor(Qt::SizeVerCursor);
359
+			break;
360
+		case CursorPositionLeft:
361
+		case CursorPositionRight:
362
+			cursorIcon = QCursor(Qt::SizeHorCursor);
363
+			break;
364
+		case CursorPositionMiddle:
365
+			cursorIcon = pimpl->isMousePressed ?
366
+						QCursor(Qt::ClosedHandCursor) :
367
+						QCursor(Qt::OpenHandCursor);
368
+			break;
369
+		case CursorPositionUndefined:
370
+		default:
371
+			cursorIcon = QCursor(Qt::ArrowCursor);
372
+			break;
373
+	}
374
+	//
375
+	this->setCursor(cursorIcon);
376
+}
377
+
378
+const QRectF ImageCropper::calculateGeometry(
379
+		const QRectF& _sourceGeometry,
380
+		const CursorPosition _cursorPosition,
381
+		const QPointF& _mouseDelta
382
+		)
383
+{
384
+	QRectF resultGeometry;
385
+	//
386
+	if ( pimpl->isProportionFixed ) {
387
+		resultGeometry =
388
+				calculateGeometryWithFixedProportions(
389
+					_sourceGeometry, _cursorPosition, _mouseDelta, pimpl->deltas);
390
+	} else {
391
+		resultGeometry =
392
+				calculateGeometryWithCustomProportions(
393
+					_sourceGeometry, _cursorPosition, _mouseDelta);
394
+	}
395
+	// Если пользователь пытается вывернуть область обрезки наизнанку,
396
+	// возвращаем null-прямоугольник
397
+	if ((resultGeometry.left() >= resultGeometry.right()) ||
398
+		(resultGeometry.top() >= resultGeometry.bottom())) {
399
+		resultGeometry = QRect();
400
+	}
401
+	//
402
+	return resultGeometry;
403
+}
404
+
405
+const QRectF ImageCropper::calculateGeometryWithCustomProportions(
406
+		const QRectF& _sourceGeometry,
407
+		const CursorPosition _cursorPosition,
408
+		const QPointF& _mouseDelta
409
+		)
410
+{
411
+	QRectF resultGeometry = _sourceGeometry;
412
+	//
413
+	switch ( _cursorPosition )
414
+	{
415
+		case CursorPositionTopLeft:
416
+			resultGeometry.setLeft( _sourceGeometry.left() + _mouseDelta.x() );
417
+			resultGeometry.setTop ( _sourceGeometry.top()  + _mouseDelta.y() );
418
+			break;
419
+		case CursorPositionTopRight:
420
+			resultGeometry.setTop  ( _sourceGeometry.top()   + _mouseDelta.y() );
421
+			resultGeometry.setRight( _sourceGeometry.right() + _mouseDelta.x() );
422
+			break;
423
+		case CursorPositionBottomLeft:
424
+			resultGeometry.setBottom( _sourceGeometry.bottom() + _mouseDelta.y() );
425
+			resultGeometry.setLeft  ( _sourceGeometry.left()   + _mouseDelta.x() );
426
+			break;
427
+		case CursorPositionBottomRight:
428
+			resultGeometry.setBottom( _sourceGeometry.bottom() + _mouseDelta.y() );
429
+			resultGeometry.setRight ( _sourceGeometry.right()  + _mouseDelta.x() );
430
+			break;
431
+		case CursorPositionTop:
432
+			resultGeometry.setTop( _sourceGeometry.top() + _mouseDelta.y() );
433
+			break;
434
+		case CursorPositionBottom:
435
+			resultGeometry.setBottom( _sourceGeometry.bottom() + _mouseDelta.y() );
436
+			break;
437
+		case CursorPositionLeft:
438
+			resultGeometry.setLeft( _sourceGeometry.left() + _mouseDelta.x() );
439
+			break;
440
+		case CursorPositionRight:
441
+			resultGeometry.setRight( _sourceGeometry.right() + _mouseDelta.x() );
442
+			break;
443
+		default:
444
+			break;
445
+	}
446
+	//
447
+	return resultGeometry;
448
+}
449
+
450
+const QRectF ImageCropper::calculateGeometryWithFixedProportions(
451
+		const QRectF& _sourceGeometry,
452
+		const CursorPosition _cursorPosition,
453
+		const QPointF& _mouseDelta,
454
+		const QSizeF& _deltas
455
+		)
456
+{
457
+	QRectF resultGeometry = _sourceGeometry;
458
+	//
459
+	switch (_cursorPosition)
460
+	{
461
+		case CursorPositionLeft:
462
+			resultGeometry.setTop(_sourceGeometry.top() + _mouseDelta.x() * _deltas.height());
463
+			resultGeometry.setLeft(_sourceGeometry.left() + _mouseDelta.x());
464
+			break;
465
+		case CursorPositionRight:
466
+			resultGeometry.setTop(_sourceGeometry.top() - _mouseDelta.x() * _deltas.height());
467
+			resultGeometry.setRight(_sourceGeometry.right() + _mouseDelta.x());
468
+			break;
469
+		case CursorPositionTop:
470
+			resultGeometry.setTop(_sourceGeometry.top() + _mouseDelta.y());
471
+			resultGeometry.setRight(_sourceGeometry.right() - _mouseDelta.y() * _deltas.width());
472
+			break;
473
+		case CursorPositionBottom:
474
+			resultGeometry.setBottom(_sourceGeometry.bottom() + _mouseDelta.y());
475
+			resultGeometry.setRight(_sourceGeometry.right() + _mouseDelta.y() * _deltas.width());
476
+			break;
477
+		case CursorPositionTopLeft:
478
+			if ((_mouseDelta.x() * _deltas.height()) < (_mouseDelta.y())) {
479
+				resultGeometry.setTop(_sourceGeometry.top() + _mouseDelta.x() * _deltas.height());
480
+				resultGeometry.setLeft(_sourceGeometry.left() + _mouseDelta.x());
481
+			} else {
482
+				resultGeometry.setTop(_sourceGeometry.top() + _mouseDelta.y());
483
+				resultGeometry.setLeft(_sourceGeometry.left() + _mouseDelta.y() * _deltas.width());
484
+			}
485
+			break;
486
+		case CursorPositionTopRight:
487
+			if ((_mouseDelta.x() * _deltas.height() * -1) < (_mouseDelta.y())) {
488
+				resultGeometry.setTop(_sourceGeometry.top() - _mouseDelta.x() * _deltas.height());
489
+				resultGeometry.setRight(_sourceGeometry.right() + _mouseDelta.x() );
490
+			} else {
491
+				resultGeometry.setTop(_sourceGeometry.top() + _mouseDelta.y());
492
+				resultGeometry.setRight(_sourceGeometry.right() - _mouseDelta.y() * _deltas.width());
493
+			}
494
+			break;
495
+		case CursorPositionBottomLeft:
496
+			if ((_mouseDelta.x() * _deltas.height()) < (_mouseDelta.y() * -1)) {
497
+				resultGeometry.setBottom(_sourceGeometry.bottom() - _mouseDelta.x() * _deltas.height());
498
+				resultGeometry.setLeft(_sourceGeometry.left() + _mouseDelta.x());
499
+			} else {
500
+				resultGeometry.setBottom(_sourceGeometry.bottom() + _mouseDelta.y());
501
+				resultGeometry.setLeft(_sourceGeometry.left() - _mouseDelta.y() * _deltas.width());
502
+			}
503
+			break;
504
+		case CursorPositionBottomRight:
505
+			if ((_mouseDelta.x() * _deltas.height()) > (_mouseDelta.y())) {
506
+				resultGeometry.setBottom(_sourceGeometry.bottom() + _mouseDelta.x() * _deltas.height());
507
+				resultGeometry.setRight(_sourceGeometry.right() + _mouseDelta.x());
508
+			} else {
509
+				resultGeometry.setBottom(_sourceGeometry.bottom() + _mouseDelta.y());
510
+				resultGeometry.setRight(_sourceGeometry.right() + _mouseDelta.y() * _deltas.width());
511
+			}
512
+			break;
513
+		default:
514
+			break;
515
+	}
516
+	//
517
+	return resultGeometry;
518
+}
519
+

+ 103
- 0
anpro/imagecropper.h View File

@@ -0,0 +1,103 @@
1
+/*****************************************************************************
2
+* ImageCropper Qt Widget for cropping images
3
+* Copyright (C) 2013 Dimka Novikov, to@dimkanovikov.pro
4
+*
5
+* This library is free software; you can redistribute it and/or
6
+* modify it under the terms of the GNU Lesser General Public
7
+* License as published by the Free Software Foundation; either
8
+* version 3 of the License, or any later version.
9
+*
10
+* This library is distributed in the hope that it will be useful,
11
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
+* Lesser General Public License for more details.
14
+*
15
+* You should have received a copy of the GNU Lesser General Public License
16
+* along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
+*****************************************************************************/
18
+
19
+#ifndef IMAGECROPPER_H
20
+#define IMAGECROPPER_H
21
+
22
+#include "imagecropper_p.h"
23
+#include "imagecropper_e.h"
24
+
25
+#include <QWidget>
26
+
27
+class ImageCropper : public QWidget
28
+{
29
+    Q_OBJECT
30
+
31
+public:
32
+    ImageCropper(QWidget *parent = 0);
33
+    ~ImageCropper();
34
+
35
+public slots:
36
+	// Установить изображение для обрезки
37
+	void setImage(const QPixmap& _image);
38
+	// Установить цвет фона виджета обрезки
39
+	void setBackgroundColor(const QColor& _backgroundColor);
40
+	// Установить цвет рамки области обрезки
41
+	void setCroppingRectBorderColor(const QColor& _borderColor);
42
+	// Установить пропорции области выделения
43
+	void setProportion(const QSizeF& _proportion);
44
+	// Использовать фиксированные пропорции области виделения
45
+	void setProportionFixed(const bool _isFixed);
46
+
47
+public:
48
+	// Обрезать изображение
49
+	const QPixmap cropImage();
50
+
51
+protected:
52
+	virtual void paintEvent(QPaintEvent* _event);
53
+	virtual void mousePressEvent(QMouseEvent* _event);
54
+	virtual void mouseMoveEvent(QMouseEvent* _event);
55
+	virtual void mouseReleaseEvent(QMouseEvent* _event);
56
+
57
+private:
58
+	// Определение местоположения курсора над виджетом
59
+	CursorPosition cursorPosition(const QRectF& _cropRect, const QPointF& _mousePosition);
60
+	// Обновить иконку курсора соответствующую местоположению мыши
61
+	void updateCursorIcon(const QPointF& _mousePosition);
62
+
63
+	// Получить размер виджета после его изменения мышью
64
+	// --------
65
+    // Контракты:
66
+    // 1. Метод должен вызываться, только при зажатой кнопке мыши
67
+    //    (т.е. при перемещении или изменении размера виджета)
68
+	// --------
69
+	// В случае неудачи возвращает null-прямоугольник
70
+	const QRectF calculateGeometry(
71
+			const QRectF& _sourceGeometry,
72
+			const CursorPosition _cursorPosition,
73
+			const QPointF& _mouseDelta
74
+			);
75
+    // Получить размер виджета после его изменения мышью
76
+    // Метод изменяет виджет не сохраняя начальных пропорций сторон
77
+    // ------
78
+    // Контракты:
79
+    // 1. Метод должен вызываться, только при зажатой кнопке мыши
80
+    //    (т.е. при перемещении или изменении размера виджета)
81
+	const QRectF calculateGeometryWithCustomProportions(
82
+			const QRectF& _sourceGeometry,
83
+			const CursorPosition _cursorPosition,
84
+			const QPointF& _mouseDelta
85
+			);
86
+    // Получить размер виджета после его изменения мышью
87
+    // Метод изменяет виджет сохраняя начальные пропорции сторон
88
+    // ------
89
+    // Контракты:
90
+    // 1. Метод должен вызываться, только при зажатой кнопке мыши
91
+    //    (т.е. при перемещении или изменении размера виджета)
92
+	const QRectF calculateGeometryWithFixedProportions(const QRectF &_sourceGeometry,
93
+												 const CursorPosition _cursorPosition,
94
+												 const QPointF &_mouseDelta,
95
+												 const QSizeF &_deltas
96
+                                                 );
97
+
98
+private:
99
+	// Private data implementation
100
+	ImageCropperPrivate* pimpl;
101
+};
102
+
103
+#endif // IMAGECROPPER_H

+ 36
- 0
anpro/imagecropper_e.h View File

@@ -0,0 +1,36 @@
1
+/*****************************************************************************
2
+* ImageCropper Qt Widget for cropping images
3
+* Copyright (C) 2013 Dimka Novikov, to@dimkanovikov.pro
4
+*
5
+* This library is free software; you can redistribute it and/or
6
+* modify it under the terms of the GNU Lesser General Public
7
+* License as published by the Free Software Foundation; either
8
+* version 3 of the License, or any later version.
9
+*
10
+* This library is distributed in the hope that it will be useful,
11
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
+* Lesser General Public License for more details.
14
+*
15
+* You should have received a copy of the GNU Lesser General Public License
16
+* along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
+*****************************************************************************/
18
+
19
+#ifndef IMAGECROPPER_E_H
20
+#define IMAGECROPPER_E_H
21
+
22
+enum CursorPosition
23
+{
24
+    CursorPositionUndefined,
25
+    CursorPositionMiddle,
26
+    CursorPositionTop,
27
+    CursorPositionBottom,
28
+    CursorPositionLeft,
29
+    CursorPositionRight,
30
+    CursorPositionTopLeft,
31
+    CursorPositionTopRight,
32
+    CursorPositionBottomLeft,
33
+    CursorPositionBottomRight
34
+};
35
+
36
+#endif // IMAGECROPPER_E_H

+ 76
- 0
anpro/imagecropper_p.h View File

@@ -0,0 +1,76 @@
1
+/*****************************************************************************
2
+* ImageCropper Qt Widget for cropping images
3
+* Copyright (C) 2013 Dimka Novikov, to@dimkanovikov.pro
4
+*
5
+* This library is free software; you can redistribute it and/or
6
+* modify it under the terms of the GNU Lesser General Public
7
+* License as published by the Free Software Foundation; either
8
+* version 3 of the License, or any later version.
9
+*
10
+* This library is distributed in the hope that it will be useful,
11
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
+* Lesser General Public License for more details.
14
+*
15
+* You should have received a copy of the GNU Lesser General Public License
16
+* along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
+*****************************************************************************/
18
+
19
+#ifndef IMAGECROPPER_P_H
20
+#define IMAGECROPPER_P_H
21
+
22
+#include "imagecropper_e.h"
23
+
24
+#include <QtCore/QRect>
25
+#include <QtGui/QPixmap>
26
+#include <QtGui/QColor>
27
+
28
+namespace {
29
+	const QRect INIT_CROPPING_RECT = QRect();
30
+	const QSizeF INIT_PROPORTION = QSizeF(1.0, 1.0);
31
+}
32
+
33
+class ImageCropperPrivate {
34
+public:
35
+	ImageCropperPrivate() :
36
+		imageForCropping(QPixmap()),
37
+		croppingRect(INIT_CROPPING_RECT),
38
+		lastStaticCroppingRect(QRect()),
39
+		cursorPosition(CursorPositionUndefined),
40
+		isMousePressed(false),
41
+		isProportionFixed(false),
42
+		startMousePos(QPoint()),
43
+		proportion(INIT_PROPORTION),
44
+        deltas(INIT_PROPORTION),
45
+		backgroundColor(Qt::black),
46
+		croppingRectBorderColor(Qt::white)
47
+	{}
48
+
49
+public:
50
+	// Изображение для обрезки
51
+	QPixmap imageForCropping;
52
+	// Область обрезки
53
+	QRectF croppingRect;
54
+	// Последняя фиксированная область обрезки
55
+	QRectF lastStaticCroppingRect;
56
+	// Позиция курсора относительно области обрезки
57
+	CursorPosition cursorPosition;
58
+	// Зажата ли левая кнопка мыши
59
+	bool isMousePressed;
60
+	// Фиксировать пропорции области обрезки
61
+	bool isProportionFixed;
62
+	// Начальная позиция курсора при изменении размера области обрезки
63
+	QPointF startMousePos;
64
+    // Пропорции
65
+	QSizeF proportion;
66
+    // Приращения
67
+    // width  - приращение по x
68
+    // height - приращение по y
69
+    QSizeF deltas;
70
+	// Цвет заливки фона под изображением
71
+	QColor backgroundColor;
72
+	// Цвет рамки области обрезки
73
+	QColor croppingRectBorderColor;
74
+};
75
+
76
+#endif // IMAGECROPPER_P_H

+ 6
- 2
gta5view.pro View File

@@ -63,9 +63,10 @@ SOURCES += main.cpp \
63 63
     TelemetryClass.cpp \
64 64
     TranslationClass.cpp \
65 65
     UserInterface.cpp \
66
-    anpro/JSHighlighter.cpp \
66
+    anpro/imagecropper.cpp \
67 67
     pcg/pcg_basic.c \
68 68
     tmext/TelemetryClassAuthenticator.cpp \
69
+    uimod/JSHighlighter.cpp \
69 70
     uimod/UiModLabel.cpp \
70 71
     uimod/UiModWidget.cpp
71 72
 
@@ -104,9 +105,12 @@ HEADERS  += \
104 105
     TelemetryClass.h \
105 106
     TranslationClass.h \
106 107
     UserInterface.h \
107
-    anpro/JSHighlighter.h \
108
+    anpro/imagecropper.h \
109
+    anpro/imagecropper_e.h \
110
+    anpro/imagecropper_p.h \
108 111
     pcg/pcg_basic.h \
109 112
     tmext/TelemetryClassAuthenticator.h \
113
+    uimod/JSHighlighter.h \
110 114
     uimod/UiModLabel.h \
111 115
     uimod/UiModWidget.h
112 116
 

+ 52
- 32
res/gta5sync.ts View File

@@ -252,8 +252,8 @@ Pictures and Savegames</source>
252 252
     </message>
253 253
     <message>
254 254
         <location filename="../ImportDialog.ui" line="150"/>
255
-        <location filename="../ImportDialog.cpp" line="84"/>
256
-        <location filename="../ImportDialog.cpp" line="447"/>
255
+        <location filename="../ImportDialog.cpp" line="85"/>
256
+        <location filename="../ImportDialog.cpp" line="491"/>
257 257
         <source>Background Colour: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</source>
258 258
         <translation type="unfinished"></translation>
259 259
     </message>
@@ -270,8 +270,8 @@ Pictures and Savegames</source>
270 270
     </message>
271 271
     <message>
272 272
         <location filename="../ImportDialog.ui" line="203"/>
273
-        <location filename="../ImportDialog.cpp" line="85"/>
274
-        <location filename="../ImportDialog.cpp" line="527"/>
273
+        <location filename="../ImportDialog.cpp" line="86"/>
274
+        <location filename="../ImportDialog.cpp" line="571"/>
275 275
         <source>Background Image:</source>
276 276
         <translation type="unfinished"></translation>
277 277
     </message>
@@ -306,67 +306,87 @@ Pictures and Savegames</source>
306 306
         <translation type="unfinished"></translation>
307 307
     </message>
308 308
     <message>
309
-        <location filename="../ImportDialog.ui" line="334"/>
309
+        <location filename="../ImportDialog.ui" line="337"/>
310 310
         <source>Import picture</source>
311 311
         <translation type="unfinished"></translation>
312 312
     </message>
313 313
     <message>
314
-        <location filename="../ImportDialog.ui" line="337"/>
314
+        <location filename="../ImportDialog.ui" line="340"/>
315 315
         <source>&amp;OK</source>
316 316
         <translation type="unfinished"></translation>
317 317
     </message>
318 318
     <message>
319
-        <location filename="../ImportDialog.ui" line="350"/>
319
+        <location filename="../ImportDialog.ui" line="353"/>
320 320
         <source>Discard picture</source>
321 321
         <translation type="unfinished"></translation>
322 322
     </message>
323 323
     <message>
324
-        <location filename="../ImportDialog.ui" line="353"/>
324
+        <location filename="../ImportDialog.ui" line="356"/>
325 325
         <source>&amp;Cancel</source>
326 326
         <translation type="unfinished"></translation>
327 327
     </message>
328 328
     <message>
329
-        <location filename="../ImportDialog.cpp" line="110"/>
329
+        <location filename="../ImportDialog.cpp" line="111"/>
330 330
         <source>&amp;Import new Picture...</source>
331 331
         <translation type="unfinished"></translation>
332 332
     </message>
333 333
     <message>
334
-        <location filename="../ImportDialog.cpp" line="183"/>
334
+        <location filename="../ImportDialog.cpp" line="112"/>
335
+        <source>&amp;Crop Picture...</source>
336
+        <translation type="unfinished"></translation>
337
+    </message>
338
+    <message>
339
+        <location filename="../ImportDialog.cpp" line="185"/>
335 340
         <location filename="../ProfileInterface.cpp" line="668"/>
336 341
         <source>Custom Avatar</source>
337 342
         <comment>Custom Avatar Description in SC, don&apos;t use Special Character!</comment>
338 343
         <translation type="unfinished"></translation>
339 344
     </message>
340 345
     <message>
341
-        <location filename="../ImportDialog.cpp" line="210"/>
346
+        <location filename="../ImportDialog.cpp" line="212"/>
342 347
         <location filename="../ProfileInterface.cpp" line="687"/>
343 348
         <source>Custom Picture</source>
344 349
         <comment>Custom Picture Description in SC, don&apos;t use Special Character!</comment>
345 350
         <translation type="unfinished"></translation>
346 351
     </message>
347 352
     <message>
348
-        <location filename="../ImportDialog.cpp" line="394"/>
353
+        <location filename="../ImportDialog.cpp" line="265"/>
354
+        <source>Crop Picture...</source>
355
+        <translation type="unfinished"></translation>
356
+    </message>
357
+    <message>
358
+        <location filename="../ImportDialog.cpp" line="287"/>
359
+        <source>&amp;Crop</source>
360
+        <translation type="unfinished"></translation>
361
+    </message>
362
+    <message>
363
+        <location filename="../ImportDialog.cpp" line="288"/>
364
+        <source>Crop Picture</source>
365
+        <translation type="unfinished"></translation>
366
+    </message>
367
+    <message>
368
+        <location filename="../ImportDialog.cpp" line="438"/>
349 369
         <source>Snapmatic Avatar Zone</source>
350 370
         <translation type="unfinished"></translation>
351 371
     </message>
352 372
     <message>
353
-        <location filename="../ImportDialog.cpp" line="394"/>
373
+        <location filename="../ImportDialog.cpp" line="438"/>
354 374
         <source>Are you sure to use a square image outside of the Avatar Zone?
355 375
 When you want to use it as Avatar the image will be detached!</source>
356 376
         <translation type="unfinished"></translation>
357 377
     </message>
358 378
     <message>
359
-        <location filename="../ImportDialog.cpp" line="443"/>
379
+        <location filename="../ImportDialog.cpp" line="487"/>
360 380
         <source>Select Colour...</source>
361 381
         <translation type="unfinished"></translation>
362 382
     </message>
363 383
     <message>
364
-        <location filename="../ImportDialog.cpp" line="512"/>
384
+        <location filename="../ImportDialog.cpp" line="556"/>
365 385
         <source>Background Image: %1</source>
366 386
         <translation type="unfinished"></translation>
367 387
     </message>
368 388
     <message>
369
-        <location filename="../ImportDialog.cpp" line="512"/>
389
+        <location filename="../ImportDialog.cpp" line="556"/>
370 390
         <source>File</source>
371 391
         <comment>Background Image: File</comment>
372 392
         <translation type="unfinished"></translation>
@@ -1108,8 +1128,8 @@ Press 1 for Default View</source>
1108 1128
     </message>
1109 1129
     <message>
1110 1130
         <location filename="../ImageEditorDialog.cpp" line="109"/>
1111
-        <location filename="../ImportDialog.cpp" line="272"/>
1112
-        <location filename="../ImportDialog.cpp" line="466"/>
1131
+        <location filename="../ImportDialog.cpp" line="316"/>
1132
+        <location filename="../ImportDialog.cpp" line="510"/>
1113 1133
         <location filename="../ProfileInterface.cpp" line="482"/>
1114 1134
         <location filename="../ProfileInterface.cpp" line="548"/>
1115 1135
         <location filename="../ProfileInterface.cpp" line="857"/>
@@ -1120,12 +1140,12 @@ Press 1 for Default View</source>
1120 1140
         <location filename="../ImageEditorDialog.cpp" line="110"/>
1121 1141
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1122 1142
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1123
-        <location filename="../ImportDialog.cpp" line="273"/>
1124
-        <location filename="../ImportDialog.cpp" line="304"/>
1125
-        <location filename="../ImportDialog.cpp" line="313"/>
1126
-        <location filename="../ImportDialog.cpp" line="467"/>
1127
-        <location filename="../ImportDialog.cpp" line="498"/>
1128
-        <location filename="../ImportDialog.cpp" line="507"/>
1143
+        <location filename="../ImportDialog.cpp" line="317"/>
1144
+        <location filename="../ImportDialog.cpp" line="348"/>
1145
+        <location filename="../ImportDialog.cpp" line="357"/>
1146
+        <location filename="../ImportDialog.cpp" line="511"/>
1147
+        <location filename="../ImportDialog.cpp" line="542"/>
1148
+        <location filename="../ImportDialog.cpp" line="551"/>
1129 1149
         <location filename="../ProfileInterface.cpp" line="483"/>
1130 1150
         <location filename="../ProfileInterface.cpp" line="527"/>
1131 1151
         <location filename="../ProfileInterface.cpp" line="582"/>
@@ -1145,16 +1165,16 @@ Press 1 for Default View</source>
1145 1165
     </message>
1146 1166
     <message>
1147 1167
         <location filename="../ImageEditorDialog.cpp" line="120"/>
1148
-        <location filename="../ImportDialog.cpp" line="283"/>
1149
-        <location filename="../ImportDialog.cpp" line="477"/>
1168
+        <location filename="../ImportDialog.cpp" line="327"/>
1169
+        <location filename="../ImportDialog.cpp" line="521"/>
1150 1170
         <location filename="../ProfileInterface.cpp" line="502"/>
1151 1171
         <source>All image files (%1)</source>
1152 1172
         <translation type="unfinished"></translation>
1153 1173
     </message>
1154 1174
     <message>
1155 1175
         <location filename="../ImageEditorDialog.cpp" line="121"/>
1156
-        <location filename="../ImportDialog.cpp" line="284"/>
1157
-        <location filename="../ImportDialog.cpp" line="478"/>
1176
+        <location filename="../ImportDialog.cpp" line="328"/>
1177
+        <location filename="../ImportDialog.cpp" line="522"/>
1158 1178
         <location filename="../ProfileInterface.cpp" line="503"/>
1159 1179
         <location filename="../UserInterface.cpp" line="463"/>
1160 1180
         <source>All files (**)</source>
@@ -1162,16 +1182,16 @@ Press 1 for Default View</source>
1162 1182
     </message>
1163 1183
     <message>
1164 1184
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1165
-        <location filename="../ImportDialog.cpp" line="304"/>
1166
-        <location filename="../ImportDialog.cpp" line="498"/>
1185
+        <location filename="../ImportDialog.cpp" line="348"/>
1186
+        <location filename="../ImportDialog.cpp" line="542"/>
1167 1187
         <location filename="../ProfileInterface.cpp" line="725"/>
1168 1188
         <source>Can&apos;t import %1 because file can&apos;t be open</source>
1169 1189
         <translation type="unfinished"></translation>
1170 1190
     </message>
1171 1191
     <message>
1172 1192
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1173
-        <location filename="../ImportDialog.cpp" line="313"/>
1174
-        <location filename="../ImportDialog.cpp" line="507"/>
1193
+        <location filename="../ImportDialog.cpp" line="357"/>
1194
+        <location filename="../ImportDialog.cpp" line="551"/>
1175 1195
         <location filename="../ProfileInterface.cpp" line="735"/>
1176 1196
         <source>Can&apos;t import %1 because file can&apos;t be parsed properly</source>
1177 1197
         <translation type="unfinished"></translation>

BIN
res/gta5sync_de.qm View File


+ 52
- 32
res/gta5sync_de.ts View File

@@ -262,8 +262,8 @@ Snapmatic Bilder und Spielständen</translation>
262 262
     </message>
263 263
     <message>
264 264
         <location filename="../ImportDialog.ui" line="150"/>
265
-        <location filename="../ImportDialog.cpp" line="84"/>
266
-        <location filename="../ImportDialog.cpp" line="447"/>
265
+        <location filename="../ImportDialog.cpp" line="85"/>
266
+        <location filename="../ImportDialog.cpp" line="491"/>
267 267
         <source>Background Colour: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</source>
268 268
         <translation>Hintergrundfarbe: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</translation>
269 269
     </message>
@@ -289,7 +289,7 @@ Snapmatic Bilder und Spielständen</translation>
289 289
         <translation>Hintergrundbild entfernen</translation>
290 290
     </message>
291 291
     <message>
292
-        <location filename="../ImportDialog.cpp" line="512"/>
292
+        <location filename="../ImportDialog.cpp" line="556"/>
293 293
         <source>Background Image: %1</source>
294 294
         <translation>Hintergrundbild: %1</translation>
295 295
     </message>
@@ -314,70 +314,90 @@ Snapmatic Bilder und Spielständen</translation>
314 314
         <translation>&amp;Optionen</translation>
315 315
     </message>
316 316
     <message>
317
-        <location filename="../ImportDialog.ui" line="334"/>
317
+        <location filename="../ImportDialog.ui" line="337"/>
318 318
         <source>Import picture</source>
319 319
         <translation>Bild importieren</translation>
320 320
     </message>
321 321
     <message>
322
-        <location filename="../ImportDialog.ui" line="337"/>
322
+        <location filename="../ImportDialog.ui" line="340"/>
323 323
         <source>&amp;OK</source>
324 324
         <translation>&amp;OK</translation>
325 325
     </message>
326 326
     <message>
327
-        <location filename="../ImportDialog.ui" line="350"/>
327
+        <location filename="../ImportDialog.ui" line="353"/>
328 328
         <source>Discard picture</source>
329 329
         <translation>Bild verwerfen</translation>
330 330
     </message>
331 331
     <message>
332
-        <location filename="../ImportDialog.ui" line="353"/>
332
+        <location filename="../ImportDialog.ui" line="356"/>
333 333
         <source>&amp;Cancel</source>
334 334
         <translation>Abbre&amp;chen</translation>
335 335
     </message>
336 336
     <message>
337 337
         <location filename="../ImportDialog.ui" line="203"/>
338
-        <location filename="../ImportDialog.cpp" line="85"/>
339
-        <location filename="../ImportDialog.cpp" line="527"/>
338
+        <location filename="../ImportDialog.cpp" line="86"/>
339
+        <location filename="../ImportDialog.cpp" line="571"/>
340 340
         <source>Background Image:</source>
341 341
         <translation>Hintergrundbild:</translation>
342 342
     </message>
343 343
     <message>
344
-        <location filename="../ImportDialog.cpp" line="110"/>
344
+        <location filename="../ImportDialog.cpp" line="111"/>
345 345
         <source>&amp;Import new Picture...</source>
346 346
         <translation>Neues Bild &amp;importieren...</translation>
347 347
     </message>
348 348
     <message>
349
-        <location filename="../ImportDialog.cpp" line="183"/>
349
+        <location filename="../ImportDialog.cpp" line="112"/>
350
+        <source>&amp;Crop Picture...</source>
351
+        <translation>Bild zu&amp;schneiden...</translation>
352
+    </message>
353
+    <message>
354
+        <location filename="../ImportDialog.cpp" line="185"/>
350 355
         <location filename="../ProfileInterface.cpp" line="668"/>
351 356
         <source>Custom Avatar</source>
352 357
         <comment>Custom Avatar Description in SC, don&apos;t use Special Character!</comment>
353 358
         <translation>Eigener Avatar</translation>
354 359
     </message>
355 360
     <message>
356
-        <location filename="../ImportDialog.cpp" line="210"/>
361
+        <location filename="../ImportDialog.cpp" line="212"/>
357 362
         <location filename="../ProfileInterface.cpp" line="687"/>
358 363
         <source>Custom Picture</source>
359 364
         <comment>Custom Picture Description in SC, don&apos;t use Special Character!</comment>
360 365
         <translation>Eigenes Bild</translation>
361 366
     </message>
362 367
     <message>
363
-        <location filename="../ImportDialog.cpp" line="394"/>
368
+        <location filename="../ImportDialog.cpp" line="265"/>
369
+        <source>Crop Picture...</source>
370
+        <translation>Bild zuschneiden...</translation>
371
+    </message>
372
+    <message>
373
+        <location filename="../ImportDialog.cpp" line="287"/>
374
+        <source>&amp;Crop</source>
375
+        <translation>Zu&amp;schneiden</translation>
376
+    </message>
377
+    <message>
378
+        <location filename="../ImportDialog.cpp" line="288"/>
379
+        <source>Crop Picture</source>
380
+        <translation>Bild zuschneiden</translation>
381
+    </message>
382
+    <message>
383
+        <location filename="../ImportDialog.cpp" line="438"/>
364 384
         <source>Are you sure to use a square image outside of the Avatar Zone?
365 385
 When you want to use it as Avatar the image will be detached!</source>
366 386
         <translation>Bist du sicher ein Quadrat Bild außerhalb der Avatar Zone zu verwenden?
367 387
 Wenn du es als Avatar verwenden möchtest wird es abgetrennt!</translation>
368 388
     </message>
369 389
     <message>
370
-        <location filename="../ImportDialog.cpp" line="394"/>
390
+        <location filename="../ImportDialog.cpp" line="438"/>
371 391
         <source>Snapmatic Avatar Zone</source>
372 392
         <translation>Snapmatic Avatar Zone</translation>
373 393
     </message>
374 394
     <message>
375
-        <location filename="../ImportDialog.cpp" line="443"/>
395
+        <location filename="../ImportDialog.cpp" line="487"/>
376 396
         <source>Select Colour...</source>
377 397
         <translation>Farbe auswählen...</translation>
378 398
     </message>
379 399
     <message>
380
-        <location filename="../ImportDialog.cpp" line="512"/>
400
+        <location filename="../ImportDialog.cpp" line="556"/>
381 401
         <source>File</source>
382 402
         <comment>Background Image: File</comment>
383 403
         <translation>Datei</translation>
@@ -1135,8 +1155,8 @@ Drücke 1 für Standardmodus</translation>
1135 1155
     </message>
1136 1156
     <message>
1137 1157
         <location filename="../ImageEditorDialog.cpp" line="109"/>
1138
-        <location filename="../ImportDialog.cpp" line="272"/>
1139
-        <location filename="../ImportDialog.cpp" line="466"/>
1158
+        <location filename="../ImportDialog.cpp" line="316"/>
1159
+        <location filename="../ImportDialog.cpp" line="510"/>
1140 1160
         <location filename="../ProfileInterface.cpp" line="482"/>
1141 1161
         <location filename="../ProfileInterface.cpp" line="548"/>
1142 1162
         <location filename="../ProfileInterface.cpp" line="857"/>
@@ -1147,12 +1167,12 @@ Drücke 1 für Standardmodus</translation>
1147 1167
         <location filename="../ImageEditorDialog.cpp" line="110"/>
1148 1168
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1149 1169
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1150
-        <location filename="../ImportDialog.cpp" line="273"/>
1151
-        <location filename="../ImportDialog.cpp" line="304"/>
1152
-        <location filename="../ImportDialog.cpp" line="313"/>
1153
-        <location filename="../ImportDialog.cpp" line="467"/>
1154
-        <location filename="../ImportDialog.cpp" line="498"/>
1155
-        <location filename="../ImportDialog.cpp" line="507"/>
1170
+        <location filename="../ImportDialog.cpp" line="317"/>
1171
+        <location filename="../ImportDialog.cpp" line="348"/>
1172
+        <location filename="../ImportDialog.cpp" line="357"/>
1173
+        <location filename="../ImportDialog.cpp" line="511"/>
1174
+        <location filename="../ImportDialog.cpp" line="542"/>
1175
+        <location filename="../ImportDialog.cpp" line="551"/>
1156 1176
         <location filename="../ProfileInterface.cpp" line="483"/>
1157 1177
         <location filename="../ProfileInterface.cpp" line="527"/>
1158 1178
         <location filename="../ProfileInterface.cpp" line="582"/>
@@ -1189,16 +1209,16 @@ Drücke 1 für Standardmodus</translation>
1189 1209
     </message>
1190 1210
     <message>
1191 1211
         <location filename="../ImageEditorDialog.cpp" line="120"/>
1192
-        <location filename="../ImportDialog.cpp" line="283"/>
1193
-        <location filename="../ImportDialog.cpp" line="477"/>
1212
+        <location filename="../ImportDialog.cpp" line="327"/>
1213
+        <location filename="../ImportDialog.cpp" line="521"/>
1194 1214
         <location filename="../ProfileInterface.cpp" line="502"/>
1195 1215
         <source>All image files (%1)</source>
1196 1216
         <translation>Alle Bilddateien (%1)</translation>
1197 1217
     </message>
1198 1218
     <message>
1199 1219
         <location filename="../ImageEditorDialog.cpp" line="121"/>
1200
-        <location filename="../ImportDialog.cpp" line="284"/>
1201
-        <location filename="../ImportDialog.cpp" line="478"/>
1220
+        <location filename="../ImportDialog.cpp" line="328"/>
1221
+        <location filename="../ImportDialog.cpp" line="522"/>
1202 1222
         <location filename="../ProfileInterface.cpp" line="503"/>
1203 1223
         <location filename="../UserInterface.cpp" line="463"/>
1204 1224
         <source>All files (**)</source>
@@ -1233,16 +1253,16 @@ Drücke 1 für Standardmodus</translation>
1233 1253
     </message>
1234 1254
     <message>
1235 1255
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1236
-        <location filename="../ImportDialog.cpp" line="304"/>
1237
-        <location filename="../ImportDialog.cpp" line="498"/>
1256
+        <location filename="../ImportDialog.cpp" line="348"/>
1257
+        <location filename="../ImportDialog.cpp" line="542"/>
1238 1258
         <location filename="../ProfileInterface.cpp" line="725"/>
1239 1259
         <source>Can&apos;t import %1 because file can&apos;t be open</source>
1240 1260
         <translation>Kann %1 nicht importieren weil die Datei nicht geöffnet werden kann</translation>
1241 1261
     </message>
1242 1262
     <message>
1243 1263
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1244
-        <location filename="../ImportDialog.cpp" line="313"/>
1245
-        <location filename="../ImportDialog.cpp" line="507"/>
1264
+        <location filename="../ImportDialog.cpp" line="357"/>
1265
+        <location filename="../ImportDialog.cpp" line="551"/>
1246 1266
         <location filename="../ProfileInterface.cpp" line="735"/>
1247 1267
         <source>Can&apos;t import %1 because file can&apos;t be parsed properly</source>
1248 1268
         <translation>Kann %1 nicht importieren weil die Datei nicht richtig gelesen werden kann</translation>

+ 52
- 32
res/gta5sync_en_US.ts View File

@@ -226,8 +226,8 @@ Pictures and Savegames</source>
226 226
     </message>
227 227
     <message>
228 228
         <location filename="../ImportDialog.ui" line="150"/>
229
-        <location filename="../ImportDialog.cpp" line="84"/>
230
-        <location filename="../ImportDialog.cpp" line="447"/>
229
+        <location filename="../ImportDialog.cpp" line="85"/>
230
+        <location filename="../ImportDialog.cpp" line="491"/>
231 231
         <source>Background Colour: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</source>
232 232
         <translation>Background Color: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</translation>
233 233
     </message>
@@ -269,7 +269,7 @@ Pictures and Savegames</source>
269 269
         <translation></translation>
270 270
     </message>
271 271
     <message>
272
-        <location filename="../ImportDialog.cpp" line="512"/>
272
+        <location filename="../ImportDialog.cpp" line="556"/>
273 273
         <source>Background Image: %1</source>
274 274
         <translation></translation>
275 275
     </message>
@@ -304,69 +304,89 @@ Pictures and Savegames</source>
304 304
         <translation type="unfinished"></translation>
305 305
     </message>
306 306
     <message>
307
-        <location filename="../ImportDialog.ui" line="334"/>
307
+        <location filename="../ImportDialog.ui" line="337"/>
308 308
         <source>Import picture</source>
309 309
         <translation></translation>
310 310
     </message>
311 311
     <message>
312
-        <location filename="../ImportDialog.ui" line="337"/>
312
+        <location filename="../ImportDialog.ui" line="340"/>
313 313
         <source>&amp;OK</source>
314 314
         <translation></translation>
315 315
     </message>
316 316
     <message>
317
-        <location filename="../ImportDialog.ui" line="350"/>
317
+        <location filename="../ImportDialog.ui" line="353"/>
318 318
         <source>Discard picture</source>
319 319
         <translation></translation>
320 320
     </message>
321 321
     <message>
322
-        <location filename="../ImportDialog.ui" line="353"/>
322
+        <location filename="../ImportDialog.ui" line="356"/>
323 323
         <source>&amp;Cancel</source>
324 324
         <translation></translation>
325 325
     </message>
326 326
     <message>
327 327
         <location filename="../ImportDialog.ui" line="203"/>
328
-        <location filename="../ImportDialog.cpp" line="85"/>
329
-        <location filename="../ImportDialog.cpp" line="527"/>
328
+        <location filename="../ImportDialog.cpp" line="86"/>
329
+        <location filename="../ImportDialog.cpp" line="571"/>
330 330
         <source>Background Image:</source>
331 331
         <translation></translation>
332 332
     </message>
333 333
     <message>
334
-        <location filename="../ImportDialog.cpp" line="110"/>
334
+        <location filename="../ImportDialog.cpp" line="111"/>
335 335
         <source>&amp;Import new Picture...</source>
336 336
         <translation type="unfinished"></translation>
337 337
     </message>
338 338
     <message>
339
-        <location filename="../ImportDialog.cpp" line="183"/>
339
+        <location filename="../ImportDialog.cpp" line="112"/>
340
+        <source>&amp;Crop Picture...</source>
341
+        <translation type="unfinished"></translation>
342
+    </message>
343
+    <message>
344
+        <location filename="../ImportDialog.cpp" line="185"/>
340 345
         <location filename="../ProfileInterface.cpp" line="668"/>
341 346
         <source>Custom Avatar</source>
342 347
         <comment>Custom Avatar Description in SC, don&apos;t use Special Character!</comment>
343 348
         <translation></translation>
344 349
     </message>
345 350
     <message>
346
-        <location filename="../ImportDialog.cpp" line="210"/>
351
+        <location filename="../ImportDialog.cpp" line="212"/>
347 352
         <location filename="../ProfileInterface.cpp" line="687"/>
348 353
         <source>Custom Picture</source>
349 354
         <comment>Custom Picture Description in SC, don&apos;t use Special Character!</comment>
350 355
         <translation></translation>
351 356
     </message>
352 357
     <message>
353
-        <location filename="../ImportDialog.cpp" line="394"/>
358
+        <location filename="../ImportDialog.cpp" line="265"/>
359
+        <source>Crop Picture...</source>
360
+        <translation type="unfinished"></translation>
361
+    </message>
362
+    <message>
363
+        <location filename="../ImportDialog.cpp" line="287"/>
364
+        <source>&amp;Crop</source>
365
+        <translation type="unfinished"></translation>
366
+    </message>
367
+    <message>
368
+        <location filename="../ImportDialog.cpp" line="288"/>
369
+        <source>Crop Picture</source>
370
+        <translation type="unfinished"></translation>
371
+    </message>
372
+    <message>
373
+        <location filename="../ImportDialog.cpp" line="438"/>
354 374
         <source>Snapmatic Avatar Zone</source>
355 375
         <translation></translation>
356 376
     </message>
357 377
     <message>
358
-        <location filename="../ImportDialog.cpp" line="394"/>
378
+        <location filename="../ImportDialog.cpp" line="438"/>
359 379
         <source>Are you sure to use a square image outside of the Avatar Zone?
360 380
 When you want to use it as Avatar the image will be detached!</source>
361 381
         <translation></translation>
362 382
     </message>
363 383
     <message>
364
-        <location filename="../ImportDialog.cpp" line="443"/>
384
+        <location filename="../ImportDialog.cpp" line="487"/>
365 385
         <source>Select Colour...</source>
366 386
         <translation>Select Color...</translation>
367 387
     </message>
368 388
     <message>
369
-        <location filename="../ImportDialog.cpp" line="512"/>
389
+        <location filename="../ImportDialog.cpp" line="556"/>
370 390
         <source>File</source>
371 391
         <comment>Background Image: File</comment>
372 392
         <translation></translation>
@@ -1128,8 +1148,8 @@ Press 1 for Default View</source>
1128 1148
     </message>
1129 1149
     <message>
1130 1150
         <location filename="../ImageEditorDialog.cpp" line="109"/>
1131
-        <location filename="../ImportDialog.cpp" line="272"/>
1132
-        <location filename="../ImportDialog.cpp" line="466"/>
1151
+        <location filename="../ImportDialog.cpp" line="316"/>
1152
+        <location filename="../ImportDialog.cpp" line="510"/>
1133 1153
         <location filename="../ProfileInterface.cpp" line="482"/>
1134 1154
         <location filename="../ProfileInterface.cpp" line="548"/>
1135 1155
         <location filename="../ProfileInterface.cpp" line="857"/>
@@ -1140,12 +1160,12 @@ Press 1 for Default View</source>
1140 1160
         <location filename="../ImageEditorDialog.cpp" line="110"/>
1141 1161
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1142 1162
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1143
-        <location filename="../ImportDialog.cpp" line="273"/>
1144
-        <location filename="../ImportDialog.cpp" line="304"/>
1145
-        <location filename="../ImportDialog.cpp" line="313"/>
1146
-        <location filename="../ImportDialog.cpp" line="467"/>
1147
-        <location filename="../ImportDialog.cpp" line="498"/>
1148
-        <location filename="../ImportDialog.cpp" line="507"/>
1163
+        <location filename="../ImportDialog.cpp" line="317"/>
1164
+        <location filename="../ImportDialog.cpp" line="348"/>
1165
+        <location filename="../ImportDialog.cpp" line="357"/>
1166
+        <location filename="../ImportDialog.cpp" line="511"/>
1167
+        <location filename="../ImportDialog.cpp" line="542"/>
1168
+        <location filename="../ImportDialog.cpp" line="551"/>
1149 1169
         <location filename="../ProfileInterface.cpp" line="483"/>
1150 1170
         <location filename="../ProfileInterface.cpp" line="527"/>
1151 1171
         <location filename="../ProfileInterface.cpp" line="582"/>
@@ -1188,16 +1208,16 @@ Press 1 for Default View</source>
1188 1208
     </message>
1189 1209
     <message>
1190 1210
         <location filename="../ImageEditorDialog.cpp" line="120"/>
1191
-        <location filename="../ImportDialog.cpp" line="283"/>
1192
-        <location filename="../ImportDialog.cpp" line="477"/>
1211
+        <location filename="../ImportDialog.cpp" line="327"/>
1212
+        <location filename="../ImportDialog.cpp" line="521"/>
1193 1213
         <location filename="../ProfileInterface.cpp" line="502"/>
1194 1214
         <source>All image files (%1)</source>
1195 1215
         <translation></translation>
1196 1216
     </message>
1197 1217
     <message>
1198 1218
         <location filename="../ImageEditorDialog.cpp" line="121"/>
1199
-        <location filename="../ImportDialog.cpp" line="284"/>
1200
-        <location filename="../ImportDialog.cpp" line="478"/>
1219
+        <location filename="../ImportDialog.cpp" line="328"/>
1220
+        <location filename="../ImportDialog.cpp" line="522"/>
1201 1221
         <location filename="../ProfileInterface.cpp" line="503"/>
1202 1222
         <location filename="../UserInterface.cpp" line="463"/>
1203 1223
         <source>All files (**)</source>
@@ -1237,16 +1257,16 @@ Press 1 for Default View</source>
1237 1257
     </message>
1238 1258
     <message>
1239 1259
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1240
-        <location filename="../ImportDialog.cpp" line="304"/>
1241
-        <location filename="../ImportDialog.cpp" line="498"/>
1260
+        <location filename="../ImportDialog.cpp" line="348"/>
1261
+        <location filename="../ImportDialog.cpp" line="542"/>
1242 1262
         <location filename="../ProfileInterface.cpp" line="725"/>
1243 1263
         <source>Can&apos;t import %1 because file can&apos;t be open</source>
1244 1264
         <translation></translation>
1245 1265
     </message>
1246 1266
     <message>
1247 1267
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1248
-        <location filename="../ImportDialog.cpp" line="313"/>
1249
-        <location filename="../ImportDialog.cpp" line="507"/>
1268
+        <location filename="../ImportDialog.cpp" line="357"/>
1269
+        <location filename="../ImportDialog.cpp" line="551"/>
1250 1270
         <location filename="../ProfileInterface.cpp" line="735"/>
1251 1271
         <source>Can&apos;t import %1 because file can&apos;t be parsed properly</source>
1252 1272
         <translation></translation>

+ 52
- 32
res/gta5sync_fr.ts View File

@@ -262,8 +262,8 @@ et les fichiers de sauvegarde de Grand Theft Auto V</translation>
262 262
     </message>
263 263
     <message>
264 264
         <location filename="../ImportDialog.ui" line="150"/>
265
-        <location filename="../ImportDialog.cpp" line="84"/>
266
-        <location filename="../ImportDialog.cpp" line="447"/>
265
+        <location filename="../ImportDialog.cpp" line="85"/>
266
+        <location filename="../ImportDialog.cpp" line="491"/>
267 267
         <source>Background Colour: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</source>
268 268
         <translation>Couleur de fond : &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</translation>
269 269
     </message>
@@ -289,7 +289,7 @@ et les fichiers de sauvegarde de Grand Theft Auto V</translation>
289 289
         <translation type="unfinished"></translation>
290 290
     </message>
291 291
     <message>
292
-        <location filename="../ImportDialog.cpp" line="512"/>
292
+        <location filename="../ImportDialog.cpp" line="556"/>
293 293
         <source>Background Image: %1</source>
294 294
         <translation>Image de fond : %1</translation>
295 295
     </message>
@@ -314,70 +314,90 @@ et les fichiers de sauvegarde de Grand Theft Auto V</translation>
314 314
         <translation type="unfinished"></translation>
315 315
     </message>
316 316
     <message>
317
-        <location filename="../ImportDialog.ui" line="334"/>
317
+        <location filename="../ImportDialog.ui" line="337"/>
318 318
         <source>Import picture</source>
319 319
         <translation>Importer l&apos;image</translation>
320 320
     </message>
321 321
     <message>
322
-        <location filename="../ImportDialog.ui" line="337"/>
322
+        <location filename="../ImportDialog.ui" line="340"/>
323 323
         <source>&amp;OK</source>
324 324
         <translation>&amp;OK</translation>
325 325
     </message>
326 326
     <message>
327
-        <location filename="../ImportDialog.ui" line="350"/>
327
+        <location filename="../ImportDialog.ui" line="353"/>
328 328
         <source>Discard picture</source>
329 329
         <translation>Supprimer l&apos;image</translation>
330 330
     </message>
331 331
     <message>
332
-        <location filename="../ImportDialog.ui" line="353"/>
332
+        <location filename="../ImportDialog.ui" line="356"/>
333 333
         <source>&amp;Cancel</source>
334 334
         <translation>A&amp;nnuler</translation>
335 335
     </message>
336 336
     <message>
337 337
         <location filename="../ImportDialog.ui" line="203"/>
338
-        <location filename="../ImportDialog.cpp" line="85"/>
339
-        <location filename="../ImportDialog.cpp" line="527"/>
338
+        <location filename="../ImportDialog.cpp" line="86"/>
339
+        <location filename="../ImportDialog.cpp" line="571"/>
340 340
         <source>Background Image:</source>
341 341
         <translation>Image de fond :</translation>
342 342
     </message>
343 343
     <message>
344
-        <location filename="../ImportDialog.cpp" line="110"/>
344
+        <location filename="../ImportDialog.cpp" line="111"/>
345 345
         <source>&amp;Import new Picture...</source>
346 346
         <translation type="unfinished"></translation>
347 347
     </message>
348 348
     <message>
349
-        <location filename="../ImportDialog.cpp" line="183"/>
349
+        <location filename="../ImportDialog.cpp" line="112"/>
350
+        <source>&amp;Crop Picture...</source>
351
+        <translation type="unfinished"></translation>
352
+    </message>
353
+    <message>
354
+        <location filename="../ImportDialog.cpp" line="185"/>
350 355
         <location filename="../ProfileInterface.cpp" line="668"/>
351 356
         <source>Custom Avatar</source>
352 357
         <comment>Custom Avatar Description in SC, don&apos;t use Special Character!</comment>
353 358
         <translation>Avatar personnalisé</translation>
354 359
     </message>
355 360
     <message>
356
-        <location filename="../ImportDialog.cpp" line="210"/>
361
+        <location filename="../ImportDialog.cpp" line="212"/>
357 362
         <location filename="../ProfileInterface.cpp" line="687"/>
358 363
         <source>Custom Picture</source>
359 364
         <comment>Custom Picture Description in SC, don&apos;t use Special Character!</comment>
360 365
         <translation>Image personnalisé</translation>
361 366
     </message>
362 367
     <message>
363
-        <location filename="../ImportDialog.cpp" line="394"/>
368
+        <location filename="../ImportDialog.cpp" line="265"/>
369
+        <source>Crop Picture...</source>
370
+        <translation type="unfinished"></translation>
371
+    </message>
372
+    <message>
373
+        <location filename="../ImportDialog.cpp" line="287"/>
374
+        <source>&amp;Crop</source>
375
+        <translation type="unfinished"></translation>
376
+    </message>
377
+    <message>
378
+        <location filename="../ImportDialog.cpp" line="288"/>
379
+        <source>Crop Picture</source>
380
+        <translation type="unfinished"></translation>
381
+    </message>
382
+    <message>
383
+        <location filename="../ImportDialog.cpp" line="438"/>
364 384
         <source>Are you sure to use a square image outside of the Avatar Zone?
365 385
 When you want to use it as Avatar the image will be detached!</source>
366 386
         <translation>Êtes-vous sûr d&apos;utiliser une image carrée en dehors de la Zone d&apos;Avatar ?
367 387
 Si vous l&apos;utilisez comme Avatar, l&apos;image sera détachée !</translation>
368 388
     </message>
369 389
     <message>
370
-        <location filename="../ImportDialog.cpp" line="394"/>
390
+        <location filename="../ImportDialog.cpp" line="438"/>
371 391
         <source>Snapmatic Avatar Zone</source>
372 392
         <translation>Zone d&apos;Avatar Snapmatic</translation>
373 393
     </message>
374 394
     <message>
375
-        <location filename="../ImportDialog.cpp" line="443"/>
395
+        <location filename="../ImportDialog.cpp" line="487"/>
376 396
         <source>Select Colour...</source>
377 397
         <translation>Choisir une couleur...</translation>
378 398
     </message>
379 399
     <message>
380
-        <location filename="../ImportDialog.cpp" line="512"/>
400
+        <location filename="../ImportDialog.cpp" line="556"/>
381 401
         <source>File</source>
382 402
         <comment>Background Image: File</comment>
383 403
         <translation>Fichier</translation>
@@ -1146,8 +1166,8 @@ Appuyer sur 1 pour le mode par défaut</translation>
1146 1166
     </message>
1147 1167
     <message>
1148 1168
         <location filename="../ImageEditorDialog.cpp" line="109"/>
1149
-        <location filename="../ImportDialog.cpp" line="272"/>
1150
-        <location filename="../ImportDialog.cpp" line="466"/>
1169
+        <location filename="../ImportDialog.cpp" line="316"/>
1170
+        <location filename="../ImportDialog.cpp" line="510"/>
1151 1171
         <location filename="../ProfileInterface.cpp" line="482"/>
1152 1172
         <location filename="../ProfileInterface.cpp" line="548"/>
1153 1173
         <location filename="../ProfileInterface.cpp" line="857"/>
@@ -1158,12 +1178,12 @@ Appuyer sur 1 pour le mode par défaut</translation>
1158 1178
         <location filename="../ImageEditorDialog.cpp" line="110"/>
1159 1179
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1160 1180
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1161
-        <location filename="../ImportDialog.cpp" line="273"/>
1162
-        <location filename="../ImportDialog.cpp" line="304"/>
1163
-        <location filename="../ImportDialog.cpp" line="313"/>
1164
-        <location filename="../ImportDialog.cpp" line="467"/>
1165
-        <location filename="../ImportDialog.cpp" line="498"/>
1166
-        <location filename="../ImportDialog.cpp" line="507"/>
1181
+        <location filename="../ImportDialog.cpp" line="317"/>
1182
+        <location filename="../ImportDialog.cpp" line="348"/>
1183
+        <location filename="../ImportDialog.cpp" line="357"/>
1184
+        <location filename="../ImportDialog.cpp" line="511"/>
1185
+        <location filename="../ImportDialog.cpp" line="542"/>
1186
+        <location filename="../ImportDialog.cpp" line="551"/>
1167 1187
         <location filename="../ProfileInterface.cpp" line="483"/>
1168 1188
         <location filename="../ProfileInterface.cpp" line="527"/>
1169 1189
         <location filename="../ProfileInterface.cpp" line="582"/>
@@ -1195,16 +1215,16 @@ Appuyer sur 1 pour le mode par défaut</translation>
1195 1215
     </message>
1196 1216
     <message>
1197 1217
         <location filename="../ImageEditorDialog.cpp" line="120"/>
1198
-        <location filename="../ImportDialog.cpp" line="283"/>
1199
-        <location filename="../ImportDialog.cpp" line="477"/>
1218
+        <location filename="../ImportDialog.cpp" line="327"/>
1219
+        <location filename="../ImportDialog.cpp" line="521"/>
1200 1220
         <location filename="../ProfileInterface.cpp" line="502"/>
1201 1221
         <source>All image files (%1)</source>
1202 1222
         <translation>Toutes les images (%1)</translation>
1203 1223
     </message>
1204 1224
     <message>
1205 1225
         <location filename="../ImageEditorDialog.cpp" line="121"/>
1206
-        <location filename="../ImportDialog.cpp" line="284"/>
1207
-        <location filename="../ImportDialog.cpp" line="478"/>
1226
+        <location filename="../ImportDialog.cpp" line="328"/>
1227
+        <location filename="../ImportDialog.cpp" line="522"/>
1208 1228
         <location filename="../ProfileInterface.cpp" line="503"/>
1209 1229
         <location filename="../UserInterface.cpp" line="463"/>
1210 1230
         <source>All files (**)</source>
@@ -1251,16 +1271,16 @@ Appuyer sur 1 pour le mode par défaut</translation>
1251 1271
     </message>
1252 1272
     <message>
1253 1273
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1254
-        <location filename="../ImportDialog.cpp" line="304"/>
1255
-        <location filename="../ImportDialog.cpp" line="498"/>
1274
+        <location filename="../ImportDialog.cpp" line="348"/>
1275
+        <location filename="../ImportDialog.cpp" line="542"/>
1256 1276
         <location filename="../ProfileInterface.cpp" line="725"/>
1257 1277
         <source>Can&apos;t import %1 because file can&apos;t be open</source>
1258 1278
         <translation>Impossible d&apos;importer %1, le fichier ne peut pas être ouvert</translation>
1259 1279
     </message>
1260 1280
     <message>
1261 1281
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1262
-        <location filename="../ImportDialog.cpp" line="313"/>
1263
-        <location filename="../ImportDialog.cpp" line="507"/>
1282
+        <location filename="../ImportDialog.cpp" line="357"/>
1283
+        <location filename="../ImportDialog.cpp" line="551"/>
1264 1284
         <location filename="../ProfileInterface.cpp" line="735"/>
1265 1285
         <source>Can&apos;t import %1 because file can&apos;t be parsed properly</source>
1266 1286
         <translation>Impossible d&apos;importer %1, le fichier ne peut pas être parsé correctement</translation>

+ 52
- 32
res/gta5sync_ru.ts View File

@@ -264,8 +264,8 @@ Pictures and Savegames</source>
264 264
     </message>
265 265
     <message>
266 266
         <location filename="../ImportDialog.ui" line="150"/>
267
-        <location filename="../ImportDialog.cpp" line="84"/>
268
-        <location filename="../ImportDialog.cpp" line="447"/>
267
+        <location filename="../ImportDialog.cpp" line="85"/>
268
+        <location filename="../ImportDialog.cpp" line="491"/>
269 269
         <source>Background Colour: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</source>
270 270
         <translation>Цвет фона: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</translation>
271 271
     </message>
@@ -291,7 +291,7 @@ Pictures and Savegames</source>
291 291
         <translation type="unfinished"></translation>
292 292
     </message>
293 293
     <message>
294
-        <location filename="../ImportDialog.cpp" line="512"/>
294
+        <location filename="../ImportDialog.cpp" line="556"/>
295 295
         <source>Background Image: %1</source>
296 296
         <translation>Фоновая картинка: %1</translation>
297 297
     </message>
@@ -317,70 +317,90 @@ Pictures and Savegames</source>
317 317
         <translation type="unfinished"></translation>
318 318
     </message>
319 319
     <message>
320
-        <location filename="../ImportDialog.ui" line="334"/>
320
+        <location filename="../ImportDialog.ui" line="337"/>
321 321
         <source>Import picture</source>
322 322
         <translation>Импортировать картинку</translation>
323 323
     </message>
324 324
     <message>
325
-        <location filename="../ImportDialog.ui" line="337"/>
325
+        <location filename="../ImportDialog.ui" line="340"/>
326 326
         <source>&amp;OK</source>
327 327
         <translation>&amp;ОК</translation>
328 328
     </message>
329 329
     <message>
330
-        <location filename="../ImportDialog.ui" line="350"/>
330
+        <location filename="../ImportDialog.ui" line="353"/>
331 331
         <source>Discard picture</source>
332 332
         <translation>Отклонить картинку</translation>
333 333
     </message>
334 334
     <message>
335
-        <location filename="../ImportDialog.ui" line="353"/>
335
+        <location filename="../ImportDialog.ui" line="356"/>
336 336
         <source>&amp;Cancel</source>
337 337
         <translatorcomment>Я не уверен насчет горячих клавиш...</translatorcomment>
338 338
         <translation>От&amp;мена</translation>
339 339
     </message>
340 340
     <message>
341 341
         <location filename="../ImportDialog.ui" line="203"/>
342
-        <location filename="../ImportDialog.cpp" line="85"/>
343
-        <location filename="../ImportDialog.cpp" line="527"/>
342
+        <location filename="../ImportDialog.cpp" line="86"/>
343
+        <location filename="../ImportDialog.cpp" line="571"/>
344 344
         <source>Background Image:</source>
345 345
         <translation>Фоновая картинка:</translation>
346 346
     </message>
347 347
     <message>
348
-        <location filename="../ImportDialog.cpp" line="110"/>
348
+        <location filename="../ImportDialog.cpp" line="111"/>
349 349
         <source>&amp;Import new Picture...</source>
350 350
         <translation type="unfinished"></translation>
351 351
     </message>
352 352
     <message>
353
-        <location filename="../ImportDialog.cpp" line="183"/>
353
+        <location filename="../ImportDialog.cpp" line="112"/>
354
+        <source>&amp;Crop Picture...</source>
355
+        <translation type="unfinished"></translation>
356
+    </message>
357
+    <message>
358
+        <location filename="../ImportDialog.cpp" line="185"/>
354 359
         <location filename="../ProfileInterface.cpp" line="668"/>
355 360
         <source>Custom Avatar</source>
356 361
         <comment>Custom Avatar Description in SC, don&apos;t use Special Character!</comment>
357 362
         <translation>Свой Аватар</translation>
358 363
     </message>
359 364
     <message>
360
-        <location filename="../ImportDialog.cpp" line="210"/>
365
+        <location filename="../ImportDialog.cpp" line="212"/>
361 366
         <location filename="../ProfileInterface.cpp" line="687"/>
362 367
         <source>Custom Picture</source>
363 368
         <comment>Custom Picture Description in SC, don&apos;t use Special Character!</comment>
364 369
         <translation>Своя Картинка</translation>
365 370
     </message>
366 371
     <message>
367
-        <location filename="../ImportDialog.cpp" line="394"/>
372
+        <location filename="../ImportDialog.cpp" line="265"/>
373
+        <source>Crop Picture...</source>
374
+        <translation type="unfinished"></translation>
375
+    </message>
376
+    <message>
377
+        <location filename="../ImportDialog.cpp" line="287"/>
378
+        <source>&amp;Crop</source>
379
+        <translation type="unfinished"></translation>
380
+    </message>
381
+    <message>
382
+        <location filename="../ImportDialog.cpp" line="288"/>
383
+        <source>Crop Picture</source>
384
+        <translation type="unfinished"></translation>
385
+    </message>
386
+    <message>
387
+        <location filename="../ImportDialog.cpp" line="438"/>
368 388
         <source>Are you sure to use a square image outside of the Avatar Zone?
369 389
 When you want to use it as Avatar the image will be detached!</source>
370 390
         <translation>Ты точно хочешь использовать квадратное изображение вне зоны аватарки? Если это аватар, то изображение будет обрезано!</translation>
371 391
     </message>
372 392
     <message>
373
-        <location filename="../ImportDialog.cpp" line="394"/>
393
+        <location filename="../ImportDialog.cpp" line="438"/>
374 394
         <source>Snapmatic Avatar Zone</source>
375 395
         <translation>Зона Snapmatic Аватарки</translation>
376 396
     </message>
377 397
     <message>
378
-        <location filename="../ImportDialog.cpp" line="443"/>
398
+        <location filename="../ImportDialog.cpp" line="487"/>
379 399
         <source>Select Colour...</source>
380 400
         <translation>Выбрать цвет...</translation>
381 401
     </message>
382 402
     <message>
383
-        <location filename="../ImportDialog.cpp" line="512"/>
403
+        <location filename="../ImportDialog.cpp" line="556"/>
384 404
         <source>File</source>
385 405
         <comment>Background Image: File</comment>
386 406
         <translation>Файл</translation>
@@ -1140,8 +1160,8 @@ Press 1 for Default View</source>
1140 1160
     </message>
1141 1161
     <message>
1142 1162
         <location filename="../ImageEditorDialog.cpp" line="109"/>
1143
-        <location filename="../ImportDialog.cpp" line="272"/>
1144
-        <location filename="../ImportDialog.cpp" line="466"/>
1163
+        <location filename="../ImportDialog.cpp" line="316"/>
1164
+        <location filename="../ImportDialog.cpp" line="510"/>
1145 1165
         <location filename="../ProfileInterface.cpp" line="482"/>
1146 1166
         <location filename="../ProfileInterface.cpp" line="548"/>
1147 1167
         <location filename="../ProfileInterface.cpp" line="857"/>
@@ -1152,12 +1172,12 @@ Press 1 for Default View</source>
1152 1172
         <location filename="../ImageEditorDialog.cpp" line="110"/>
1153 1173
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1154 1174
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1155
-        <location filename="../ImportDialog.cpp" line="273"/>
1156
-        <location filename="../ImportDialog.cpp" line="304"/>
1157
-        <location filename="../ImportDialog.cpp" line="313"/>
1158
-        <location filename="../ImportDialog.cpp" line="467"/>
1159
-        <location filename="../ImportDialog.cpp" line="498"/>
1160
-        <location filename="../ImportDialog.cpp" line="507"/>
1175
+        <location filename="../ImportDialog.cpp" line="317"/>
1176
+        <location filename="../ImportDialog.cpp" line="348"/>
1177
+        <location filename="../ImportDialog.cpp" line="357"/>
1178
+        <location filename="../ImportDialog.cpp" line="511"/>
1179
+        <location filename="../ImportDialog.cpp" line="542"/>
1180
+        <location filename="../ImportDialog.cpp" line="551"/>
1161 1181
         <location filename="../ProfileInterface.cpp" line="483"/>
1162 1182
         <location filename="../ProfileInterface.cpp" line="527"/>
1163 1183
         <location filename="../ProfileInterface.cpp" line="582"/>
@@ -1189,8 +1209,8 @@ Press 1 for Default View</source>
1189 1209
     </message>
1190 1210
     <message>
1191 1211
         <location filename="../ImageEditorDialog.cpp" line="121"/>
1192
-        <location filename="../ImportDialog.cpp" line="284"/>
1193
-        <location filename="../ImportDialog.cpp" line="478"/>
1212
+        <location filename="../ImportDialog.cpp" line="328"/>
1213
+        <location filename="../ImportDialog.cpp" line="522"/>
1194 1214
         <location filename="../ProfileInterface.cpp" line="503"/>
1195 1215
         <location filename="../UserInterface.cpp" line="463"/>
1196 1216
         <source>All files (**)</source>
@@ -1242,24 +1262,24 @@ Press 1 for Default View</source>
1242 1262
     </message>
1243 1263
     <message>
1244 1264
         <location filename="../ImageEditorDialog.cpp" line="120"/>
1245
-        <location filename="../ImportDialog.cpp" line="283"/>
1246
-        <location filename="../ImportDialog.cpp" line="477"/>
1265
+        <location filename="../ImportDialog.cpp" line="327"/>
1266
+        <location filename="../ImportDialog.cpp" line="521"/>
1247 1267
         <location filename="../ProfileInterface.cpp" line="502"/>
1248 1268
         <source>All image files (%1)</source>
1249 1269
         <translation>Все файлы изображений (%1)</translation>
1250 1270
     </message>
1251 1271
     <message>
1252 1272
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1253
-        <location filename="../ImportDialog.cpp" line="304"/>
1254
-        <location filename="../ImportDialog.cpp" line="498"/>
1273
+        <location filename="../ImportDialog.cpp" line="348"/>
1274
+        <location filename="../ImportDialog.cpp" line="542"/>
1255 1275
         <location filename="../ProfileInterface.cpp" line="725"/>
1256 1276
         <source>Can&apos;t import %1 because file can&apos;t be open</source>
1257 1277
         <translation>Не удалось открыть %1, файл не может быть открыт</translation>
1258 1278
     </message>
1259 1279
     <message>
1260 1280
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1261
-        <location filename="../ImportDialog.cpp" line="313"/>
1262
-        <location filename="../ImportDialog.cpp" line="507"/>
1281
+        <location filename="../ImportDialog.cpp" line="357"/>
1282
+        <location filename="../ImportDialog.cpp" line="551"/>
1263 1283
         <location filename="../ProfileInterface.cpp" line="735"/>
1264 1284
         <source>Can&apos;t import %1 because file can&apos;t be parsed properly</source>
1265 1285
         <translation>Не получилось импортировать %1, файл не может быть правильно обработан</translation>

+ 52
- 32
res/gta5sync_uk.ts View File

@@ -262,8 +262,8 @@ Pictures and Savegames</source>
262 262
     </message>
263 263
     <message>
264 264
         <location filename="../ImportDialog.ui" line="150"/>
265
-        <location filename="../ImportDialog.cpp" line="84"/>
266
-        <location filename="../ImportDialog.cpp" line="447"/>
265
+        <location filename="../ImportDialog.cpp" line="85"/>
266
+        <location filename="../ImportDialog.cpp" line="491"/>
267 267
         <source>Background Colour: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</source>
268 268
         <translation>Фоновий колір: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</translation>
269 269
     </message>
@@ -280,8 +280,8 @@ Pictures and Savegames</source>
280 280
     </message>
281 281
     <message>
282 282
         <location filename="../ImportDialog.ui" line="203"/>
283
-        <location filename="../ImportDialog.cpp" line="85"/>
284
-        <location filename="../ImportDialog.cpp" line="527"/>
283
+        <location filename="../ImportDialog.cpp" line="86"/>
284
+        <location filename="../ImportDialog.cpp" line="571"/>
285 285
         <source>Background Image:</source>
286 286
         <translation>Фонове зображення:</translation>
287 287
     </message>
@@ -316,68 +316,88 @@ Pictures and Savegames</source>
316 316
         <translation type="unfinished"></translation>
317 317
     </message>
318 318
     <message>
319
-        <location filename="../ImportDialog.ui" line="334"/>
319
+        <location filename="../ImportDialog.ui" line="337"/>
320 320
         <source>Import picture</source>
321 321
         <translation>Імпортувати зображення</translation>
322 322
     </message>
323 323
     <message>
324
-        <location filename="../ImportDialog.ui" line="337"/>
324
+        <location filename="../ImportDialog.ui" line="340"/>
325 325
         <source>&amp;OK</source>
326 326
         <translation>&amp;OK</translation>
327 327
     </message>
328 328
     <message>
329
-        <location filename="../ImportDialog.ui" line="350"/>
329
+        <location filename="../ImportDialog.ui" line="353"/>
330 330
         <source>Discard picture</source>
331 331
         <translation>Відхилити зображення</translation>
332 332
     </message>
333 333
     <message>
334
-        <location filename="../ImportDialog.ui" line="353"/>
334
+        <location filename="../ImportDialog.ui" line="356"/>
335 335
         <source>&amp;Cancel</source>
336 336
         <translation>&amp;Скасувати</translation>
337 337
     </message>
338 338
     <message>
339
-        <location filename="../ImportDialog.cpp" line="110"/>
339
+        <location filename="../ImportDialog.cpp" line="111"/>
340 340
         <source>&amp;Import new Picture...</source>
341 341
         <translation type="unfinished"></translation>
342 342
     </message>
343 343
     <message>
344
-        <location filename="../ImportDialog.cpp" line="183"/>
344
+        <location filename="../ImportDialog.cpp" line="112"/>
345
+        <source>&amp;Crop Picture...</source>
346
+        <translation type="unfinished"></translation>
347
+    </message>
348
+    <message>
349
+        <location filename="../ImportDialog.cpp" line="185"/>
345 350
         <location filename="../ProfileInterface.cpp" line="668"/>
346 351
         <source>Custom Avatar</source>
347 352
         <comment>Custom Avatar Description in SC, don&apos;t use Special Character!</comment>
348 353
         <translation>Користувацький Аватар</translation>
349 354
     </message>
350 355
     <message>
351
-        <location filename="../ImportDialog.cpp" line="210"/>
356
+        <location filename="../ImportDialog.cpp" line="212"/>
352 357
         <location filename="../ProfileInterface.cpp" line="687"/>
353 358
         <source>Custom Picture</source>
354 359
         <comment>Custom Picture Description in SC, don&apos;t use Special Character!</comment>
355 360
         <translation>Користувацьке Зображення</translation>
356 361
     </message>
357 362
     <message>
358
-        <location filename="../ImportDialog.cpp" line="394"/>
363
+        <location filename="../ImportDialog.cpp" line="265"/>
364
+        <source>Crop Picture...</source>
365
+        <translation type="unfinished"></translation>
366
+    </message>
367
+    <message>
368
+        <location filename="../ImportDialog.cpp" line="287"/>
369
+        <source>&amp;Crop</source>
370
+        <translation type="unfinished"></translation>
371
+    </message>
372
+    <message>
373
+        <location filename="../ImportDialog.cpp" line="288"/>
374
+        <source>Crop Picture</source>
375
+        <translation type="unfinished"></translation>
376
+    </message>
377
+    <message>
378
+        <location filename="../ImportDialog.cpp" line="438"/>
359 379
         <source>Snapmatic Avatar Zone</source>
360 380
         <translation>Зона Snapmatic Аватару</translation>
361 381
     </message>
362 382
     <message>
363
-        <location filename="../ImportDialog.cpp" line="394"/>
383
+        <location filename="../ImportDialog.cpp" line="438"/>
364 384
         <source>Are you sure to use a square image outside of the Avatar Zone?
365 385
 When you want to use it as Avatar the image will be detached!</source>
366 386
         <translation>Ви впевнені, що будете використовувати квадратне зображення поза зоною аватара?
367 387
 Якщо ви хочете використовувати його як Аватар, зображення буде відокремлено!</translation>
368 388
     </message>
369 389
     <message>
370
-        <location filename="../ImportDialog.cpp" line="443"/>
390
+        <location filename="../ImportDialog.cpp" line="487"/>
371 391
         <source>Select Colour...</source>
372 392
         <translation>Вибір кольору...</translation>
373 393
     </message>
374 394
     <message>
375
-        <location filename="../ImportDialog.cpp" line="512"/>
395
+        <location filename="../ImportDialog.cpp" line="556"/>
376 396
         <source>Background Image: %1</source>
377 397
         <translation>Фонове зображення: %1</translation>
378 398
     </message>
379 399
     <message>
380
-        <location filename="../ImportDialog.cpp" line="512"/>
400
+        <location filename="../ImportDialog.cpp" line="556"/>
381 401
         <source>File</source>
382 402
         <comment>Background Image: File</comment>
383 403
         <translation>Файл</translation>
@@ -1126,8 +1146,8 @@ Press 1 for Default View</source>
1126 1146
     </message>
1127 1147
     <message>
1128 1148
         <location filename="../ImageEditorDialog.cpp" line="109"/>
1129
-        <location filename="../ImportDialog.cpp" line="272"/>
1130
-        <location filename="../ImportDialog.cpp" line="466"/>
1149
+        <location filename="../ImportDialog.cpp" line="316"/>
1150
+        <location filename="../ImportDialog.cpp" line="510"/>
1131 1151
         <location filename="../ProfileInterface.cpp" line="482"/>
1132 1152
         <location filename="../ProfileInterface.cpp" line="548"/>
1133 1153
         <location filename="../ProfileInterface.cpp" line="857"/>
@@ -1138,12 +1158,12 @@ Press 1 for Default View</source>
1138 1158
         <location filename="../ImageEditorDialog.cpp" line="110"/>
1139 1159
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1140 1160
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1141
-        <location filename="../ImportDialog.cpp" line="273"/>
1142
-        <location filename="../ImportDialog.cpp" line="304"/>
1143
-        <location filename="../ImportDialog.cpp" line="313"/>
1144
-        <location filename="../ImportDialog.cpp" line="467"/>
1145
-        <location filename="../ImportDialog.cpp" line="498"/>
1146
-        <location filename="../ImportDialog.cpp" line="507"/>
1161
+        <location filename="../ImportDialog.cpp" line="317"/>
1162
+        <location filename="../ImportDialog.cpp" line="348"/>
1163
+        <location filename="../ImportDialog.cpp" line="357"/>
1164
+        <location filename="../ImportDialog.cpp" line="511"/>
1165
+        <location filename="../ImportDialog.cpp" line="542"/>
1166
+        <location filename="../ImportDialog.cpp" line="551"/>
1147 1167
         <location filename="../ProfileInterface.cpp" line="483"/>
1148 1168
         <location filename="../ProfileInterface.cpp" line="527"/>
1149 1169
         <location filename="../ProfileInterface.cpp" line="582"/>
@@ -1163,16 +1183,16 @@ Press 1 for Default View</source>
1163 1183
     </message>
1164 1184
     <message>
1165 1185
         <location filename="../ImageEditorDialog.cpp" line="120"/>
1166
-        <location filename="../ImportDialog.cpp" line="283"/>
1167
-        <location filename="../ImportDialog.cpp" line="477"/>
1186
+        <location filename="../ImportDialog.cpp" line="327"/>
1187
+        <location filename="../ImportDialog.cpp" line="521"/>
1168 1188
         <location filename="../ProfileInterface.cpp" line="502"/>
1169 1189
         <source>All image files (%1)</source>
1170 1190
         <translation>Файли зображень (%1)</translation>
1171 1191
     </message>
1172 1192
     <message>
1173 1193
         <location filename="../ImageEditorDialog.cpp" line="121"/>
1174
-        <location filename="../ImportDialog.cpp" line="284"/>
1175
-        <location filename="../ImportDialog.cpp" line="478"/>
1194
+        <location filename="../ImportDialog.cpp" line="328"/>
1195
+        <location filename="../ImportDialog.cpp" line="522"/>
1176 1196
         <location filename="../ProfileInterface.cpp" line="503"/>
1177 1197
         <location filename="../UserInterface.cpp" line="463"/>
1178 1198
         <source>All files (**)</source>
@@ -1180,16 +1200,16 @@ Press 1 for Default View</source>
1180 1200
     </message>
1181 1201
     <message>
1182 1202
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1183
-        <location filename="../ImportDialog.cpp" line="304"/>
1184
-        <location filename="../ImportDialog.cpp" line="498"/>
1203
+        <location filename="../ImportDialog.cpp" line="348"/>
1204
+        <location filename="../ImportDialog.cpp" line="542"/>
1185 1205
         <location filename="../ProfileInterface.cpp" line="725"/>
1186 1206
         <source>Can&apos;t import %1 because file can&apos;t be open</source>
1187 1207
         <translation>Неможливо імпортувати %1, оскільки файл не може бути відкритий</translation>
1188 1208
     </message>
1189 1209
     <message>
1190 1210
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1191
-        <location filename="../ImportDialog.cpp" line="313"/>
1192
-        <location filename="../ImportDialog.cpp" line="507"/>
1211
+        <location filename="../ImportDialog.cpp" line="357"/>
1212
+        <location filename="../ImportDialog.cpp" line="551"/>
1193 1213
         <location filename="../ProfileInterface.cpp" line="735"/>
1194 1214
         <source>Can&apos;t import %1 because file can&apos;t be parsed properly</source>
1195 1215
         <translation>Неможливо імпортувати %1, оскільки файл неможливо розібрати правильно</translation>

+ 52
- 32
res/gta5sync_zh_TW.ts View File

@@ -261,8 +261,8 @@ Pictures and Savegames</source>
261 261
     </message>
262 262
     <message>
263 263
         <location filename="../ImportDialog.ui" line="150"/>
264
-        <location filename="../ImportDialog.cpp" line="84"/>
265
-        <location filename="../ImportDialog.cpp" line="447"/>
264
+        <location filename="../ImportDialog.cpp" line="85"/>
265
+        <location filename="../ImportDialog.cpp" line="491"/>
266 266
         <source>Background Colour: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</source>
267 267
         <translation>背景顏色: &lt;span style=&quot;color: %1&quot;&gt;%1&lt;/span&gt;</translation>
268 268
     </message>
@@ -279,8 +279,8 @@ Pictures and Savegames</source>
279 279
     </message>
280 280
     <message>
281 281
         <location filename="../ImportDialog.ui" line="203"/>
282
-        <location filename="../ImportDialog.cpp" line="85"/>
283
-        <location filename="../ImportDialog.cpp" line="527"/>
282
+        <location filename="../ImportDialog.cpp" line="86"/>
283
+        <location filename="../ImportDialog.cpp" line="571"/>
284 284
         <source>Background Image:</source>
285 285
         <translation>背景圖片:</translation>
286 286
     </message>
@@ -315,67 +315,87 @@ Pictures and Savegames</source>
315 315
         <translation type="unfinished"></translation>
316 316
     </message>
317 317
     <message>
318
-        <location filename="../ImportDialog.ui" line="334"/>
318
+        <location filename="../ImportDialog.ui" line="337"/>
319 319
         <source>Import picture</source>
320 320
         <translation>匯入圖片</translation>
321 321
     </message>
322 322
     <message>
323
-        <location filename="../ImportDialog.ui" line="337"/>
323
+        <location filename="../ImportDialog.ui" line="340"/>
324 324
         <source>&amp;OK</source>
325 325
         <translation>確定(&amp;O)</translation>
326 326
     </message>
327 327
     <message>
328
-        <location filename="../ImportDialog.ui" line="350"/>
328
+        <location filename="../ImportDialog.ui" line="353"/>
329 329
         <source>Discard picture</source>
330 330
         <translation>捨棄圖片</translation>
331 331
     </message>
332 332
     <message>
333
-        <location filename="../ImportDialog.ui" line="353"/>
333
+        <location filename="../ImportDialog.ui" line="356"/>
334 334
         <source>&amp;Cancel</source>
335 335
         <translation>取消(&amp;C)</translation>
336 336
     </message>
337 337
     <message>
338
-        <location filename="../ImportDialog.cpp" line="110"/>
338
+        <location filename="../ImportDialog.cpp" line="111"/>
339 339
         <source>&amp;Import new Picture...</source>
340 340
         <translation type="unfinished"></translation>
341 341
     </message>
342 342
     <message>
343
-        <location filename="../ImportDialog.cpp" line="183"/>
343
+        <location filename="../ImportDialog.cpp" line="112"/>
344
+        <source>&amp;Crop Picture...</source>
345
+        <translation type="unfinished"></translation>
346
+    </message>
347
+    <message>
348
+        <location filename="../ImportDialog.cpp" line="185"/>
344 349
         <location filename="../ProfileInterface.cpp" line="668"/>
345 350
         <source>Custom Avatar</source>
346 351
         <comment>Custom Avatar Description in SC, don&apos;t use Special Character!</comment>
347 352
         <translation>自訂大頭貼</translation>
348 353
     </message>
349 354
     <message>
350
-        <location filename="../ImportDialog.cpp" line="210"/>
355
+        <location filename="../ImportDialog.cpp" line="212"/>
351 356
         <location filename="../ProfileInterface.cpp" line="687"/>
352 357
         <source>Custom Picture</source>
353 358
         <comment>Custom Picture Description in SC, don&apos;t use Special Character!</comment>
354 359
         <translation>自訂圖片</translation>
355 360
     </message>
356 361
     <message>
357
-        <location filename="../ImportDialog.cpp" line="394"/>
362
+        <location filename="../ImportDialog.cpp" line="265"/>
363
+        <source>Crop Picture...</source>
364
+        <translation type="unfinished"></translation>
365
+    </message>
366
+    <message>
367
+        <location filename="../ImportDialog.cpp" line="287"/>
368
+        <source>&amp;Crop</source>
369
+        <translation type="unfinished"></translation>
370
+    </message>
371
+    <message>
372
+        <location filename="../ImportDialog.cpp" line="288"/>
373
+        <source>Crop Picture</source>
374
+        <translation type="unfinished"></translation>
375
+    </message>
376
+    <message>
377
+        <location filename="../ImportDialog.cpp" line="438"/>
358 378
         <source>Snapmatic Avatar Zone</source>
359 379
         <translation>Snapmatic 大頭貼區域</translation>
360 380
     </message>
361 381
     <message>
362
-        <location filename="../ImportDialog.cpp" line="394"/>
382
+        <location filename="../ImportDialog.cpp" line="438"/>
363 383
         <source>Are you sure to use a square image outside of the Avatar Zone?
364 384
 When you want to use it as Avatar the image will be detached!</source>
365 385
         <translation>你確定要在大頭貼區域以外的地方使用方形圖片嗎? 作為大頭貼的圖片將被分離!</translation>
366 386
     </message>
367 387
     <message>
368
-        <location filename="../ImportDialog.cpp" line="443"/>
388
+        <location filename="../ImportDialog.cpp" line="487"/>
369 389
         <source>Select Colour...</source>
370 390
         <translation>選擇顏色...</translation>
371 391
     </message>
372 392
     <message>
373
-        <location filename="../ImportDialog.cpp" line="512"/>
393
+        <location filename="../ImportDialog.cpp" line="556"/>
374 394
         <source>Background Image: %1</source>
375 395
         <translation>背景圖片: %1</translation>
376 396
     </message>
377 397
     <message>
378
-        <location filename="../ImportDialog.cpp" line="512"/>
398
+        <location filename="../ImportDialog.cpp" line="556"/>
379 399
         <source>File</source>
380 400
         <comment>Background Image: File</comment>
381 401
         <translation>文件</translation>
@@ -1124,8 +1144,8 @@ Press 1 for Default View</source>
1124 1144
     </message>
1125 1145
     <message>
1126 1146
         <location filename="../ImageEditorDialog.cpp" line="109"/>
1127
-        <location filename="../ImportDialog.cpp" line="272"/>
1128
-        <location filename="../ImportDialog.cpp" line="466"/>
1147
+        <location filename="../ImportDialog.cpp" line="316"/>
1148
+        <location filename="../ImportDialog.cpp" line="510"/>
1129 1149
         <location filename="../ProfileInterface.cpp" line="482"/>
1130 1150
         <location filename="../ProfileInterface.cpp" line="548"/>
1131 1151
         <location filename="../ProfileInterface.cpp" line="857"/>
@@ -1136,12 +1156,12 @@ Press 1 for Default View</source>
1136 1156
         <location filename="../ImageEditorDialog.cpp" line="110"/>
1137 1157
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1138 1158
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1139
-        <location filename="../ImportDialog.cpp" line="273"/>
1140
-        <location filename="../ImportDialog.cpp" line="304"/>
1141
-        <location filename="../ImportDialog.cpp" line="313"/>
1142
-        <location filename="../ImportDialog.cpp" line="467"/>
1143
-        <location filename="../ImportDialog.cpp" line="498"/>
1144
-        <location filename="../ImportDialog.cpp" line="507"/>
1159
+        <location filename="../ImportDialog.cpp" line="317"/>
1160
+        <location filename="../ImportDialog.cpp" line="348"/>
1161
+        <location filename="../ImportDialog.cpp" line="357"/>
1162
+        <location filename="../ImportDialog.cpp" line="511"/>
1163
+        <location filename="../ImportDialog.cpp" line="542"/>
1164
+        <location filename="../ImportDialog.cpp" line="551"/>
1145 1165
         <location filename="../ProfileInterface.cpp" line="483"/>
1146 1166
         <location filename="../ProfileInterface.cpp" line="527"/>
1147 1167
         <location filename="../ProfileInterface.cpp" line="582"/>
@@ -1161,16 +1181,16 @@ Press 1 for Default View</source>
1161 1181
     </message>
1162 1182
     <message>
1163 1183
         <location filename="../ImageEditorDialog.cpp" line="120"/>
1164
-        <location filename="../ImportDialog.cpp" line="283"/>
1165
-        <location filename="../ImportDialog.cpp" line="477"/>
1184
+        <location filename="../ImportDialog.cpp" line="327"/>
1185
+        <location filename="../ImportDialog.cpp" line="521"/>
1166 1186
         <location filename="../ProfileInterface.cpp" line="502"/>
1167 1187
         <source>All image files (%1)</source>
1168 1188
         <translation>所有圖片 (%1)</translation>
1169 1189
     </message>
1170 1190
     <message>
1171 1191
         <location filename="../ImageEditorDialog.cpp" line="121"/>
1172
-        <location filename="../ImportDialog.cpp" line="284"/>
1173
-        <location filename="../ImportDialog.cpp" line="478"/>
1192
+        <location filename="../ImportDialog.cpp" line="328"/>
1193
+        <location filename="../ImportDialog.cpp" line="522"/>
1174 1194
         <location filename="../ProfileInterface.cpp" line="503"/>
1175 1195
         <location filename="../UserInterface.cpp" line="463"/>
1176 1196
         <source>All files (**)</source>
@@ -1178,16 +1198,16 @@ Press 1 for Default View</source>
1178 1198
     </message>
1179 1199
     <message>
1180 1200
         <location filename="../ImageEditorDialog.cpp" line="141"/>
1181
-        <location filename="../ImportDialog.cpp" line="304"/>
1182
-        <location filename="../ImportDialog.cpp" line="498"/>
1201
+        <location filename="../ImportDialog.cpp" line="348"/>
1202
+        <location filename="../ImportDialog.cpp" line="542"/>
1183 1203
         <location filename="../ProfileInterface.cpp" line="725"/>
1184 1204
         <source>Can&apos;t import %1 because file can&apos;t be open</source>
1185 1205
         <translation>無法匯入 %1,因為檔案無法開啟</translation>
1186 1206
     </message>
1187 1207
     <message>
1188 1208
         <location filename="../ImageEditorDialog.cpp" line="150"/>
1189
-        <location filename="../ImportDialog.cpp" line="313"/>
1190
-        <location filename="../ImportDialog.cpp" line="507"/>
1209
+        <location filename="../ImportDialog.cpp" line="357"/>
1210
+        <location filename="../ImportDialog.cpp" line="551"/>
1191 1211
         <location filename="../ProfileInterface.cpp" line="735"/>
1192 1212
         <source>Can&apos;t import %1 because file can&apos;t be parsed properly</source>
1193 1213
         <translation>無法匯入 %1,因為檔案無法正確解析</translation>

anpro/JSHighlighter.cpp → uimod/JSHighlighter.cpp View File


anpro/JSHighlighter.h → uimod/JSHighlighter.h View File