mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 13:04:37 +03:00
minor refactor
This commit is contained in:
@@ -19,48 +19,48 @@
|
||||
|
||||
#define P_C_LOAD_STRING(a) CACHE.a = bean->a;
|
||||
#define P_C_SAVE_STRING(a) bean->a = CACHE.a;
|
||||
#define D_C_LOAD_STRING(a) CACHE.a = NekoRay::dataStore->a;
|
||||
#define D_C_SAVE_STRING(a) NekoRay::dataStore->a = CACHE.a;
|
||||
#define D_C_LOAD_STRING(a) CACHE.a = NekoGui::dataStore->a;
|
||||
#define D_C_SAVE_STRING(a) NekoGui::dataStore->a = CACHE.a;
|
||||
|
||||
#define P_LOAD_STRING(a) ui->a->setText(bean->a);
|
||||
#define P_SAVE_STRING(a) bean->a = ui->a->text();
|
||||
#define P_SAVE_STRING_QTEXTEDIT(a) bean->a = ui->a->toPlainText();
|
||||
#define D_LOAD_STRING(a) ui->a->setText(NekoRay::dataStore->a);
|
||||
#define D_SAVE_STRING(a) NekoRay::dataStore->a = ui->a->text();
|
||||
#define D_SAVE_STRING_QTEXTEDIT(a) NekoRay::dataStore->a = ui->a->toPlainText();
|
||||
#define D_LOAD_STRING(a) ui->a->setText(NekoGui::dataStore->a);
|
||||
#define D_SAVE_STRING(a) NekoGui::dataStore->a = ui->a->text();
|
||||
#define D_SAVE_STRING_QTEXTEDIT(a) NekoGui::dataStore->a = ui->a->toPlainText();
|
||||
#define P_LOAD_INT(a) \
|
||||
ui->a->setText(Int2String(bean->a)); \
|
||||
ui->a->setValidator(QRegExpValidator_Number);
|
||||
#define P_SAVE_INT(a) bean->a = ui->a->text().toInt();
|
||||
#define D_LOAD_INT(a) \
|
||||
ui->a->setText(Int2String(NekoRay::dataStore->a)); \
|
||||
ui->a->setText(Int2String(NekoGui::dataStore->a)); \
|
||||
ui->a->setValidator(QRegExpValidator_Number);
|
||||
#define D_SAVE_INT(a) NekoRay::dataStore->a = ui->a->text().toInt();
|
||||
#define D_SAVE_INT(a) NekoGui::dataStore->a = ui->a->text().toInt();
|
||||
#define P_LOAD_COMBO_STRING(a) ui->a->setCurrentText(bean->a);
|
||||
#define P_SAVE_COMBO_STRING(a) bean->a = ui->a->currentText();
|
||||
#define D_LOAD_COMBO_STRING(a) ui->a->setCurrentText(NekoRay::dataStore->a);
|
||||
#define D_SAVE_COMBO_STRING(a) NekoRay::dataStore->a = ui->a->currentText();
|
||||
#define D_LOAD_COMBO_STRING(a) ui->a->setCurrentText(NekoGui::dataStore->a);
|
||||
#define D_SAVE_COMBO_STRING(a) NekoGui::dataStore->a = ui->a->currentText();
|
||||
#define P_LOAD_COMBO_INT(a) ui->a->setCurrentIndex(bean->a);
|
||||
#define P_SAVE_COMBO_INT(a) bean->a = ui->a->currentIndex();
|
||||
#define D_LOAD_BOOL(a) ui->a->setChecked(NekoRay::dataStore->a);
|
||||
#define D_SAVE_BOOL(a) NekoRay::dataStore->a = ui->a->isChecked();
|
||||
#define D_LOAD_BOOL(a) ui->a->setChecked(NekoGui::dataStore->a);
|
||||
#define D_SAVE_BOOL(a) NekoGui::dataStore->a = ui->a->isChecked();
|
||||
#define P_LOAD_BOOL(a) ui->a->setChecked(bean->a);
|
||||
#define P_SAVE_BOOL(a) bean->a = ui->a->isChecked();
|
||||
|
||||
#define D_LOAD_INT_ENABLE(i, e) \
|
||||
if (NekoRay::dataStore->i > 0) { \
|
||||
if (NekoGui::dataStore->i > 0) { \
|
||||
ui->e->setChecked(true); \
|
||||
ui->i->setText(Int2String(NekoRay::dataStore->i)); \
|
||||
ui->i->setText(Int2String(NekoGui::dataStore->i)); \
|
||||
} else { \
|
||||
ui->e->setChecked(false); \
|
||||
ui->i->setText(Int2String(-NekoRay::dataStore->i)); \
|
||||
ui->i->setText(Int2String(-NekoGui::dataStore->i)); \
|
||||
} \
|
||||
ui->i->setValidator(QRegExpValidator_Number);
|
||||
#define D_SAVE_INT_ENABLE(i, e) \
|
||||
if (ui->e->isChecked()) { \
|
||||
NekoRay::dataStore->i = ui->i->text().toInt(); \
|
||||
NekoGui::dataStore->i = ui->i->text().toInt(); \
|
||||
} else { \
|
||||
NekoRay::dataStore->i = -ui->i->text().toInt(); \
|
||||
NekoGui::dataStore->i = -ui->i->text().toInt(); \
|
||||
}
|
||||
|
||||
#define C_EDIT_JSON_ALLOW_EMPTY(a) \
|
||||
|
||||
Reference in New Issue
Block a user