+void MainWin::setupTransferWidget()
+{
+ auto dock = new QDockWidget(tr("Transfers"), this);
+ dock->setObjectName("TransferDock");
+ dock->setAllowedAreas(Qt::TopDockWidgetArea|Qt::BottomDockWidgetArea);
+
+ auto view = new QTableView(dock); // to be replaced by the real thing
+ view->setModel(Client::transferModel());
+ dock->setWidget(view);
+ dock->hide(); // hidden by default
+ addDockWidget(Qt::TopDockWidgetArea, dock, Qt::Vertical);
+
+ auto action = dock->toggleViewAction();
+ action->setText(tr("Show File Transfers"));
+ action->setIcon(QIcon::fromTheme("download"));
+ action->setShortcut(QKeySequence(Qt::Key_F6));
+ QtUi::actionCollection("General")->addAction("ShowTransferWidget", action);
+ _viewMenu->addAction(action);
+}
+
+