mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-30 18:57:52 -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
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#include "OpenRGBPluginsEntry.h"
|
|
#include "ui_OpenRGBPluginsEntry.h"
|
|
|
|
using namespace Ui;
|
|
|
|
OpenRGBPluginsEntry::OpenRGBPluginsEntry(QWidget *parent) :
|
|
QWidget(parent),
|
|
ui(new Ui::OpenRGBPluginsEntryUi)
|
|
{
|
|
ui->setupUi(this);
|
|
|
|
EnableClickCallbackVal = nullptr;
|
|
EnableClickCallbackArg = nullptr;
|
|
}
|
|
|
|
OpenRGBPluginsEntry::~OpenRGBPluginsEntry()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void OpenRGBPluginsEntry::changeEvent(QEvent *event)
|
|
{
|
|
if(event->type() == QEvent::LanguageChange)
|
|
{
|
|
ui->retranslateUi(this);
|
|
}
|
|
}
|
|
|
|
void OpenRGBPluginsEntry::RegisterEnableClickCallback(EnableClickCallback new_callback, void * new_callback_arg)
|
|
{
|
|
EnableClickCallbackVal = new_callback;
|
|
EnableClickCallbackArg = new_callback_arg;
|
|
}
|
|
|
|
void Ui::OpenRGBPluginsEntry::on_EnabledCheckBox_stateChanged(int /*checked*/)
|
|
{
|
|
/*-------------------------------------------------*\
|
|
| Call the callbacks |
|
|
\*-------------------------------------------------*/
|
|
if(EnableClickCallbackVal != nullptr)
|
|
{
|
|
EnableClickCallbackVal(EnableClickCallbackArg, this);
|
|
}
|
|
}
|
|
|