From 81f51b1d36ecb2bb1e8502f98e31ac746e256efd Mon Sep 17 00:00:00 2001 From: Christian Klinger Date: Wed, 27 Apr 2016 17:18:06 +0200 Subject: removed trashbin. --- gui/server_normal/mainwindow.ui | 22 ------------------ src/server/mainwindow/mainwindow.cpp | 44 +----------------------------------- 2 files changed, 1 insertion(+), 65 deletions(-) diff --git a/gui/server_normal/mainwindow.ui b/gui/server_normal/mainwindow.ui index df835ae..86c53a6 100644 --- a/gui/server_normal/mainwindow.ui +++ b/gui/server_normal/mainwindow.ui @@ -46,28 +46,6 @@ 2 - - - - 10 - 10 - 111 - 121 - - - - false - - - - - - :/trash - - - true - - 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(); -- cgit v1.2.3-55-g7522