summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorChristian Klinger2016-04-27 17:18:06 +0200
committerChristian Klinger2016-04-27 17:18:06 +0200
commit81f51b1d36ecb2bb1e8502f98e31ac746e256efd (patch)
tree3e248b571738236f026be1f9926177dacd0389a6 /src/server/mainwindow/mainwindow.cpp
parentadd aspect ratio preservation. (diff)
downloadpvs2-81f51b1d36ecb2bb1e8502f98e31ac746e256efd.tar.gz
pvs2-81f51b1d36ecb2bb1e8502f98e31ac746e256efd.tar.xz
pvs2-81f51b1d36ecb2bb1e8502f98e31ac746e256efd.zip
removed trashbin.
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp44
1 files changed, 1 insertions, 43 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index ff814c0..7d27434 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -522,16 +522,8 @@ void MainWindow::resizeEvent(QResizeEvent* e)
{
Room* room = Global::getRooms()[Global::getCurrentRoom()];
- /* Place the trash-bin */
- const int nw = ui->frmRoom->size().width() / _tilesX;
- const int nh = ui->frmRoom->size().height() / _tilesY;
- const int width = ui->frmRoom->geometry().width() - (nw + 1);
- const int height = ui->frmRoom->geometry().height() - (nh + 1);
- ui->trash->move(width, height);
- ui->trash->resize(getTileWidthPx(), getTileHeightPx());
-
- if (room == NULL) {return; } /* Nothing to do here */ /* TODO: But still place the trashbin */
+ if (room == NULL) {return; } /* Nothing to do here */
QSize& clientSize = room->clientSize;
if (ui->frmRoom->size().width() < 100 || ui->frmRoom->size().height() < 100 || _tilesX <= 0 || _tilesY <= 0) { return; }
@@ -560,8 +552,6 @@ void MainWindow::resizeEvent(QResizeEvent* e)
(*it)->setSize(getTileWidthPx() * clientSize.width(), getTileHeightPx() * clientSize.height());
(*it)->move(newPos);
}
- // qDebug() << "Trash pos: " << ui->trash->pos();
-
}
/***************************************************************************//**
@@ -643,38 +633,6 @@ void MainWindow::onPlaceFrame(bool activateTrash, ConnectionFrame* frame)
else if (y > s.height() - getTileHeightPx())
y = (_tilesY - 1) * getTileHeightPx();
- // Check if x coordinate is in trash position. Check only if activateTrash = true!
- if (activateTrash)
- {
- const QRect &trashCenter = ui->trash->geometry();
- if (trashCenter.contains(p))
- {
- // Do not offer deleting online client.
- if (frame->client() != NULL)
- {
- QMessageBox::critical(this, tr("Selection"), sStrClientOnline);
- frame->move(frame->getPreviousPosition());
- return;
- }
- else
- {
- int ret = QMessageBox::question(this, "Warning", tr("Sure, You want to delete selected client?"), 0, 1, 2);
- if (ret == 1)
- {
- frame->hide();
- frame->deleteLater();
- _clientFrames.removeOne(frame);
- return;
- }
- else
- {
- frame->move(frame->getPreviousPosition());
- return;
- }
- }
- }
- }
- qDebug("Moved");
frame->move(x, y);
savePosition(frame);
const QPoint &newpos = frame->frameGeometry().topLeft();