mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-30 10:47:50 -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
47 lines
905 B
C++
47 lines
905 B
C++
#include <QCloseEvent>
|
|
#include "ResourceManager.h"
|
|
#include "OpenRGBDialog2.h"
|
|
#include "OpenRGBProfileSaveDialog.h"
|
|
#include "ui_OpenRGBProfileSaveDialog.h"
|
|
|
|
#ifdef _WIN32
|
|
#include <QSettings>
|
|
#endif
|
|
|
|
Ui::OpenRGBProfileSaveDialog::OpenRGBProfileSaveDialog(QWidget *parent) :
|
|
QDialog(parent), ui(new Ui::OpenRGBProfileSaveDialogUi)
|
|
{
|
|
ui->setupUi(this);
|
|
}
|
|
|
|
Ui::OpenRGBProfileSaveDialog::~OpenRGBProfileSaveDialog()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void Ui::OpenRGBProfileSaveDialog::changeEvent(QEvent *event)
|
|
{
|
|
if(event->type() == QEvent::LanguageChange)
|
|
{
|
|
ui->retranslateUi(this);
|
|
}
|
|
}
|
|
|
|
std::string Ui::OpenRGBProfileSaveDialog::show()
|
|
{
|
|
std::string return_string;
|
|
|
|
int result = this->exec();
|
|
|
|
if(result == QDialog::Rejected)
|
|
{
|
|
return_string = "";
|
|
}
|
|
else
|
|
{
|
|
return_string = ui->lineEdit->text().toStdString();
|
|
}
|
|
|
|
return(return_string);
|
|
}
|