Lines 39-44
Link Here
|
39 |
#include "qtlcmswidgets.h" |
39 |
#include "qtlcmswidgets.h" |
40 |
#include "qtmeasurementtooldialog.h" |
40 |
#include "qtmeasurementtooldialog.h" |
41 |
|
41 |
|
|
|
42 |
|
42 |
#ifdef USE_KDE |
43 |
#ifdef USE_KDE |
43 |
#include <kfiledialog.h> |
44 |
#include <kfiledialog.h> |
44 |
#endif |
45 |
#endif |
Lines 402-407
Link Here
|
402 |
{ |
403 |
{ |
403 |
QCanvasView::resizeEvent( e ); |
404 |
QCanvasView::resizeEvent( e ); |
404 |
canvas()->resize(width()-4,height()-4); |
405 |
canvas()->resize(width()-4,height()-4); |
|
|
406 |
MeasurementDialog.Reload(); |
405 |
} |
407 |
} |
406 |
|
408 |
|
407 |
void FigureEditor::contentsMousePressEvent(QMouseEvent* e) |
409 |
void FigureEditor::contentsMousePressEvent(QMouseEvent* e) |
Lines 429-442
Link Here
|
429 |
|
431 |
|
430 |
} |
432 |
} |
431 |
else |
433 |
else |
|
|
434 |
#if 0 |
432 |
if (e -> button() & Qt::RightButton) { |
435 |
if (e -> button() & Qt::RightButton) { |
433 |
|
436 |
#else |
|
|
437 |
if (e -> state() & Qt::ShiftButton) { |
438 |
#endif |
434 |
sizing = (GridItem*) *it; |
439 |
sizing = (GridItem*) *it; |
435 |
contentsMouseMoveEvent(e); |
440 |
contentsMouseMoveEvent(e); |
436 |
} |
441 |
} |
437 |
else |
442 |
else |
438 |
if (e -> button() & Qt::LeftButton) { |
443 |
if (e -> button() & Qt::LeftButton) { |
439 |
|
|
|
440 |
moving = (GridItem*) *it; |
444 |
moving = (GridItem*) *it; |
441 |
moving_start = e->pos(); |
445 |
moving_start = e->pos(); |
442 |
} |
446 |
} |
Lines 450-455
Link Here
|
450 |
|
454 |
|
451 |
void FigureEditor::contentsMouseMoveEvent(QMouseEvent* e) |
455 |
void FigureEditor::contentsMouseMoveEvent(QMouseEvent* e) |
452 |
{ |
456 |
{ |
|
|
457 |
|
453 |
if ( moving ) { |
458 |
if ( moving ) { |
454 |
|
459 |
|
455 |
moving->moveBy(e->pos().x() - moving_start.x(), |
460 |
moving->moveBy(e->pos().x() - moving_start.x(), |
Lines 529-535
Link Here
|
529 |
|
534 |
|
530 |
Canvas = new QCanvas(w-4, h-4); |
535 |
Canvas = new QCanvas(w-4, h-4); |
531 |
Canvas -> setAdvancePeriod(30); |
536 |
Canvas -> setAdvancePeriod(30); |
532 |
FigEditor = new FigureEditor(*Canvas, CanvasFrame); |
537 |
FigEditor = new FigureEditor(*this, *Canvas, CanvasFrame); |
533 |
FigEditor -> clear(); |
538 |
FigEditor -> clear(); |
534 |
// FigEditor-> resize(w, h); |
539 |
// FigEditor-> resize(w, h); |
535 |
CanvasFrameLayout->addWidget(FigEditor); |
540 |
CanvasFrameLayout->addWidget(FigEditor); |
Lines 839-844
Link Here
|
839 |
|
844 |
|
840 |
} |
845 |
} |
841 |
|
846 |
|
|
|
847 |
void qtMeasurementToolDialog::Reload() |
848 |
{ |
849 |
TheImage -> Reload(fn, MonitorProfileSelector ->getFilename(), |
850 |
InputProfileSelector->getFilename(), |
851 |
Canvas); |
852 |
} |
853 |
|
854 |
|
842 |
|
855 |
|
843 |
// ------------------------------------------------------------------------------ Slots |
856 |
// ------------------------------------------------------------------------------ Slots |
844 |
|
857 |
|
Lines 910-916
Link Here
|
910 |
|
923 |
|
911 |
} else |
924 |
} else |
912 |
{ |
925 |
{ |
913 |
Status->setText("Click & drag mouse to place the grid: Left - Move, Right - Size, Ctrl - UnShear. PICK when finished."); |
926 |
Status->setText("Click & drag mouse to place the grid: Left - Move, Shift - Size, Ctrl - UnShear. PICK when finished."); |
914 |
PickBtn->show(); |
927 |
PickBtn->show(); |
915 |
ProofToggle -> show(); |
928 |
ProofToggle -> show(); |
916 |
} |
929 |
} |