Add controller flags to information tab
This commit is contained in:
parent
8fbde8073d
commit
5e08608c56
2 changed files with 55 additions and 0 deletions
|
|
@ -27,6 +27,44 @@ OpenRGBDeviceInfoPage::OpenRGBDeviceInfoPage(RGBController *dev, QWidget *parent
|
|||
ui->VersionValue->setText(QString::fromStdString(dev->GetVersion()));
|
||||
ui->LocationValue->setText(QString::fromStdString(dev->GetLocation()));
|
||||
ui->SerialValue->setText(QString::fromStdString(dev->GetSerial()));
|
||||
|
||||
std::string flags_string = "";
|
||||
bool need_separator = false;
|
||||
|
||||
if(dev->flags & CONTROLLER_FLAG_LOCAL)
|
||||
{
|
||||
flags_string += "Local";
|
||||
need_separator = true;
|
||||
}
|
||||
if(dev->flags & CONTROLLER_FLAG_REMOTE)
|
||||
{
|
||||
if(need_separator)
|
||||
{
|
||||
flags_string += ", ";
|
||||
}
|
||||
flags_string += "Remote";
|
||||
need_separator = true;
|
||||
}
|
||||
if(dev->flags & CONTROLLER_FLAG_VIRTUAL)
|
||||
{
|
||||
if(need_separator)
|
||||
{
|
||||
flags_string += ", ";
|
||||
}
|
||||
flags_string += "Virtual";
|
||||
need_separator = true;
|
||||
}
|
||||
if(dev->flags & CONTROLLER_FLAG_RESET_BEFORE_UPDATE)
|
||||
{
|
||||
if(need_separator)
|
||||
{
|
||||
flags_string += ", ";
|
||||
}
|
||||
flags_string += "Reset Before Update";
|
||||
need_separator = true;
|
||||
}
|
||||
|
||||
ui->FlagsValue->setText(QString::fromStdString(flags_string));
|
||||
}
|
||||
|
||||
OpenRGBDeviceInfoPage::~OpenRGBDeviceInfoPage()
|
||||
|
|
|
|||
|
|
@ -154,6 +154,23 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="FlagsLabel">
|
||||
<property name="text">
|
||||
<string>Flags:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="FlagsValue">
|
||||
<property name="text">
|
||||
<string notr="true">Flags Value</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue