//--------------------------------------------------------------------------- void __fastcall TSynchronizeDialog::LogViewKeyDown(TObject * /*Sender*/, WORD & Key, TShiftState Shift) { if (Key == VK_DELETE) { ClearLog(); Key = 0; } else if ((Key == L'C') && Shift.Contains(ssCtrl) && (LogView->Items->Count > 0)) { CopyLog(); Key = 0; } }
void MainWindow::ProcessLog(int currentlog) { bool rv; // Copy the log to the disk (raw mode) QString dst; if(ui->checkBox_LogIncludeDeviceID->isChecked()) dst.sprintf("log_%08X_%02d.bin",filesystem.logentry[currentlog].device,currentlog); else dst.sprintf("log_%02d.bin",currentlog); rv = CopyLog(currentlog,dst); // Demux the log, if the copy was successful if(rv && ui->checkBox_LogDemux->isChecked()) { DemuxLog(dst); } }
RoboPult::RoboPult ( QWidget* parent, Qt::WindowFlags fl ) : QWidget ( parent, fl ), Ui::RoboPult() { setupUi ( this ); Logger=new pultLogger(ActorRobot::RobotModule::self->myResourcesDir(),this); Logger->setSizes(164,150); Logger->Move(40,5); greenLight=new linkLight(this); greenLight->move(15,29); greenLight->resize(12,104); ClearLog->setIcon(QIcon(ActorRobot::RobotModule::self->myResourcesDir().absoluteFilePath("edit-delete.png"))); ToKumir->setIcon(QIcon(ActorRobot::RobotModule::self->myResourcesDir().absoluteFilePath("kumir.png"))); UpB->hide(); buttUp=new MainButton(ActorRobot::RobotModule::self->myResourcesDir(),this); buttUp->move(90,170); buttUp->setQPos(QPoint(buttUp->size().width()/2-2,20)); DownB->hide(); buttDown=new MainButton(ActorRobot::RobotModule::self->myResourcesDir(),this); buttDown->move(DownB->pos()); buttDown->setQu(true); buttDown->setQPos(QPoint(buttDown->size().width()/2-2,buttDown->size().height()-10)); buttDown->setDirection(DOWN); LeftB->hide(); buttLeft=new MainButton(ActorRobot::RobotModule::self->myResourcesDir(),this); buttLeft->move(LeftB->pos()); buttLeft->setQu(true); buttLeft->setQPos(QPoint(15,buttLeft->size().height()/2+3)); buttLeft->setDirection(LEFT); RightB->hide(); buttRight=new MainButton(ActorRobot::RobotModule::self->myResourcesDir(),this); buttRight->move(RightB->pos()); buttRight->setQPos(QPoint(buttRight->size().width()-15,buttRight->size().height()/2+3)); buttRight->setDirection(RIGHT); StenaB->hide(); askStena=new MainButton(ActorRobot::RobotModule::self->myResourcesDir(),this); askStena->move(StenaB->pos()); askStena->setCheckable(true); askStena->setText(trUtf8(" ")); askStena->setIconOffset(5); askStena->loadIcon(ActorRobot::RobotModule::self->myResourcesDir().absoluteFilePath("stena.png")); askStena->setCheckable(true); SvobodnoB->hide(); askFree=new MainButton(ActorRobot::RobotModule::self->myResourcesDir(),this); askFree->move(SvobodnoB->pos()); askFree->setCheckable(true); askFree->setText(trUtf8(" ")); askFree->loadIcon(ActorRobot::RobotModule::self->myResourcesDir().absoluteFilePath("svobodno.png")); askFree->setIconOffset(10); askFree->setCheckable(true); RadB->hide(); buttRad=new MainButton(ActorRobot::RobotModule::self->myResourcesDir(),this); buttRad->move(RadB->pos()); buttRad->setText(trUtf8(" ")); buttRad->setIconOffset(10); if(!buttRad->loadIcon(ActorRobot::RobotModule::self->myResourcesDir().absoluteFilePath("radiation.png")))qWarning("Image not loaded!"); TempB->hide(); buttTemp=new MainButton(ActorRobot::RobotModule::self->myResourcesDir(),this); buttTemp->move(TempB->pos()); buttTemp->setText(" "); buttTemp->setIconOffset(10); buttTemp->loadIcon(ActorRobot::RobotModule::self->myResourcesDir().absoluteFilePath("tC.png")); buttCenter=new MainButton(ActorRobot::RobotModule::self->myResourcesDir(),this); CenterB->hide(); buttCenter->setText(trUtf8(" ")); buttCenter->move(CenterB->pos()); buttCenter->loadIcon(ActorRobot::RobotModule::self->myResourcesDir().absoluteFilePath("btn_paint.png")); buttCenter->setIconOffset(19); buttCenter->setQPos(QPoint(buttCenter->size().width()/2-4,buttCenter->size().height()/2+5)); //CenterB->setIcon(QIcon(ActorRobot::RobotModule::self->myResourcesDir().absoluteFilePath("robo_field.png"))); connect(buttUp,SIGNAL(clicked()),this,SLOT(Up())); connect(buttDown,SIGNAL(clicked()),this,SLOT(Down())); connect(buttLeft,SIGNAL(clicked()),this,SLOT(Left())); connect(buttRight,SIGNAL(clicked()),this,SLOT(Right())); connect(buttRad,SIGNAL(clicked()),this,SLOT(RadS())); connect(buttTemp,SIGNAL(clicked()),this,SLOT(TempS())); connect(askStena,SIGNAL(clicked()),this,SLOT(SwStena())); connect(askFree,SIGNAL(clicked()),this,SLOT(SwSvobodno())); connect(buttCenter,SIGNAL(clicked()),this,SLOT(CenterButton())); connect(ClearLog,SIGNAL(clicked()),this,SLOT(clearLog())); connect(ToKumir,SIGNAL(clicked()),Logger,SLOT(CopyLog())); link=true; };