Ejemplo n.º 1
0
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();
	}
}
Ejemplo n.º 2
0
qtDLGPEEditor::qtDLGPEEditor(clsPEManager *PEManager,QWidget *parent, Qt::WFlags flags, int PID)
{
	ui.setupUi(this);
	this->setAttribute(Qt::WA_DeleteOnClose,true);
	this->setFixedSize(this->width(),this->height());

	_PID = PID;
	_PEManager = PEManager;
	
	if(_PEManager != NULL)
	{	
		_currentFile = _PEManager->getFilenameFromPID(_PID);
		this->setWindowTitle(QString("[Nanomite] - PEEditor : %1 - %2").arg(PID,8,16,QChar('0')).arg(QString().fromStdWString(_currentFile)));
		
		InitList();
		LoadPEView();
	}
	else
	{
		MessageBoxW(NULL,L"Could not load Filename!",L"Nanomite",MB_OK);
		close();
	}
}