qtDLGTrace::qtDLGTrace(QWidget *parent, Qt::WFlags flags) : QWidget(parent, flags), m_stepsDoneInSecond(0), m_prevStepsDone(0) { setupUi(this); this->setLayout(horizontalLayout); this->setStyleSheet(clsHelperClass::LoadStyleSheet()); pThis = this; m_statusBarTimer = new QTimer(this); m_statusBarTimer->setInterval(1000); m_statusBarTimer->stop(); m_maxRows = (tblTraceLog->verticalHeader()->height() / 12) - 1; tblTraceLog->horizontalHeader()->resizeSection(0,80); //PID tblTraceLog->horizontalHeader()->resizeSection(1,80); //TID tblTraceLog->horizontalHeader()->resizeSection(2,135); //OFFSET tblTraceLog->horizontalHeader()->resizeSection(3,300); //Symbol. tblTraceLog->horizontalHeader()->setFixedHeight(21); connect(m_statusBarTimer,SIGNAL(timeout()),this,SLOT(OnUpdateStatusBar())); connect(tblTraceLog,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(OnCustomContextMenu(QPoint))); connect(tblTraceLog,SIGNAL(itemDoubleClicked(QTableWidgetItem *)),this,SLOT(OnDoubleClickFunction(QTableWidgetItem *))); connect(scrollTrace,SIGNAL(valueChanged(int)),this,SLOT(OnShow(int))); connect(new QShortcut(Qt::Key_Escape,this),SIGNAL(activated()),this,SLOT(close())); }
qtDLGPEEditor::qtDLGPEEditor(clsPEManager *PEManager,QWidget *parent, Qt::WFlags flags, int PID, std::wstring FileName) : QWidget(parent,flags) { setupUi(this); this->setStyleSheet(clsHelperClass::LoadStyleSheet()); this->setLayout(verticalLayout); this->setAttribute(Qt::WA_DeleteOnClose,true); connect(treePE,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(OnCustomContextMenu(QPoint))); connect(new QShortcut(Qt::Key_Escape,this),SIGNAL(activated()),this,SLOT(close())); m_processID = PID; m_pEManager = PEManager; if(m_pEManager != NULL) { if(FileName.length() > 0) m_currentFile = FileName; else m_currentFile = m_pEManager->getFilenameFromPID(m_processID); if(m_processID == -1) m_pEManager->OpenFile(m_currentFile); if(m_currentFile.length() <= 0) { QMessageBox::critical(this,"Nanomite","Could not load File!",QMessageBox::Ok,QMessageBox::Ok); close(); } this->setWindowTitle(QString("[Nanomite] - PEEditor - FileName: %1").arg(QString::fromStdWString(m_currentFile))); InitList(); LoadPEView(); } else { QMessageBox::critical(this,"Nanomite","Could not load File!",QMessageBox::Ok,QMessageBox::Ok); close(); } }