##// END OF EJS Templates
Updated spec file.
Updated spec file.

File last commit:

r79:3440ba47d0f1 default
r102:1fe40426b7f2 socexplorer-0.6-3 0.6
Show More
regsexplorer.cpp
58 lines | 2.0 KiB | text/x-c | CppLexer
Jeandet Alexis
First init of SocExplorer Repository.
r0 #include "regsexplorer.h"
New register explorer WIP...
r79 #include "ui_regsexplorernew.h"
Jeandet Alexis
First init of SocExplorer Repository.
r0 #include "socmodel.h"
New register explorer WIP...
r79 RegsExplorer::RegsExplorer(QWidget *parent) :
QDockWidget(parent),
ui(new Ui::RegsExplorerNew)
Jeandet Alexis
First init of SocExplorer Repository.
r0 {
New register explorer WIP...
r79 ui->setupUi(this);
Jeandet Alexis
First init of SocExplorer Repository.
r0 connect(SocExplorerEngine::self(),SIGNAL(enumDeviceAdded(socExplorerEnumDevice*)),this,SLOT(addDev(socExplorerEnumDevice*)));
New register explorer WIP...
r79 delegate.device=NULL;
}
RegsExplorer::~RegsExplorer()
{
delete ui;
Jeandet Alexis
First init of SocExplorer Repository.
r0 }
New register explorer WIP...
r79 void RegsExplorer::addDev(socExplorerEnumDevice *device)
Jeandet Alexis
First init of SocExplorer Repository.
r0 {
New register explorer WIP...
r79 if((delegate.device->sameSoc(device))||(delegate.device==NULL))
Jeandet Alexis
First init of SocExplorer Repository.
r0 {
New register explorer WIP...
r79 delegate.device = device;
peripheralWidget* peripheral=new peripheralWidget(device->name(),device->baseAddress(),&delegate,this);
this->ui->regsViewer->addPeripheral(peripheral);
peripheralModel periphM=SocExplorerEngine::xmlModel()->getPeripheral(device->name());
int startIndex,stopIndex;
QString desc;
QString name;
bool rw;
this->ui->regsViewer->setSocName(device->socName());
for(int i=0;i<periphM.registers.count();i++)
Jeandet Alexis
First init of SocExplorer Repository.
r0 {
New register explorer WIP...
r79 peripheral->addRegister(periphM.registers.at(i).name,device->baseAddress() + periphM.registers.at(i).offset);
for(int j=0;j<periphM.registers.at(i).bitfields.count();j++)
{
startIndex = periphM.registers.at(i).bitfields.at(j).offset;
stopIndex = periphM.registers.at(i).bitfields.at(j).offset+periphM.registers.at(i).bitfields.at(j).size-1;
desc = periphM.registers.at(i).bitfields.at(j).description;
rw = periphM.registers.at(i).bitfields.at(j).rw;
name = periphM.registers.at(i).bitfields.at(j).name;
peripheral->registerAt(i)->setBitFieldAttribute(startIndex,stopIndex,name,desc,rw);
}
Jeandet Alexis
First init of SocExplorer Repository.
r0 }
}
}
New register explorer WIP...
r79 void RegsExplorer::changeEvent(QEvent *e)
{
QDockWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}