Show colours in X/26 table and comboboxes

This commit is contained in:
G.K.MacGregor
2021-07-18 21:39:41 +01:00
parent 2ec4039393
commit 9edaa2fda7
5 changed files with 83 additions and 8 deletions

View File

@@ -196,9 +196,7 @@ X26DockWidget::X26DockWidget(TeletextWidget *parent): QDockWidget(parent)
QHBoxLayout *colourAndRowLayout = new QHBoxLayout;
m_colourComboBox = new QComboBox;
for (int c=0; c<=3; c++)
for (int e=0; e<=7; e++)
m_colourComboBox->addItem(tr("CLUT %1:%2").arg(c).arg(e));
m_colourComboBox->setModel(m_parentMainWidget->document()->clutModel());
colourAndRowLayout->addWidget(m_colourComboBox);
connect(m_colourComboBox, QOverload<int>::of(&QComboBox::activated), this, [=](const int value) { updateModelFromCookedWidget(value, Qt::UserRole+1); } );