diff options
-rw-r--r-- | gui/server_normal/mainwindow.ui | 22 | ||||
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 44 |
2 files changed, 1 insertions, 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 @@ <property name="lineWidth"> <number>2</number> </property> - <widget class="QLabel" name="trash"> - <property name="geometry"> - <rect> - <x>10</x> - <y>10</y> - <width>111</width> - <height>121</height> - </rect> - </property> - <property name="acceptDrops"> - <bool>false</bool> - </property> - <property name="text"> - <string/> - </property> - <property name="pixmap"> - <pixmap resource="../../pvsmgr.qrc">:/trash</pixmap> - </property> - <property name="scaledContents"> - <bool>true</bool> - </property> - </widget> </widget> </item> </layout> 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(); |