163 } |
164 } |
164 |
165 |
165 // ============================================================================= |
166 // ============================================================================= |
166 // ----------------------------------------------------------------------------- |
167 // ----------------------------------------------------------------------------- |
167 ConfigDialog::~ConfigDialog() |
168 ConfigDialog::~ConfigDialog() |
168 { delete ui; |
169 { |
|
170 delete ui; |
169 } |
171 } |
170 |
172 |
171 // ============================================================================= |
173 // ============================================================================= |
172 // ----------------------------------------------------------------------------- |
174 // ----------------------------------------------------------------------------- |
173 void ConfigDialog::selectPage (int row) |
175 void ConfigDialog::selectPage (int row) |
174 { ui->m_pagelist->setCurrentRow (row); |
176 { |
|
177 ui->m_pagelist->setCurrentRow (row); |
175 ui->m_pages->setCurrentIndex (row); |
178 ui->m_pages->setCurrentIndex (row); |
176 } |
179 } |
177 |
180 |
178 // ============================================================================= |
181 // ============================================================================= |
179 // Adds a shortcut entry to the list of shortcuts. |
182 // Adds a shortcut entry to the list of shortcuts. |
180 // ----------------------------------------------------------------------------- |
183 // ----------------------------------------------------------------------------- |
181 void ConfigDialog::addShortcut (KeySequenceConfig& cfg, QAction* act, int& i) |
184 void ConfigDialog::addShortcut (KeySequenceConfig& cfg, QAction* act, int& i) |
182 { ShortcutListItem* item = new ShortcutListItem; |
185 { |
|
186 ShortcutListItem* item = new ShortcutListItem; |
183 item->setIcon (act->icon()); |
187 item->setIcon (act->icon()); |
184 item->setKeyConfig (&cfg); |
188 item->setKeyConfig (&cfg); |
185 item->setAction (act); |
189 item->setAction (act); |
186 setShortcutText (item); |
190 setShortcutText (item); |
187 |
191 |
195 |
199 |
196 // ============================================================================= |
200 // ============================================================================= |
197 // Initializes the table of grid stuff |
201 // Initializes the table of grid stuff |
198 // ----------------------------------------------------------------------------- |
202 // ----------------------------------------------------------------------------- |
199 void ConfigDialog::initGrids() |
203 void ConfigDialog::initGrids() |
200 { QGridLayout* gridlayout = new QGridLayout; |
204 { |
|
205 QGridLayout* gridlayout = new QGridLayout; |
201 QLabel* xlabel = new QLabel ("X"), |
206 QLabel* xlabel = new QLabel ("X"), |
202 *ylabel = new QLabel ("Y"), |
207 *ylabel = new QLabel ("Y"), |
203 *zlabel = new QLabel ("Z"), |
208 *zlabel = new QLabel ("Z"), |
204 *anglabel = new QLabel ("Angle"); |
209 *anglabel = new QLabel ("Angle"); |
205 int i = 1; |
210 int i = 1; |
206 |
211 |
207 for (QLabel* label : initlist<QLabel*> ({xlabel, ylabel, zlabel, anglabel})) |
212 for (QLabel* label : initlist<QLabel*> ({xlabel, ylabel, zlabel, anglabel})) |
208 { label->setAlignment (Qt::AlignCenter); |
213 { |
|
214 label->setAlignment (Qt::AlignCenter); |
209 gridlayout->addWidget (label, 0, i++); |
215 gridlayout->addWidget (label, 0, i++); |
210 } |
216 } |
211 |
217 |
212 for (int i = 0; i < g_NumGrids; ++i) |
218 for (int i = 0; i < g_NumGrids; ++i) |
213 { // Icon |
219 { |
|
220 // Icon |
214 lb_gridIcons[i] = new QLabel; |
221 lb_gridIcons[i] = new QLabel; |
215 lb_gridIcons[i]->setPixmap (getIcon (fmt ("grid-%1", str (g_GridInfo[i].name).toLower()))); |
222 lb_gridIcons[i]->setPixmap (getIcon (fmt ("grid-%1", str (g_GridInfo[i].name).toLower()))); |
216 |
223 |
217 // Text label |
224 // Text label |
218 lb_gridLabels[i] = new QLabel (fmt ("%1:", g_GridInfo[i].name)); |
225 lb_gridLabels[i] = new QLabel (fmt ("%1:", g_GridInfo[i].name)); |
268 |
277 |
269 // ============================================================================= |
278 // ============================================================================= |
270 // Initializes the stuff in the ext programs tab |
279 // Initializes the stuff in the ext programs tab |
271 // ----------------------------------------------------------------------------- |
280 // ----------------------------------------------------------------------------- |
272 void ConfigDialog::initExtProgs() |
281 void ConfigDialog::initExtProgs() |
273 { QGridLayout* pathsLayout = new QGridLayout; |
282 { |
|
283 QGridLayout* pathsLayout = new QGridLayout; |
274 int row = 0; |
284 int row = 0; |
275 |
285 |
276 for (LDExtProgInfo& info : g_LDExtProgInfo) |
286 for (LDExtProgInfo& info : g_LDExtProgInfo) |
277 { QLabel* icon = new QLabel, |
287 { |
|
288 QLabel* icon = new QLabel, |
278 *progLabel = new QLabel (info.name); |
289 *progLabel = new QLabel (info.name); |
279 QLineEdit* input = new QLineEdit; |
290 QLineEdit* input = new QLineEdit; |
280 QPushButton* setPathButton = new QPushButton; |
291 QPushButton* setPathButton = new QPushButton; |
281 |
292 |
282 icon->setPixmap (getIcon (info.iconname)); |
293 icon->setPixmap (getIcon (info.iconname)); |
307 |
318 |
308 // ============================================================================= |
319 // ============================================================================= |
309 // Set the settings based on widget data. |
320 // Set the settings based on widget data. |
310 // ----------------------------------------------------------------------------- |
321 // ----------------------------------------------------------------------------- |
311 void ConfigDialog::applySettings() |
322 void ConfigDialog::applySettings() |
312 { // Apply configuration |
323 { |
|
324 // Apply configuration |
313 lv_colorize = ui->colorizeObjects->isChecked(); |
325 lv_colorize = ui->colorizeObjects->isChecked(); |
314 gl_colorbfc = ui->colorBFC->isChecked(); |
326 gl_colorbfc = ui->colorBFC->isChecked(); |
315 gl_blackedges = ui->blackEdges->isChecked(); |
327 gl_blackedges = ui->blackEdges->isChecked(); |
316 gl_maincolor_alpha = ( (double) ui->mainColorAlpha->value()) / 10.0f; |
328 gl_maincolor_alpha = ( (double) ui->mainColorAlpha->value()) / 10.0f; |
317 gl_linethickness = ui->lineThickness->value(); |
329 gl_linethickness = ui->lineThickness->value(); |
358 |
371 |
359 // ============================================================================= |
372 // ============================================================================= |
360 // A dialog button was clicked |
373 // A dialog button was clicked |
361 // ----------------------------------------------------------------------------- |
374 // ----------------------------------------------------------------------------- |
362 void ConfigDialog::buttonClicked (QAbstractButton* button) |
375 void ConfigDialog::buttonClicked (QAbstractButton* button) |
363 { typedef QDialogButtonBox QDDB; |
376 { |
|
377 typedef QDialogButtonBox QDDB; |
364 QDialogButtonBox* dbb = ui->buttonBox; |
378 QDialogButtonBox* dbb = ui->buttonBox; |
365 |
379 |
366 if (button == dbb->button (QDDB::Ok)) |
380 if (button == dbb->button (QDDB::Ok)) |
367 { applySettings(); |
381 { |
|
382 applySettings(); |
368 accept(); |
383 accept(); |
369 } elif (button == dbb->button (QDDB::Apply)) |
384 } elif (button == dbb->button (QDDB::Apply)) |
370 { applySettings(); |
385 { |
|
386 applySettings(); |
371 } elif (button == dbb->button (QDDB::Cancel)) |
387 } elif (button == dbb->button (QDDB::Cancel)) |
372 { reject(); |
388 { |
|
389 reject(); |
373 } |
390 } |
374 } |
391 } |
375 |
392 |
376 // ============================================================================= |
393 // ============================================================================= |
377 // Update the list of color toolbar items in the quick color tab. |
394 // Update the list of color toolbar items in the quick color tab. |
378 // ----------------------------------------------------------------------------- |
395 // ----------------------------------------------------------------------------- |
379 void ConfigDialog::updateQuickColorList (LDQuickColor* sel) |
396 void ConfigDialog::updateQuickColorList (LDQuickColor* sel) |
380 { for (QListWidgetItem * item : quickColorItems) |
397 { |
|
398 for (QListWidgetItem * item : quickColorItems) |
381 delete item; |
399 delete item; |
382 |
400 |
383 quickColorItems.clear(); |
401 quickColorItems.clear(); |
384 |
402 |
385 // Init table items |
403 // Init table items |
386 for (LDQuickColor& entry : quickColors) |
404 for (LDQuickColor& entry : quickColors) |
387 { QListWidgetItem* item = new QListWidgetItem; |
405 { |
|
406 QListWidgetItem* item = new QListWidgetItem; |
388 |
407 |
389 if (entry.isSeparator()) |
408 if (entry.isSeparator()) |
390 { item->setText ("--------"); |
409 { |
|
410 item->setText ("--------"); |
391 item->setIcon (getIcon ("empty")); |
411 item->setIcon (getIcon ("empty")); |
392 } |
412 } |
393 else |
413 else |
394 { LDColor* col = entry.getColor(); |
414 { |
|
415 LDColor* col = entry.getColor(); |
395 |
416 |
396 if (col == null) |
417 if (col == null) |
397 { item->setText ("[[unknown color]]"); |
418 { |
|
419 item->setText ("[[unknown color]]"); |
398 item->setIcon (getIcon ("error")); |
420 item->setIcon (getIcon ("error")); |
399 } |
421 } |
400 else |
422 else |
401 { item->setText (col->name); |
423 { |
|
424 item->setText (col->name); |
402 item->setIcon (makeColorIcon (col, 16)); |
425 item->setIcon (makeColorIcon (col, 16)); |
403 } |
426 } |
404 } |
427 } |
405 |
428 |
406 ui->quickColorList->addItem (item); |
429 ui->quickColorList->addItem (item); |
407 quickColorItems << item; |
430 quickColorItems << item; |
408 |
431 |
409 if (sel && &entry == sel) |
432 if (sel && &entry == sel) |
410 { ui->quickColorList->setCurrentItem (item); |
433 { |
|
434 ui->quickColorList->setCurrentItem (item); |
411 ui->quickColorList->scrollToItem (item); |
435 ui->quickColorList->scrollToItem (item); |
412 } |
436 } |
413 } |
437 } |
414 } |
438 } |
415 |
439 |
416 // ============================================================================= |
440 // ============================================================================= |
417 // Quick colors: add or edit button was clicked. |
441 // Quick colors: add or edit button was clicked. |
418 // ----------------------------------------------------------------------------- |
442 // ----------------------------------------------------------------------------- |
419 void ConfigDialog::slot_setColor() |
443 void ConfigDialog::slot_setColor() |
420 { LDQuickColor* entry = null; |
444 { |
|
445 LDQuickColor* entry = null; |
421 QListWidgetItem* item = null; |
446 QListWidgetItem* item = null; |
422 const bool isNew = static_cast<QPushButton*> (sender()) == ui->quickColor_add; |
447 const bool isNew = static_cast<QPushButton*> (sender()) == ui->quickColor_add; |
423 |
448 |
424 if (isNew == false) |
449 if (isNew == false) |
425 { item = getSelectedQuickColor(); |
450 { |
|
451 item = getSelectedQuickColor(); |
426 |
452 |
427 if (!item) |
453 if (!item) |
428 return; |
454 return; |
429 |
455 |
430 int i = getItemRow (item, quickColorItems); |
456 int i = getItemRow (item, quickColorItems); |
457 |
484 |
458 // ============================================================================= |
485 // ============================================================================= |
459 // Remove a quick color |
486 // Remove a quick color |
460 // ----------------------------------------------------------------------------- |
487 // ----------------------------------------------------------------------------- |
461 void ConfigDialog::slot_delColor() |
488 void ConfigDialog::slot_delColor() |
462 { if (ui->quickColorList->selectedItems().isEmpty()) |
489 { |
|
490 if (ui->quickColorList->selectedItems().isEmpty()) |
463 return; |
491 return; |
464 |
492 |
465 QListWidgetItem* item = ui->quickColorList->selectedItems() [0]; |
493 QListWidgetItem* item = ui->quickColorList->selectedItems() [0]; |
466 quickColors.removeAt (getItemRow (item, quickColorItems)); |
494 quickColors.removeAt (getItemRow (item, quickColorItems)); |
467 updateQuickColorList(); |
495 updateQuickColorList(); |
492 |
521 |
493 // ============================================================================= |
522 // ============================================================================= |
494 // Add a separator to quick colors |
523 // Add a separator to quick colors |
495 // ----------------------------------------------------------------------------- |
524 // ----------------------------------------------------------------------------- |
496 void ConfigDialog::slot_addColorSeparator() |
525 void ConfigDialog::slot_addColorSeparator() |
497 { quickColors << LDQuickColor::getSeparator(); |
526 { |
|
527 quickColors << LDQuickColor::getSeparator(); |
498 updateQuickColorList (&quickColors[quickColors.size() - 1]); |
528 updateQuickColorList (&quickColors[quickColors.size() - 1]); |
499 } |
529 } |
500 |
530 |
501 // ============================================================================= |
531 // ============================================================================= |
502 // Clear all quick colors |
532 // Clear all quick colors |
503 // ----------------------------------------------------------------------------- |
533 // ----------------------------------------------------------------------------- |
504 void ConfigDialog::slot_clearColors() |
534 void ConfigDialog::slot_clearColors() |
505 { quickColors.clear(); |
535 { |
|
536 quickColors.clear(); |
506 updateQuickColorList(); |
537 updateQuickColorList(); |
507 } |
538 } |
508 |
539 |
509 // ============================================================================= |
540 // ============================================================================= |
510 // Pick a color and set the appropriate configuration option. |
541 // Pick a color and set the appropriate configuration option. |
511 // ----------------------------------------------------------------------------- |
542 // ----------------------------------------------------------------------------- |
512 void ConfigDialog::pickColor (str& conf, QPushButton* button) |
543 void ConfigDialog::pickColor (str& conf, QPushButton* button) |
513 { QColor col = QColorDialog::getColor (QColor (conf)); |
544 { |
|
545 QColor col = QColorDialog::getColor (QColor (conf)); |
514 |
546 |
515 if (col.isValid()) |
547 if (col.isValid()) |
516 { int r = col.red(), |
548 { |
|
549 int r = col.red(), |
517 g = col.green(), |
550 g = col.green(), |
518 b = col.blue(); |
551 b = col.blue(); |
519 |
552 |
520 str colname; |
553 str colname; |
521 colname.sprintf ("#%.2X%.2X%.2X", r, g, b); |
554 colname.sprintf ("#%.2X%.2X%.2X", r, g, b); |
525 } |
558 } |
526 |
559 |
527 // ============================================================================= |
560 // ============================================================================= |
528 // ----------------------------------------------------------------------------- |
561 // ----------------------------------------------------------------------------- |
529 void ConfigDialog::slot_setGLBackground() |
562 void ConfigDialog::slot_setGLBackground() |
530 { pickColor (gl_bgcolor, ui->backgroundColorButton); |
563 { |
|
564 pickColor (gl_bgcolor, ui->backgroundColorButton); |
531 } |
565 } |
532 |
566 |
533 // ============================================================================= |
567 // ============================================================================= |
534 // ----------------------------------------------------------------------------- |
568 // ----------------------------------------------------------------------------- |
535 void ConfigDialog::slot_setGLForeground() |
569 void ConfigDialog::slot_setGLForeground() |
536 { pickColor (gl_maincolor, ui->mainColorButton); |
570 { |
|
571 pickColor (gl_maincolor, ui->mainColorButton); |
537 } |
572 } |
538 |
573 |
539 // ============================================================================= |
574 // ============================================================================= |
540 // ----------------------------------------------------------------------------- |
575 // ----------------------------------------------------------------------------- |
541 void ConfigDialog::slot_setGLSelectColor() |
576 void ConfigDialog::slot_setGLSelectColor() |
542 { pickColor (gl_selectcolor, ui->selColorButton); |
577 { |
|
578 pickColor (gl_selectcolor, ui->selColorButton); |
543 } |
579 } |
544 |
580 |
545 // ============================================================================= |
581 // ============================================================================= |
546 // Sets background color of a given button. |
582 // Sets background color of a given button. |
547 // ----------------------------------------------------------------------------- |
583 // ----------------------------------------------------------------------------- |
548 void ConfigDialog::setButtonBackground (QPushButton* button, str value) |
584 void ConfigDialog::setButtonBackground (QPushButton* button, str value) |
549 { button->setIcon (getIcon ("colorselect")); |
585 { |
|
586 button->setIcon (getIcon ("colorselect")); |
550 button->setAutoFillBackground (true); |
587 button->setAutoFillBackground (true); |
551 button->setStyleSheet (fmt ("background-color: %1", value)); |
588 button->setStyleSheet (fmt ("background-color: %1", value)); |
552 } |
589 } |
553 |
590 |
554 // ============================================================================= |
591 // ============================================================================= |
555 // Finds the given list widget item in the list of widget items given. |
592 // Finds the given list widget item in the list of widget items given. |
556 // ----------------------------------------------------------------------------- |
593 // ----------------------------------------------------------------------------- |
557 int ConfigDialog::getItemRow (QListWidgetItem* item, QList<QListWidgetItem*>& haystack) |
594 int ConfigDialog::getItemRow (QListWidgetItem* item, QList<QListWidgetItem*>& haystack) |
558 { int i = 0; |
595 { |
|
596 int i = 0; |
559 |
597 |
560 for (QListWidgetItem* it : haystack) |
598 for (QListWidgetItem* it : haystack) |
561 { if (it == item) |
599 { |
|
600 if (it == item) |
562 return i; |
601 return i; |
563 |
602 |
564 ++i; |
603 ++i; |
565 } |
604 } |
566 |
605 |
569 |
608 |
570 // ============================================================================= |
609 // ============================================================================= |
571 // Which quick color is currently selected? |
610 // Which quick color is currently selected? |
572 // ----------------------------------------------------------------------------- |
611 // ----------------------------------------------------------------------------- |
573 QListWidgetItem* ConfigDialog::getSelectedQuickColor() |
612 QListWidgetItem* ConfigDialog::getSelectedQuickColor() |
574 { if (ui->quickColorList->selectedItems().isEmpty()) |
613 { |
|
614 if (ui->quickColorList->selectedItems().isEmpty()) |
575 return null; |
615 return null; |
576 |
616 |
577 return ui->quickColorList->selectedItems() [0]; |
617 return ui->quickColorList->selectedItems() [0]; |
578 } |
618 } |
579 |
619 |
580 // ============================================================================= |
620 // ============================================================================= |
581 // Get the list of shortcuts selected |
621 // Get the list of shortcuts selected |
582 // ----------------------------------------------------------------------------- |
622 // ----------------------------------------------------------------------------- |
583 QList<ShortcutListItem*> ConfigDialog::getShortcutSelection() |
623 QList<ShortcutListItem*> ConfigDialog::getShortcutSelection() |
584 { QList<ShortcutListItem*> out; |
624 { |
|
625 QList<ShortcutListItem*> out; |
585 |
626 |
586 for (QListWidgetItem* entry : ui->shortcutsList->selectedItems()) |
627 for (QListWidgetItem* entry : ui->shortcutsList->selectedItems()) |
587 out << static_cast<ShortcutListItem*> (entry); |
628 out << static_cast<ShortcutListItem*> (entry); |
588 |
629 |
589 return out; |
630 return out; |
606 |
648 |
607 // ============================================================================= |
649 // ============================================================================= |
608 // Reset a shortcut to defaults |
650 // Reset a shortcut to defaults |
609 // ----------------------------------------------------------------------------- |
651 // ----------------------------------------------------------------------------- |
610 void ConfigDialog::slot_resetShortcut() |
652 void ConfigDialog::slot_resetShortcut() |
611 { QList<ShortcutListItem*> sel = getShortcutSelection(); |
653 { |
|
654 QList<ShortcutListItem*> sel = getShortcutSelection(); |
612 |
655 |
613 for (ShortcutListItem* item : sel) |
656 for (ShortcutListItem* item : sel) |
614 { item->getKeyConfig()->reset(); |
657 { |
|
658 item->getKeyConfig()->reset(); |
615 setShortcutText (item); |
659 setShortcutText (item); |
616 } |
660 } |
617 } |
661 } |
618 |
662 |
619 // ============================================================================= |
663 // ============================================================================= |
620 // Remove the shortcut of an action. |
664 // Remove the shortcut of an action. |
621 // ----------------------------------------------------------------------------- |
665 // ----------------------------------------------------------------------------- |
622 void ConfigDialog::slot_clearShortcut() |
666 void ConfigDialog::slot_clearShortcut() |
623 { QList<ShortcutListItem*> sel = getShortcutSelection(); |
667 { |
|
668 QList<ShortcutListItem*> sel = getShortcutSelection(); |
624 |
669 |
625 for (ShortcutListItem* item : sel) |
670 for (ShortcutListItem* item : sel) |
626 { item->getKeyConfig()->setValue (QKeySequence()); |
671 { |
|
672 item->getKeyConfig()->setValue (QKeySequence()); |
627 setShortcutText (item); |
673 setShortcutText (item); |
628 } |
674 } |
629 } |
675 } |
630 |
676 |
631 // ============================================================================= |
677 // ============================================================================= |
632 // Set the path of an external program |
678 // Set the path of an external program |
633 // ----------------------------------------------------------------------------- |
679 // ----------------------------------------------------------------------------- |
634 void ConfigDialog::slot_setExtProgPath() |
680 void ConfigDialog::slot_setExtProgPath() |
635 { const LDExtProgInfo* info = null; |
681 { |
|
682 const LDExtProgInfo* info = null; |
636 |
683 |
637 for (const LDExtProgInfo& it : g_LDExtProgInfo) |
684 for (const LDExtProgInfo& it : g_LDExtProgInfo) |
638 { if (it.setPathButton == sender()) |
685 { |
639 { info = ⁢ |
686 if (it.setPathButton == sender()) |
|
687 { |
|
688 info = ⁢ |
640 break; |
689 break; |
641 } |
690 } |
642 } |
691 } |
643 |
692 |
644 assert (info != null); |
693 assert (info != null); |
652 |
701 |
653 // ============================================================================= |
702 // ============================================================================= |
654 // '...' button pressed for the download path |
703 // '...' button pressed for the download path |
655 // ----------------------------------------------------------------------------- |
704 // ----------------------------------------------------------------------------- |
656 void ConfigDialog::slot_findDownloadFolder() |
705 void ConfigDialog::slot_findDownloadFolder() |
657 { str dpath = QFileDialog::getExistingDirectory(); |
706 { |
|
707 str dpath = QFileDialog::getExistingDirectory(); |
658 ui->downloadPath->setText (dpath); |
708 ui->downloadPath->setText (dpath); |
659 } |
709 } |
660 |
710 |
661 // ============================================================================= |
711 // ============================================================================= |
662 // Updates the text string for a given shortcut list item |
712 // Updates the text string for a given shortcut list item |
663 // ----------------------------------------------------------------------------- |
713 // ----------------------------------------------------------------------------- |
664 void ConfigDialog::setShortcutText (ShortcutListItem* item) |
714 void ConfigDialog::setShortcutText (ShortcutListItem* item) |
665 { QAction* act = item->getAction(); |
715 { |
|
716 QAction* act = item->getAction(); |
666 str label = act->iconText(); |
717 str label = act->iconText(); |
667 str keybind = item->getKeyConfig()->getValue().toString(); |
718 str keybind = item->getKeyConfig()->getValue().toString(); |
668 item->setText (fmt ("%1 (%2)", label, keybind)); |
719 item->setText (fmt ("%1 (%2)", label, keybind)); |
669 } |
720 } |
670 |
721 |
671 // ============================================================================= |
722 // ============================================================================= |
672 // Gets the configuration string of the quick color toolbar |
723 // Gets the configuration string of the quick color toolbar |
673 // ----------------------------------------------------------------------------- |
724 // ----------------------------------------------------------------------------- |
674 str ConfigDialog::quickColorString() |
725 str ConfigDialog::quickColorString() |
675 { str val; |
726 { |
|
727 str val; |
676 |
728 |
677 for (const LDQuickColor& entry : quickColors) |
729 for (const LDQuickColor& entry : quickColors) |
678 { if (val.length() > 0) |
730 { |
|
731 if (val.length() > 0) |
679 val += ':'; |
732 val += ':'; |
680 |
733 |
681 if (entry.isSeparator()) |
734 if (entry.isSeparator()) |
682 val += '|'; |
735 val += '|'; |
683 else |
736 else |
694 // =============================================================================================== |
747 // =============================================================================================== |
695 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
748 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
696 // =============================================================================================== |
749 // =============================================================================================== |
697 KeySequenceDialog::KeySequenceDialog (QKeySequence seq, QWidget* parent, Qt::WindowFlags f) : |
750 KeySequenceDialog::KeySequenceDialog (QKeySequence seq, QWidget* parent, Qt::WindowFlags f) : |
698 QDialog (parent, f), seq (seq) |
751 QDialog (parent, f), seq (seq) |
699 { lb_output = new QLabel; |
752 { |
|
753 lb_output = new QLabel; |
700 IMPLEMENT_DIALOG_BUTTONS |
754 IMPLEMENT_DIALOG_BUTTONS |
701 |
755 |
702 setWhatsThis (tr ("Into this dialog you can input a key sequence for use as a " |
756 setWhatsThis (tr ("Into this dialog you can input a key sequence for use as a " |
703 "shortcut in LDForge. Use OK to confirm the new shortcut and Cancel to " |
757 "shortcut in LDForge. Use OK to confirm the new shortcut and Cancel to " |
704 "dismiss.")); |
758 "dismiss.")); |