/* * native implementation of EmuStepOne. */ static error_t idaapi idc_emu_step(idc_value_t * /*argv*/, idc_value_t * /*res*/) { stepOne(); return eOk; }
//===============================================structureFromMotion======================================================// bool TextureGenrator::structureFromMotion(){ int start = 0; int end = 0; //start to reconstruction m_parent->progressBar->setRange(0,0); m_parent->m_time->setInterval(10); m_parent->m_time->start(); connect(m_parent->m_time, SIGNAL(timeout()), m_parent, SLOT(stepOne())); //run structrure from motion of VisualSFM.exe m_parent->textEditConsole->append("正在进行稀疏重建,请稍候..."); m_parent->update(); start = clock(); QString command = " sfm+cmvs imgList.txt TempData"; if(!shellExecute("VisualSFM.exe", command.toStdString().c_str())){ m_parent->textEditConsole->append("稀疏重建出现错误"); return false; } end = clock(); m_parent->textEditConsole->append(QString("稀疏重建完成,用时 %1 s\n").arg((double)(end-start)/CLOCKS_PER_SEC)); m_parent->m_time->disconnect(); m_parent->m_time->stop(); return true; }
Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { ui->setupUi(this); this->readSettings(); //设置标签字体颜色、居中 QPalette paletteWhite; paletteWhite.setColor(QPalette::WindowText, Qt::white); ui->modelLabel->setPalette(paletteWhite); ui->tipLabel->setPalette(paletteWhite); QPalette paletteGray; paletteGray.setColor(QPalette::WindowText, Qt::gray); ui->timeLabel->setPalette(paletteGray); ui->nextLabel->setPalette(paletteGray); ui->modelLabel->setAlignment(Qt::AlignCenter); ui->timeLabel->setAlignment(Qt::AlignRight); ui->nextLabel->setAlignment(Qt::AlignLeft); ui->tipLabel->setAlignment(Qt::AlignRight); // QFile file(":/stylesheet.qss"); file.open(QFile::ReadOnly); QTextStream filetext(&file); QString stylesheet = filetext.readAll(); this->setAttribute(Qt::WA_TranslucentBackground, true); this->setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); this->setWindowOpacity(0.8); //半透明 this->setStyleSheet(stylesheet); //载入StyleSheet //状态栏设置 tary = new QSystemTrayIcon(this); tary->setIcon(QIcon(":/bahrsi.png")); aboutAction = new QAction(tr("About BahRSI"), this); quitAction = new QAction(tr("Quit BahRSI"), this); connect(this->aboutAction, SIGNAL(triggered()), this, SLOT(aboutBahRSI())); connect(this->quitAction, SIGNAL(triggered()), this, SLOT(quitBahRSI())); menu = new QMenu; menu->addAction(this->aboutAction); menu->addSeparator(); menu->addAction(this->quitAction); tary->setContextMenu(menu); tary->show(); // ui->progressBar->setTextVisible(false); ui->pushButton->setVisible(false); ui->pushButton->setText(tr("Postpone")); connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(postPone())); secondTimer = new QTimer(this); connect(this->secondTimer, SIGNAL(timeout()), this, SLOT(updateUI())); misecondTimer = new QTimer(this); connect(this->misecondTimer, SIGNAL(timeout()), this, SLOT(stepOne())); microPauseWorkTimer = new QTimer(this); connect(this->microPauseWorkTimer, SIGNAL(timeout()), this, SLOT(microPauseRest())); this->microPauseWorkTimer->start(microPauseWorkTime*1000); microPauseRestTimer = new QTimer(this); connect(this->microPauseRestTimer, SIGNAL(timeout()), this, SLOT(microPauseWork())); this->setMouseTracking(true); workBreakWorkTimer = new QTimer(this); connect(this->workBreakWorkTimer, SIGNAL(timeout()), this, SLOT(workBreakRest())); this->workBreakWorkTimer->start(workBreakWorkTime*1000*60); workBreakRestTimer = new QTimer(this); connect(this->workBreakRestTimer, SIGNAL(timeout()), this, SLOT(workBreakWork())); }