Mercurial > hg > sonic-visualiser
comparison main/PreferencesDialog.cpp @ 1439:3e77e9ecc520 3.0-integration
Merge from branch levelpanwidget
author | Chris Cannam |
---|---|
date | Thu, 15 Dec 2016 16:13:16 +0000 |
parents | a9c30afdbbfe |
children | 8e4e598a8c25 |
comparison
equal
deleted
inserted
replaced
1430:ae5c314ac557 | 1439:3e77e9ecc520 |
---|---|
351 ("Show Hours And Minutes", &min, &max, &deflt); | 351 ("Show Hours And Minutes", &min, &max, &deflt); |
352 m_showHMS = (showHMS != 0); | 352 m_showHMS = (showHMS != 0); |
353 hms->setCheckState(m_showHMS ? Qt::Checked : Qt::Unchecked); | 353 hms->setCheckState(m_showHMS ? Qt::Checked : Qt::Unchecked); |
354 connect(hms, SIGNAL(stateChanged(int)), | 354 connect(hms, SIGNAL(stateChanged(int)), |
355 this, SLOT(showHMSChanged(int))); | 355 this, SLOT(showHMSChanged(int))); |
356 | 356 |
357 // General tab | 357 QFrame *frame = 0; |
358 | 358 QGridLayout *subgrid = 0; |
359 QFrame *frame = new QFrame; | |
360 | |
361 QGridLayout *subgrid = new QGridLayout; | |
362 frame->setLayout(subgrid); | |
363 | |
364 int row = 0; | 359 int row = 0; |
365 | |
366 subgrid->addWidget(new QLabel(tr("%1:").arg(tr("User interface language"))), | |
367 row, 0); | |
368 subgrid->addWidget(locale, row++, 1, 1, 1); | |
369 | |
370 subgrid->addWidget(new QLabel(tr("%1:").arg(tr("Allow network usage"))), | |
371 row, 0); | |
372 subgrid->addWidget(networkPermish, row++, 1, 1, 1); | |
373 | |
374 subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel | |
375 ("Temporary Directory Root"))), | |
376 row, 0); | |
377 subgrid->addWidget(m_tempDirRootEdit, row, 1, 1, 1); | |
378 subgrid->addWidget(tempDirButton, row, 2, 1, 1); | |
379 row++; | |
380 | |
381 subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel | |
382 ("Resample On Load"))), | |
383 row, 0); | |
384 subgrid->addWidget(resampleOnLoad, row++, 1, 1, 1); | |
385 | |
386 subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel | |
387 ("Use Gapless Mode"))), | |
388 row, 0); | |
389 subgrid->addWidget(gaplessMode, row++, 1, 1, 1); | |
390 | |
391 subgrid->addWidget(new QLabel(tr("Audio service:")), row, 0); | |
392 subgrid->addWidget(audioImplementation, row++, 1, 1, 2); | |
393 | |
394 subgrid->addWidget(new QLabel(tr("Audio playback device:")), row, 0); | |
395 subgrid->addWidget(m_audioPlaybackDeviceCombo, row++, 1, 1, 2); | |
396 | |
397 subgrid->addWidget(new QLabel(tr("Audio record device:")), row, 0); | |
398 subgrid->addWidget(m_audioRecordDeviceCombo, row++, 1, 1, 2); | |
399 | |
400 subgrid->setRowStretch(row, 10); | |
401 | |
402 m_tabOrdering[GeneralTab] = m_tabs->count(); | |
403 m_tabs->addTab(frame, tr("&General")); | |
404 | 360 |
405 // Appearance tab | 361 // Appearance tab |
406 | 362 |
407 frame = new QFrame; | 363 frame = new QFrame; |
408 subgrid = new QGridLayout; | 364 subgrid = new QGridLayout; |
409 frame->setLayout(subgrid); | 365 frame->setLayout(subgrid); |
410 row = 0; | 366 row = 0; |
411 | 367 |
412 subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel | |
413 ("Show Splash Screen"))), | |
414 row, 0); | |
415 subgrid->addWidget(showSplash, row++, 1, 1, 1); | |
416 | |
417 #ifdef Q_OS_MAC | 368 #ifdef Q_OS_MAC |
418 if (devicePixelRatio() > 1) { | 369 if (devicePixelRatio() > 1) { |
419 subgrid->addWidget(new QLabel(tr("Draw layers at Retina resolution:")), row, 0); | 370 subgrid->addWidget(new QLabel(tr("Draw layers at Retina resolution:")), row, 0); |
420 subgrid->addWidget(retina, row++, 1, 1, 1); | 371 subgrid->addWidget(retina, row++, 1, 1, 1); |
421 } | 372 } |
514 frame = new QFrame; | 465 frame = new QFrame; |
515 subgrid = new QGridLayout; | 466 subgrid = new QGridLayout; |
516 frame->setLayout(subgrid); | 467 frame->setLayout(subgrid); |
517 row = 0; | 468 row = 0; |
518 | 469 |
519 subgrid->addWidget(new QLabel(tr("Default session template for audio files:")), row++, 0); | 470 subgrid->addWidget(new QLabel(tr("Default session template when loading audio files:")), row++, 0); |
520 | 471 |
521 QListWidget *lw = new QListWidget(); | 472 QListWidget *lw = new QListWidget(); |
522 subgrid->addWidget(lw, row, 0); | 473 subgrid->addWidget(lw, row, 0); |
523 subgrid->setRowStretch(row, 10); | 474 subgrid->setRowStretch(row, 10); |
524 row++; | 475 row++; |
555 | 506 |
556 connect(lw, SIGNAL(currentRowChanged(int)), this, SLOT(defaultTemplateChanged(int))); | 507 connect(lw, SIGNAL(currentRowChanged(int)), this, SLOT(defaultTemplateChanged(int))); |
557 | 508 |
558 m_tabOrdering[TemplateTab] = m_tabs->count(); | 509 m_tabOrdering[TemplateTab] = m_tabs->count(); |
559 m_tabs->addTab(frame, tr("Session &Template")); | 510 m_tabs->addTab(frame, tr("Session &Template")); |
511 | |
512 // Audio IO tab | |
513 | |
514 frame = new QFrame; | |
515 subgrid = new QGridLayout; | |
516 frame->setLayout(subgrid); | |
517 row = 0; | |
518 | |
519 subgrid->addWidget(new QLabel(tr("Audio service:")), row, 0); | |
520 subgrid->addWidget(audioImplementation, row++, 1, 1, 2); | |
521 | |
522 subgrid->addWidget(new QLabel(tr("Audio playback device:")), row, 0); | |
523 subgrid->addWidget(m_audioPlaybackDeviceCombo, row++, 1, 1, 2); | |
524 | |
525 subgrid->addWidget(new QLabel(tr("Audio record device:")), row, 0); | |
526 subgrid->addWidget(m_audioRecordDeviceCombo, row++, 1, 1, 2); | |
527 | |
528 subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel | |
529 ("Use Gapless Mode"))), | |
530 row, 0); | |
531 subgrid->addWidget(gaplessMode, row++, 1, 1, 1); | |
532 | |
533 subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel | |
534 ("Resample On Load"))), | |
535 row, 0); | |
536 subgrid->addWidget(resampleOnLoad, row++, 1, 1, 1); | |
537 | |
538 subgrid->setRowStretch(row, 10); | |
539 | |
540 m_tabOrdering[AudioIOTab] = m_tabs->count(); | |
541 m_tabs->addTab(frame, tr("A&udio I/O")); | |
542 | |
543 // General tab | |
544 | |
545 frame = new QFrame; | |
546 subgrid = new QGridLayout; | |
547 frame->setLayout(subgrid); | |
548 row = 0; | |
549 | |
550 subgrid->addWidget(new QLabel(tr("%1:").arg(tr("User interface language"))), | |
551 row, 0); | |
552 subgrid->addWidget(locale, row++, 1, 1, 1); | |
553 | |
554 subgrid->addWidget(new QLabel(tr("%1:").arg(tr("Allow network usage"))), | |
555 row, 0); | |
556 subgrid->addWidget(networkPermish, row++, 1, 1, 1); | |
557 | |
558 subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel | |
559 ("Show Splash Screen"))), | |
560 row, 0); | |
561 subgrid->addWidget(showSplash, row++, 1, 1, 1); | |
562 | |
563 subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel | |
564 ("Temporary Directory Root"))), | |
565 row, 0); | |
566 subgrid->addWidget(m_tempDirRootEdit, row, 1, 1, 1); | |
567 subgrid->addWidget(tempDirButton, row, 2, 1, 1); | |
568 row++; | |
569 | |
570 subgrid->setRowStretch(row, 10); | |
571 | |
572 m_tabOrdering[GeneralTab] = m_tabs->count(); | |
573 m_tabs->addTab(frame, tr("&Other")); | |
560 | 574 |
561 QDialogButtonBox *bb = new QDialogButtonBox(Qt::Horizontal); | 575 QDialogButtonBox *bb = new QDialogButtonBox(Qt::Horizontal); |
562 grid->addWidget(bb, 1, 0); | 576 grid->addWidget(bb, 1, 0); |
563 | 577 |
564 QPushButton *ok = new QPushButton(tr("OK")); | 578 QPushButton *ok = new QPushButton(tr("OK")); |