feat: show network detail view

Includes refactor to not using mainwindow.ui form. More flexible layout
management with programmatic initialization.
This commit is contained in:
talksik
2026-02-06 17:13:33 -08:00
parent 7dd84ff9b1
commit 87fe792f33
12 changed files with 604 additions and 648 deletions
+8 -1
View File
@@ -125,14 +125,21 @@ QVariant NetworkStreamModel::data(const QModelIndex &index, int role) const
if (networkIndex == 0xFFFFFFFF)
{
int actualNetworkIndex = static_cast<int>(id & 0xFFFFFFFF);
// This is a network item
if (role == Qt::DisplayRole && index.column() == 0)
{
int actualNetworkIndex = static_cast<int>(id & 0xFFFFFFFF);
if (actualNetworkIndex >= 0 && actualNetworkIndex < m_store->networks().size())
{
return m_store->networks().at(actualNetworkIndex).name.toUpper();
}
} else if (role == Qt::DisplayRole && index.column() == 1)
{
if (actualNetworkIndex >= 0 && actualNetworkIndex < m_store->networks().size())
{
auto net = m_store->networks().at(actualNetworkIndex);
return QString("%1/%2").arg(net.openStreamCount).arg(net.openStreamCapacity);
}
}
// Networks don't show unseen count in column 1
return QVariant();