37
38
delete timeZoneNameValidator;
40
void DefineTimeZoneWindow::languageChanged()
41
void DefineTimeZoneWindow::retranslate()
43
45
ui->retranslateUi(dialog);
46
int startDateMonthIndex = ui->comboBoxDstStartDateMonth->currentIndex();
47
int startDayIndex = ui->comboBoxDstStartDay->currentIndex();
48
int startMonthIndex = ui->comboBoxDstStartMonth->currentIndex();
49
int startWeekIndex = ui->comboBoxDstStartWeek->currentIndex();
50
int endDateMonthIndex = ui->comboBoxDstEndDateMonth->currentIndex();
51
int endDayIndex = ui->comboBoxDstEndDay->currentIndex();
52
int endMonthIndex = ui->comboBoxDstEndMonth->currentIndex();
53
int endWeekIndex = ui->comboBoxDstEndWeek->currentIndex();
55
ui->comboBoxDstStartDateMonth->setCurrentIndex(startDateMonthIndex);
56
ui->comboBoxDstStartDay->setCurrentIndex(startDayIndex);
57
ui->comboBoxDstStartMonth->setCurrentIndex(startMonthIndex);
58
ui->comboBoxDstStartWeek->setCurrentIndex(startWeekIndex);
59
ui->comboBoxDstEndDateMonth->setCurrentIndex(endDateMonthIndex);
60
ui->comboBoxDstEndDay->setCurrentIndex(endDayIndex);
61
ui->comboBoxDstEndMonth->setCurrentIndex(endMonthIndex);
62
ui->comboBoxDstEndWeek->setCurrentIndex(endWeekIndex);
46
66
void DefineTimeZoneWindow::createDialogContent()
48
68
ui->setupUi(dialog);
49
69
connect(&StelApp::getInstance(), SIGNAL(languageChanged()),
50
this, SLOT(languageChanged()));
70
this, SLOT(retranslate()));
52
72
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
53
73
connect(ui->pushButtonUseDefinition, SIGNAL(clicked()),
219
239
void DefineTimeZoneWindow::populateDateLists()
221
241
QStringList monthList;
222
monthList.append("January");
223
monthList.append("February");
224
monthList.append("March");
225
monthList.append("April");
226
monthList.append("May");
227
monthList.append("June");
228
monthList.append("July");
229
monthList.append("August");
230
monthList.append("September");
231
monthList.append("October");
232
monthList.append("November");
233
monthList.append("December");
242
monthList.append(q_("January"));
243
monthList.append(q_("February"));
244
monthList.append(q_("March"));
245
monthList.append(q_("April"));
246
monthList.append(q_("May"));
247
monthList.append(q_("June"));
248
monthList.append(q_("July"));
249
monthList.append(q_("August"));
250
monthList.append(q_("September"));
251
monthList.append(q_("October"));
252
monthList.append(q_("November"));
253
monthList.append(q_("December"));
235
255
ui->comboBoxDstStartMonth->clear();
236
256
ui->comboBoxDstStartMonth->addItems(monthList);
241
261
ui->comboBoxDstEndDateMonth->clear();
242
262
ui->comboBoxDstEndDateMonth->addItems(monthList);
244
//TODO: For the translators: refers to any day of the week, if not possible, translate as "First week"
245
264
QStringList weekList;
246
weekList.append("First");
247
weekList.append("Second");
248
weekList.append("Third");
249
weekList.append("Fourth");
250
weekList.append("Last");
265
weekList.append(q_("First week"));
266
weekList.append(q_("Second week"));
267
weekList.append(q_("Third week"));
268
weekList.append(q_("Fourth week"));
269
weekList.append(q_("Last week"));
252
271
ui->comboBoxDstStartWeek->clear();
253
272
ui->comboBoxDstStartWeek->addItems(weekList);
257
276
//Starts from Sunday deliberately
258
277
QStringList dayList;
259
dayList.append("Sunday");
260
dayList.append("Monday");
261
dayList.append("Tuesday");
262
dayList.append("Wednesday");
263
dayList.append("Thursday");
264
dayList.append("Friday");
265
dayList.append("Saturday");
278
dayList.append(q_("Sunday"));
279
dayList.append(q_("Monday"));
280
dayList.append(q_("Tuesday"));
281
dayList.append(q_("Wednesday"));
282
dayList.append(q_("Thursday"));
283
dayList.append(q_("Friday"));
284
dayList.append(q_("Saturday"));
267
286
ui->comboBoxDstStartDay->clear();
268
287
ui->comboBoxDstStartDay->addItems(dayList);