diff --git a/testclient/atcoreui.rc b/testclient/atcoreui.rc --- a/testclient/atcoreui.rc +++ b/testclient/atcoreui.rc @@ -9,5 +9,14 @@ + + + + + + + + + diff --git a/testclient/mainwindow.cpp b/testclient/mainwindow.cpp --- a/testclient/mainwindow.cpp +++ b/testclient/mainwindow.cpp @@ -64,6 +64,7 @@ locateSerialPort(); + ui->statusBar->addWidget(ui->statusBarWidget); printTime = new QTime(); printTimer = new QTimer(); printTimer->setInterval(1000); @@ -117,6 +118,17 @@ ui->plotWidget->appendPoint(tr("Target Ext.1"), temp); ui->plotWidget->update(); }); + + //more dock stuff. + setTabPosition(Qt::LeftDockWidgetArea, QTabWidget::North); + setTabPosition(Qt::RightDockWidgetArea, QTabWidget::North); + tabifyDockWidget(ui->moveDock, ui->tempControlsDock); + ui->moveDock->raise(); + + tabifyDockWidget(ui->connectDock, ui->printDock); + tabifyDockWidget(ui->connectDock, ui->commandDock); + ui->connectDock->raise(); + } void MainWindow::closeEvent(QCloseEvent *event) @@ -135,7 +147,17 @@ { QAction *action; action = KStandardAction::quit(qApp, SLOT(quit()), actionCollection()); - setupGUI(Default, QStringLiteral("atcoreui.rc")); + + //connect the view actions to their docks. + actionCollection()->addAction(QStringLiteral("actionConnection_Settings"), ui->connectDock->toggleViewAction()); + actionCollection()->addAction(QStringLiteral("actionSession_Log"), ui->logDock->toggleViewAction()); + actionCollection()->addAction(QStringLiteral("actionTemperature_Plot"), ui->tempTimelineDock->toggleViewAction()); + actionCollection()->addAction(QStringLiteral("actionTest_Commands"), ui->commandDock->toggleViewAction()); + actionCollection()->addAction(QStringLiteral("actionMovement"), ui->moveDock->toggleViewAction()); + actionCollection()->addAction(QStringLiteral("actionTemp_Controls"), ui->tempControlsDock->toggleViewAction()); + actionCollection()->addAction(QStringLiteral("actionPrint"), ui->printDock->toggleViewAction()); + + setupGUI(Save | Create, QStringLiteral("atcoreui.rc")); } QString MainWindow::getTime() @@ -437,35 +459,55 @@ } void MainWindow::printerStateChanged(PrinterState state) { + QString stateString; switch (state) { case IDLE: ui->printPB->setText(tr("Print File")); + stateString = QStringLiteral("Connected to ") + core->serial()->portName();; break; case STARTPRINT: + stateString = QStringLiteral("START PRINT"); ui->printPB->setText(tr("Pause Print")); ui->printLayout->setVisible(true); printTime->start(); printTimer->start(); break; case FINISHEDPRINT: + stateString = QStringLiteral("Finished Print"); ui->printPB->setText(tr("Print File")); ui->printLayout->setVisible(false); printTimer->stop(); break; case PAUSE: + stateString = QStringLiteral("Paused"); ui->printPB->setText(tr("Resume Print")); break; case BUSY: + stateString = QStringLiteral("Printing"); ui->printPB->setText(tr("Pause Print")); break; - default: + case DISCONNECTED: + stateString = QStringLiteral("Not Connected"); + break; + + case CONNECTING: + stateString = QStringLiteral("Connecting"); + break; + + case STOP: + stateString = QStringLiteral("Stoping Print"); + break; + + case ERROR: + stateString = QStringLiteral("Command ERROR"); break; } + ui->lblState->setText(stateString); } void MainWindow::populateCBs() diff --git a/testclient/mainwindow.ui b/testclient/mainwindow.ui --- a/testclient/mainwindow.ui +++ b/testclient/mainwindow.ui @@ -6,589 +6,668 @@ 0 0 - 0 - 0 + 1566 + 542 AtCore - KDE 3D Printing Test Client - - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 + + + + 6 + 418 + 801 + 46 + + + + + 100 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + AtCoreState: - - 3 + + + + + + Not Connected - - 0 + + + + + + Qt::Horizontal - - 3 + + QSizePolicy::Expanding - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + true - + 0 - - 0 + + + + + + Stop Print Job - - 0 + + + + + .. + + + + + + + <html><head/><body><p>Elapsed Time</p></body></html> + + + 00:00:00 + + + Qt::AlignCenter + + + + + + + / + + + + + + + <html><head/><body><p>Remaining Time</p></body></html> + + + 00:00:00 + + + Qt::AlignCenter + + + + + + + + + + + + 10 + 0 + 473 + 243 + + + + + 0 + 0 + + + + &Print + + + + + + + + + Print File + + + + + + + + 0 + 0 + + + + Emergency Stop + + + + + + + + + + + On Pause: + + + + + + + G91,G0 Z1,G90,G1 X0 Y195 + + + + + + + + + + + + 0 + 0 + + + + Printer Speed + + + + + + + % + + + + + + 300 + + + 100 + + + + + + + + 0 + 0 + + + + Set + + + + + + + + + + + + 0 + 0 + + + + Flow Rate + + + + + + + % + + + 300 + + + 100 + + + + + + + + 0 + 0 + + + + Set + + + + + + + + + + + + 0 + 240 + 485 + 146 + + + + + 0 + 0 + + + + Comma&nds + + + + + + + + + Send Command + + + + + + + Send + + + + + + + + + + + Show Message + + + + + + + Send + + + + + + + + + + + + + 0 + 0 + + + + Temperat&ure Timeline + + + 2 + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + + + 0 + 0 + + + + &Connection Settings + + + 1 + + + + + + + + 0 + 0 + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + - - - Connection Settings - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - 0 - 0 - - - - Port: - - - - - - - - - - - - - - - 0 - 0 - - - - Baud Rate: - - - - - - - true - - - - - - - - - - - Use Plugin - - - - - - - - 0 - 0 - - - - - - - - - - - + - + 0 0 - Connect + Port: - - - - - - - Test commands - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - Home All - - - - - - - Home X - - - - - - - Home Y - - - - - - - Home Z - - - - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - Move X Axis to - - - - - Move Y Axis to - - - - - Move Z Axis to - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Qt::AlignCenter - - - 0 - - - 200.000000000000000 - - - - - - - - 0 - 0 - - - - Go - - - - - - - - - - - Axis move - - - - - - - Absol&ute - - - true - - - - - - - Re&lative - - - - - - - - - - - 0 - 0 - - - - Bed Temp - - - - - - - Qt::AlignCenter - - - °C - - - 0 - - - 100.000000000000000 - - - - - - - Set - - - - - - - - - - - - 0 - 0 - - - - - - - - Qt::AlignCenter - - - °C - - - 0 - - - 275.000000000000000 - - - - - - - Set - - - - - - - - - - - - 0 - 0 - - - - - - - - Qt::AlignCenter - - - % - - - 100 - - - - - - - - 0 - 0 - - - - Set - - - - + + + + + - - - - - - 0 - 0 - - - - Printer Speed - - - - - - - % - - - - - - 300 - - - 100 - - - - - - - - 0 - 0 - - - - Set - - - - + + + + 0 + 0 + + + + Baud Rate: + + - - - - - - 0 - 0 - - - - Flow Rate - - - - - - - % - - - 300 - - - 100 - - - - - - - - 0 - 0 - - - - Set - - - - + + + true + + + + + + - - - - - Show Message - - - - - - - Send - - - - + + + Use Plugin + + - - - - - On Pause: - - - - - - - G91,G0 Z1,G90,G1 X0 Y195 - - - - + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + Connect + + + + + + + + + + + + + 0 + 0 + + + + Session &Log + + + 2 + + + + + + + + 0 + 0 + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + true + + + + 0 + 0 + + + + true + + + 1000 + + + + + + + Save Session Log + + + + .. + + + + + + + + + + + + Qt::NoContextMenu + + + false + + + + + + 0 + 0 + + + + &Movement + + + 1 + + + + + + + + + Home All + + + + + + + Home X + + + + + + + Home Y + + + + + + + Home Z + - - - - - - - 0 - - - 3 - - - 0 - - - 3 - + + + - + - + 0 0 @@ -599,152 +678,276 @@ 0 - - - - - - - Send Command - - + + Move X Axis to + - - - Send - - - - - - - - - - - Print File - - + + Move Y Axis to + - - - - 0 - 0 - - - - Emergency Stop - - + + Move Z Axis to + - + - - - - - - - - true - - - 0 - - - - - - - Stop Print Job - - - - - - - .. - - - - - - - - - - - 00:00:00 - - - Qt::AlignCenter - - - - - - - 00:00:00 - - - Qt::AlignCenter - - - - - - + + + + 0 + 0 + + + + + 0 + 0 + + + + Qt::AlignCenter + + + 0 + + + 200.000000000000000 + - - - Session Log + + + + 0 + 0 + + + + Go + + + + + + + + + + + Axis move + + + + + + + Absol&ute + + + true + + + + + + + Relati&ve + + + + + + + + + + + + 0 + 0 + + + + &Temperatures + + + 1 + + + + + + + + + + 0 + 0 + + + + Bed Temp + + + + + + + Qt::AlignCenter + + + °C + + + 0 + + + 100.000000000000000 + + + + + + + Set + + + + + + + + + + + + 0 + 0 + + + + + + + + Qt::AlignCenter + + + °C + + + 0 + + + 275.000000000000000 + + + + + + + Set + + + + + + + + + + + + 0 + 0 + + + + + + + + Qt::AlignCenter + + + % + + + 100 + + + + + + + + 0 + 0 + + + + Set - - - - - true - - - - 0 - 0 - - - - true - - - 1000 - - - - - - - Save Session Log - - - - .. - - - - - - - + + + + + + true + + + &Connection Settings + + + + + true + + + Ma&nual + + + + + true + + + &Session Log + + + + + true + + + T&emperature Plot + + + + + &Movement + + + + + &Print + + + + + &Temperatures + +