void LabelView::OnLabelUpdated(medusa::Address const& address, medusa::Label const& label, bool removed) { if (removed) emit labelRemoved(address, label); else emit labelAdded(address, label); }
void LabelView::Refresh(void) { _mutex.lock(); auto pModel = model(); pModel->removeRows(0, pModel->rowCount()); _mutex.unlock(); m_rDoc.ForEachLabel([&](medusa::Address const& rAddr, medusa::Label const& rLbl) { emit labelAdded(rAddr, rLbl); }); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QObject::connect(ui->treeWidget, SIGNAL(selectedDumpChanged(Dump const*)), this, SLOT(on_selectedDumpChanged(Dump const*))); m_txtView = ui->txtView; m_hexView = new HexViewWidget(ui->hexScroll); m_bmpView = new BitmapWidget(ui->bmpScroll); ui->hexScroll->setWidget(m_hexView); ui->bmpScroll->setWidget(m_bmpView); connect(ui->txtView, SIGNAL(labelAdded(Label)), ui->tableWidget, SLOT(addLabel(Label))); connect(ui->txtView, SIGNAL(encodingChanged()), this, SLOT(onEncodingChanged())); ui->txtView->setEncodings(ui->tableWidget->getEncodings()); on_actionNew_set_triggered(); //ui->treeWidget->addDump("C:/Users/nhurman/Documents/GitHub/data-carving/build-BitGrapher-Desktop_Qt_5_3_0_MinGW_32bit-Debug/dump3.txt"); //ui->treeWidget->addDump("C:/Users/nhurman/Documents/GitHub/data-carving/build-BitGrapher-Desktop_Qt_5_3_0_MinGW_32bit-Debug/dump3_.txt"); }
void MainWindow::addLabel(medusa::Label const & label) { emit labelAdded(label); }