forked from len0rd/rockbox
qeditor: add soc panel, to display soc information
Change-Id: Ie442b82d96fb150c7466f1a274240f9b111fd91e
This commit is contained in:
parent
3daa6d64f6
commit
ef0299c62e
4 changed files with 92 additions and 6 deletions
|
|
@ -16,6 +16,40 @@ QByteArray RegItemEditorCreator::valuePropertyName () const
|
|||
return QByteArray("text");
|
||||
}
|
||||
|
||||
/**
|
||||
* SocDisplayPanel
|
||||
*/
|
||||
SocDisplayPanel::SocDisplayPanel(QWidget *parent, const SocRef& dev_ref)
|
||||
:QGroupBox(parent), m_soc(dev_ref)
|
||||
{
|
||||
QVBoxLayout *right_layout = new QVBoxLayout;
|
||||
|
||||
m_name = new QLabel(this);
|
||||
m_name->setTextFormat(Qt::RichText);
|
||||
m_name->setText("<h1>" + QString::fromStdString(m_soc.GetSoc().name) + "</h1>");
|
||||
|
||||
m_desc = new QLabel(this);
|
||||
m_name->setTextFormat(Qt::RichText);
|
||||
m_desc->setText(QString::fromStdString(m_soc.GetSoc().desc));
|
||||
|
||||
right_layout->addWidget(m_name, 0);
|
||||
right_layout->addWidget(m_desc, 0);
|
||||
right_layout->addStretch(1);
|
||||
|
||||
setTitle("System-on-Chip Description");
|
||||
setLayout(right_layout);
|
||||
}
|
||||
|
||||
void SocDisplayPanel::AllowWrite(bool en)
|
||||
{
|
||||
Q_UNUSED(en);
|
||||
}
|
||||
|
||||
QWidget *SocDisplayPanel::GetWidget()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* DevDisplayPanel
|
||||
*/
|
||||
|
|
@ -51,8 +85,8 @@ DevDisplayPanel::DevDisplayPanel(QWidget *parent, const SocDevRef& dev_ref)
|
|||
m_name->setTextFormat(Qt::RichText);
|
||||
m_desc->setText(QString::fromStdString(m_dev.GetDev().desc));
|
||||
|
||||
right_layout->addLayout(top_layout, 0);
|
||||
right_layout->addWidget(m_name, 0);
|
||||
right_layout->addLayout(top_layout, 0);
|
||||
right_layout->addWidget(m_desc, 0);
|
||||
right_layout->addStretch(1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue