mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 04:00:44 +00:00
Show channel labels in event flags, remove ChannelID from Channels tab in preferences
This commit is contained in:
parent
83317068ca
commit
385b28f3e8
@ -197,10 +197,11 @@ void gFlagsLine::paint(QPainter &painter, gGraph &w, const QRegion ®ion)
|
|||||||
|
|
||||||
double xmult = width / xx;
|
double xmult = width / xx;
|
||||||
|
|
||||||
GetTextExtent(m_label, m_lx, m_ly);
|
QString label = schema::channel[m_code].label();
|
||||||
|
GetTextExtent(label, m_lx, m_ly);
|
||||||
|
|
||||||
// Draw text label
|
// Draw text label
|
||||||
w.renderText(m_label, left - m_lx - 10, top + (height / 2) + (m_ly / 2));
|
w.renderText(label, left - m_lx - 10, top + (height / 2) + (m_ly / 2));
|
||||||
|
|
||||||
float x1, x2;
|
float x1, x2;
|
||||||
|
|
||||||
|
@ -315,17 +315,17 @@ void PreferencesDialog::InitChanInfo()
|
|||||||
ui->chanView->setAlternatingRowColors(true);
|
ui->chanView->setAlternatingRowColors(true);
|
||||||
|
|
||||||
// ui->graphView->setFirstColumnSpanned(0,daily->index(),true); // Crashes on windows.. Why do I need this again?
|
// ui->graphView->setFirstColumnSpanned(0,daily->index(),true); // Crashes on windows.. Why do I need this again?
|
||||||
chanModel->setColumnCount(5);
|
chanModel->setColumnCount(4);
|
||||||
QStringList headers;
|
QStringList headers;
|
||||||
headers.append(tr("Name"));
|
headers.append(tr("Name"));
|
||||||
headers.append(tr("Color"));
|
headers.append(tr("Color"));
|
||||||
headers.append(tr("Label"));
|
headers.append(tr("Label"));
|
||||||
headers.append(tr("Details"));
|
headers.append(tr("Details"));
|
||||||
headers.append(tr("ID"));
|
// headers.append(tr("ID"));
|
||||||
chanModel->setHorizontalHeaderLabels(headers);
|
chanModel->setHorizontalHeaderLabels(headers);
|
||||||
ui->chanView->setColumnWidth(0, 200);
|
ui->chanView->setColumnWidth(0, 200);
|
||||||
ui->chanView->setColumnWidth(1, 50);
|
ui->chanView->setColumnWidth(1, 50);
|
||||||
ui->chanView->setColumnWidth(2, 150);
|
ui->chanView->setColumnWidth(2, 100);
|
||||||
ui->chanView->setSelectionMode(QAbstractItemView::SingleSelection);
|
ui->chanView->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||||
ui->chanView->setSelectionBehavior(QAbstractItemView::SelectItems);
|
ui->chanView->setSelectionBehavior(QAbstractItemView::SelectItems);
|
||||||
|
|
||||||
@ -359,9 +359,9 @@ void PreferencesDialog::InitChanInfo()
|
|||||||
it->setEditable(true);
|
it->setEditable(true);
|
||||||
items.push_back(it);
|
items.push_back(it);
|
||||||
|
|
||||||
it = new QStandardItem(QString().number(chan->id(),16));
|
// it = new QStandardItem(QString().number(chan->id(),16));
|
||||||
it->setEditable(false);
|
// it->setEditable(false);
|
||||||
items.push_back(it);
|
// items.push_back(it);
|
||||||
|
|
||||||
row = toprows[chan->type()]++;
|
row = toprows[chan->type()]++;
|
||||||
toplevel[chan->type()]->insertRow(row, items);
|
toplevel[chan->type()]->insertRow(row, items);
|
||||||
|
Loading…
Reference in New Issue
Block a user