mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-30 02:37:51 -05:00
* Removing .qm files from Windows build as they are inbuilt as of a7adfe251
* Moving translation change code to the OpenRGBSettingsPage
* Adding a changeEvent() to applicable Widgets to facilitate language updates
* Workaround added to TabLabel to accomodate translation context origin
* Added zh_TW locale to OpenRGB.pro
* Updated all translations to include the latest untranslated strings
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
#include "OpenRGBDeviceInfoPage.h"
|
|
|
|
using namespace Ui;
|
|
|
|
OpenRGBDeviceInfoPage::OpenRGBDeviceInfoPage(RGBController *dev, QWidget *parent) :
|
|
QFrame(parent),
|
|
ui(new Ui::OpenRGBDeviceInfoPageUi)
|
|
{
|
|
controller = dev;
|
|
|
|
ui->setupUi(this);
|
|
|
|
ui->TypeValue->setText(device_type_to_str(dev->type).c_str());
|
|
|
|
ui->NameValue->setText(QString::fromStdString(dev->name));
|
|
ui->VendorValue->setText(QString::fromStdString(dev->vendor));
|
|
ui->DescriptionValue->setText(QString::fromStdString(dev->description));
|
|
ui->VersionValue->setText(QString::fromStdString(dev->version));
|
|
ui->LocationValue->setText(QString::fromStdString(dev->location));
|
|
ui->SerialValue->setText(QString::fromStdString(dev->serial));
|
|
}
|
|
|
|
OpenRGBDeviceInfoPage::~OpenRGBDeviceInfoPage()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void OpenRGBDeviceInfoPage::changeEvent(QEvent *event)
|
|
{
|
|
if(event->type() == QEvent::LanguageChange)
|
|
{
|
|
ui->retranslateUi(this);
|
|
}
|
|
}
|
|
|
|
RGBController* OpenRGBDeviceInfoPage::GetController()
|
|
{
|
|
return controller;
|
|
}
|