m_consoleItem = item;
item->setText(0, "Console");
item->setText(1, "0");
- item->setIcon(0, QIcon(QString::fromUtf8("images/disconnected.png")));
+ QBrush redBrush(Qt::red);
+ item->setForeground(0, redBrush);
item = new QTreeWidgetItem(topItem);
item->setText(0, "Restore");
item->setText(1, "1");
return;
} else {
mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/connected.png")));
- m_consoleItem->setIcon(0, QIcon(QString::fromUtf8("images/connected.png")));
+ QBrush greenBrush(Qt::green);
+ m_consoleItem->setForeground(0, greenBrush);
}
} else {
mainWin->set_status(" Director not connected. Click on connect button.");
mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/disconnected.png")));
- m_consoleItem->setIcon(0, QIcon(QString::fromUtf8("images/disconnected.png")));
+ QBrush redBrush(Qt::red);
+ m_consoleItem->setForeground(0, redBrush);
}
}
bnet_close(m_sock);
m_sock = NULL;
mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/disconnected.png")));
- m_consoleItem->setIcon(0, QIcon(QString::fromUtf8("images/disconnected.png")));
+ QBrush redBrush(Qt::red);
+ m_consoleItem->setForeground(0, redBrush);
m_notifier->setEnabled(false);
delete m_notifier;
m_notifier = NULL;