mirror of
https://github.com/Adaptix-Framework/AdaptixC2
synced 2026-06-08 10:20:39 +00:00
27 lines
620 B
C++
27 lines
620 B
C++
#include <Agent/AgentTableWidgetItem.h>
|
|
|
|
AgentTableWidgetItem::AgentTableWidgetItem(const QString &text, Agent *agent)
|
|
{
|
|
this->agent = agent;
|
|
this->setText(text);
|
|
this->setTextAlignment( Qt::AlignCenter );
|
|
this->setFlags( flags() ^ Qt::ItemIsEditable );
|
|
}
|
|
|
|
AgentTableWidgetItem::~AgentTableWidgetItem() = default;
|
|
|
|
void AgentTableWidgetItem::RevertColor()
|
|
{
|
|
this->setBackground(QBrush());
|
|
this->setForeground(QBrush());
|
|
}
|
|
|
|
void AgentTableWidgetItem::SetColor(QColor bg, QColor fg)
|
|
{
|
|
if (bg.isValid())
|
|
this->setBackground(bg);
|
|
|
|
if (fg.isValid())
|
|
this->setForeground(fg);
|
|
}
|