Make windows snap to each other
This commit is contained in:
parent
ab988d8496
commit
94ca829e98
12 changed files with 29 additions and 94 deletions
|
@ -18,9 +18,9 @@
|
|||
|
||||
#include "playlistwindow.h"
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QMoveEvent>
|
||||
#include <QResizeEvent>
|
||||
#include <QPoint>
|
||||
|
||||
#include "Button.h"
|
||||
#include "playlistwidget.h"
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include "mainwindow.h"
|
||||
|
||||
PlaylistWindow::PlaylistWindow (QWidget *parent) : QMainWindow (parent)
|
||||
PlaylistWindow::PlaylistWindow (QWidget *parent) : BaseWindow (parent)
|
||||
{
|
||||
QSettings s;
|
||||
m_mw = dynamic_cast<MainWindow *>(parent);
|
||||
|
@ -132,21 +132,6 @@ PlaylistWindow::resizeEvent (QResizeEvent *event)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
PlaylistWindow::mousePressEvent (QMouseEvent *event)
|
||||
{
|
||||
m_diffx = event->pos ().x ();
|
||||
m_diffy = event->pos ().y ();
|
||||
}
|
||||
|
||||
void
|
||||
PlaylistWindow::mouseMoveEvent (QMouseEvent *event)
|
||||
{
|
||||
move (event->globalPos().x() - m_diffx,
|
||||
event->globalPos().y() - m_diffy);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
PlaylistWindow::moveEvent (QMoveEvent *event)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue