Dialog.cpp   Dialog.cpp 
skipping to change at line 34 skipping to change at line 34
void BarFrame::mousePressEvent(QMouseEvent *event) void BarFrame::mousePressEvent(QMouseEvent *event)
{ {
mousePos = event->pos(); mousePos = event->pos();
moving = true; moving = true;
} }
void BarFrame::mouseReleaseEvent(QMouseEvent *) void BarFrame::mouseReleaseEvent(QMouseEvent *)
{ {
moving = false; moving = false;
QWidget* p = dynamic_cast<QWidget*>(QFrame::parent());
emit movedTo(p->pos());
} }
void BarFrame::mouseMoveEvent(QMouseEvent *event) void BarFrame::mouseMoveEvent(QMouseEvent *event)
{ {
if (!moving) return; if (!moving) return;
QPoint dpos = event->pos() - mousePos; QPoint dpos = event->pos() - mousePos;
QWidget* p = dynamic_cast<QWidget*>(QFrame::parent()); QWidget* p = dynamic_cast<QWidget*>(QFrame::parent());
QPoint targetPos = p->pos() + dpos; QPoint targetPos = p->pos() + dpos;
// Prevent the title bar from being dragged to an unreachable positi on. // Prevent the title bar from being dragged to an unreachable positi on.
skipping to change at line 59 skipping to change at line 61
else if (targetPos.x() > rightBoundX) else if (targetPos.x() > rightBoundX)
targetPos.setX(rightBoundX); targetPos.setX(rightBoundX);
int lowerBoundY = mainWindow.height() - height(); int lowerBoundY = mainWindow.height() - height();
if (targetPos.y() < 0) if (targetPos.y() < 0)
targetPos.setY(0); targetPos.setY(0);
else if (targetPos.y() > lowerBoundY) else if (targetPos.y() > lowerBoundY)
targetPos.setY(lowerBoundY); targetPos.setY(lowerBoundY);
p->move(targetPos); p->move(targetPos);
//emit movedTo(targetPos);
} }
void ResizeFrame::mouseMoveEvent(QMouseEvent *event) void ResizeFrame::mouseMoveEvent(QMouseEvent *event)
{ {
QPoint dpos = event->pos() - mousePos; QPoint dpos = event->pos() - mousePos;
QWidget* p = dynamic_cast<QWidget*>(QFrame::parent()->parent()); QWidget* p = dynamic_cast<QWidget*>(QFrame::parent()->parent());
if (p!=NULL) if (p!=NULL)
{ {
int w = p->size().width(); int w = p->size().width();
int h = p->size().height(); int h = p->size().height();
 End of changes. 2 change blocks. 
0 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/