15 #include <QActionGroup>
17 #include <QDockWidget>
18 #include <QMdiSubWindow>
24 #include <QToolButton>
25 #include <QVBoxLayout>
26 #include "../backend/config/btconfig.h"
27 #include "../util/btassert.h"
28 #include "../util/btconnect.h"
29 #include "../util/cresmgr.h"
51 createMenuAndToolBar();
53 createCentralWidget();
56 addDockWidget(Qt::LeftDockWidgetArea, m_bookshelfDock);
60 m_bookmarksDock->setWidget(m_bookmarksPage);
61 addDockWidget(Qt::LeftDockWidgetArea, m_bookmarksDock);
62 tabifyDockWidget(m_bookmarksDock, m_bookshelfDock);
63 m_bookshelfDock->loadBookshelfState();
67 m_infoDisplay->resize(150, 150);
68 m_magDock->setWidget(m_infoDisplay);
69 addDockWidget(Qt::LeftDockWidgetArea, m_magDock);
76 qOverload<Rendering::InfoType, QString const &>(
79 m_mdi->setMinimumSize(100, 100);
80 m_mdi->setFocusPolicy(Qt::ClickFocus);
82 BT_CONNECT(&m_autoScrollTimer, &QTimer::timeout,
90 action->setText(tr(
"&Quit"));
91 action->setIcon(CResMgr::mainMenu::window::quit::icon());
92 action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q));
93 action->setToolTip(tr(
"Quit BibleTime"));
94 a->
addAction(QStringLiteral(
"quit"), action);
97 action->setText(tr(
"Auto scroll up"));
98 action->setShortcut(QKeySequence(Qt::ShiftModifier | Qt::Key_Up));
99 a->
addAction(QStringLiteral(
"autoScrollUp"), action);
102 action->setText(tr(
"Auto scroll down"));
103 action->setShortcut(QKeySequence(Qt::ShiftModifier | Qt::Key_Down));
104 a->
addAction(QStringLiteral(
"autoScrollDown"), action);
107 action->setText(tr(
"Auto scroll pause"));
108 action->setShortcut(QKeySequence(Qt::Key_Space));
109 action->setDisabled(
true);
110 a->
addAction(QStringLiteral(
"autoScrollPause"), action);
113 action->setText(tr(
"&Fullscreen mode"));
114 action->setIcon(CResMgr::mainMenu::window::showFullscreen::icon());
116 action->setToolTip(tr(
"Toggle fullscreen mode of the main window"));
117 a->
addAction(QStringLiteral(
"toggleFullscreen"), action);
120 action->setText(tr(
"&Show toolbar"));
121 action->setShortcut(QKeySequence(Qt::Key_F6));
122 a->
addAction(QStringLiteral(
"showToolbar"), action);
125 action->setText(tr(
"Search in &open works..."));
126 action->setIcon(CResMgr::mainMenu::mainIndex::search::icon());
128 action->setToolTip(tr(
"Search in all works that are currently open"));
129 a->
addAction(QStringLiteral(
"searchOpenWorks"), action);
132 action->setText(tr(
"Search in standard &Bible..."));
133 action->setIcon(CResMgr::mainMenu::mainIndex::searchdefaultbible::icon());
135 action->setToolTip(tr(
"Search in the standard Bible"));
136 a->
addAction(QStringLiteral(
"searchStdBible"), action);
139 action->setText(tr(
"Save as &new session..."));
140 action->setIcon(CResMgr::mainMenu::window::saveToNewProfile::icon());
142 action->setToolTip(tr(
"Create and save a new session"));
143 a->
addAction(QStringLiteral(
"saveNewSession"), action);
146 action->setText(tr(
"&Manual mode"));
147 action->setIcon(CResMgr::mainMenu::window::arrangementMode::manual::icon());
149 action->setToolTip(tr(
"Manually arrange the open windows"));
150 a->
addAction(QStringLiteral(
"manualArrangement"), action);
153 action->setText(tr(
"Auto-tile &vertically"));
154 action->setIcon(CResMgr::mainMenu::window::arrangementMode::autoTileVertical::icon());
156 action->setToolTip(tr(
"Automatically tile the open windows vertically (arrange side by side)"));
157 a->
addAction(QStringLiteral(
"autoVertical"), action);
160 action->setText(tr(
"Auto-tile &horizontally"));
161 action->setIcon(CResMgr::mainMenu::window::arrangementMode::autoTileHorizontal::icon());
163 action->setToolTip(tr(
"Automatically tile the open windows horizontally (arrange on top of each other)"));
164 a->
addAction(QStringLiteral(
"autoHorizontal"), action);
167 action->setText(tr(
"Auto-&tile"));
168 action->setIcon(CResMgr::mainMenu::window::arrangementMode::autoTile::icon());
170 action->setToolTip(tr(
"Automatically tile the open windows"));
171 a->
addAction(QStringLiteral(
"autoTile"), action);
174 action->setText(tr(
"Ta&bbed"));
175 action->setIcon(CResMgr::mainMenu::window::arrangementMode::autoTabbed::icon());
177 action->setToolTip(tr(
"Automatically tab the open windows"));
178 a->
addAction(QStringLiteral(
"autoTabbed"), action);
181 action->setText(tr(
"Auto-&cascade"));
182 action->setIcon(CResMgr::mainMenu::window::arrangementMode::autoCascade::icon());
184 action->setToolTip(tr(
"Automatically cascade the open windows"));
185 a->
addAction(QStringLiteral(
"autoCascade"), action);
188 action->setText(tr(
"&Cascade"));
189 action->setIcon(CResMgr::mainMenu::window::cascade::icon());
191 action->setToolTip(tr(
"Cascade the open windows"));
192 a->
addAction(QStringLiteral(
"cascade"), action);
195 action->setText(tr(
"&Tile"));
196 action->setIcon(CResMgr::mainMenu::window::tile::icon());
198 action->setToolTip(tr(
"Tile the open windows"));
199 a->
addAction(QStringLiteral(
"tile"), action);
202 action->setText(tr(
"Tile &vertically"));
203 action->setIcon(CResMgr::mainMenu::window::tileVertical::icon());
205 action->setToolTip(tr(
"Vertically tile (arrange side by side) the open windows"));
206 a->
addAction(QStringLiteral(
"tileVertically"), action);
209 action->setText(tr(
"Tile &horizontally"));
210 action->setIcon(CResMgr::mainMenu::window::tileHorizontal::icon());
212 action->setToolTip(tr(
"Horizontally tile (arrange on top of each other) the open windows"));
213 a->
addAction(QStringLiteral(
"tileHorizontally"), action);
216 action->setText(tr(
"Close &window"));
217 action->setIcon(CResMgr::mainMenu::window::close::icon());
219 action->setToolTip(tr(
"Close the current open window"));
220 a->
addAction(QStringLiteral(
"closeWindow"), action);
223 action->setText(tr(
"Cl&ose all windows"));
224 action->setIcon(CResMgr::mainMenu::window::closeAll::icon());
226 action->setToolTip(tr(
"Close all open windows inside BibleTime"));
227 a->
addAction(QStringLiteral(
"closeAllWindows"), action);
230 action->setText(tr(
"&Configure BibleTime..."));
231 action->setIcon(CResMgr::mainMenu::settings::configureDialog::icon());
232 action->setToolTip(tr(
"Set BibleTime's preferences"));
233 a->
addAction(QStringLiteral(
"setPreferences"), action);
236 action->setText(tr(
"Bookshelf Manager..."));
237 action->setIcon(CResMgr::mainMenu::settings::swordSetupDialog::icon());
239 action->setToolTip(tr(
"Configure your bookshelf and install/update/remove/index works"));
240 a->
addAction(QStringLiteral(
"bookshelfWizard"), action);
243 action->setText(tr(
"&Handbook"));
244 action->setIcon(CResMgr::mainMenu::help::handbook::icon());
246 action->setToolTip(tr(
"Open BibleTime's handbook"));
247 a->
addAction(QStringLiteral(
"openHandbook"), action);
250 action->setText(tr(
"&Bible Study Howto"));
251 action->setIcon(CResMgr::mainMenu::help::bibleStudyHowTo::icon());
253 action->setToolTip(tr(
"Open the Bible study HowTo included with BibleTime.<br/>This HowTo is an introduction on how to study the Bible in an efficient way."));
254 a->
addAction(QStringLiteral(
"bibleStudyHowto"), action);
257 action->setText(tr(
"&About BibleTime"));
258 action->setIcon(CResMgr::mainMenu::help::aboutBibleTime::icon());
259 action->setToolTip(tr(
"Information about the BibleTime program"));
260 a->
addAction(QStringLiteral(
"aboutBibleTime"), action);
263 action->setText(tr(
"&Tip of the day..."));
264 action->setIcon(CResMgr::mainMenu::help::tipOfTheDay::icon());
266 action->setToolTip(tr(
"Show tips about BibleTime"));
267 a->
addAction(QStringLiteral(
"tipOfTheDay"), action);
270 a->
addAction(QStringLiteral(
"showToolbarsInTextWindows"), action);
273 a->
addAction(QStringLiteral(
"showNavigation"), action);
276 a->
addAction(QStringLiteral(
"showWorks"), action);
279 a->
addAction(QStringLiteral(
"showTools"), action);
282 a->
addAction(QStringLiteral(
"showFormat"), action);
285 a->
addAction(QStringLiteral(
"showParallelTextHeaders"), action);
288 a->
addAction(QStringLiteral(
"showBookshelf"), action);
291 a->
addAction(QStringLiteral(
"showBookmarks"), action);
294 a->
addAction(QStringLiteral(
"showMag"), action);
296 retranslateUiActions(a);
301 bar->setFloatable(
false);
302 bar->setMovable(
true);
303 bar->setVisible(visible);
309 m_navToolBar->clear();
310 m_worksToolBar->clear();
311 m_toolsToolBar->clear();
326 addToolBar(m_mainToolBar);
331 QStringLiteral(
"GUI/showToolbarsInEachWindow"),
335 addToolBar(m_navToolBar);
338 m_worksToolBar->setVisible(visible);
339 addToolBar(m_worksToolBar);
342 addToolBar(m_toolsToolBar);
349 m_findWidget->setVisible(
false);
351 QVBoxLayout* layout =
new QVBoxLayout();
352 layout->setContentsMargins(0, 0, 0, 0);
353 layout->addWidget(m_mdi);
354 layout->addWidget(m_findWidget);
357 widget->setLayout(layout);
358 setCentralWidget(widget);
369 BT_CONNECT(m_mdi, &CMDIArea::subWindowActivated,
376 insertKeyboardActions(m_actionCollection);
382 QStringLiteral(
"GUI/mainWindow/openWorkAction/grouping"),
386 { createReadDisplayWindow(module); });
388 m_quitAction = &m_actionCollection->action(QStringLiteral(
"quit"));
389 m_quitAction->setMenuRole(QAction::QuitRole);
391 this, &BibleTime::close);
394 m_autoScrollUpAction =
395 &m_actionCollection->action(QStringLiteral(
"autoScrollUp"));
396 BT_CONNECT(m_autoScrollUpAction, &QAction::triggered,
397 this, &BibleTime::autoScroll<true>);
398 m_autoScrollDownAction =
399 &m_actionCollection->action(QStringLiteral(
"autoScrollDown"));
400 BT_CONNECT(m_autoScrollDownAction, &QAction::triggered,
401 this, &BibleTime::autoScroll<false>);
402 m_autoScrollPauseAction =
403 &m_actionCollection->action(QStringLiteral(
"autoScrollPause"));
404 BT_CONNECT(m_autoScrollPauseAction, &QAction::triggered,
408 m_windowFullscreenAction =
409 &m_actionCollection->action(QStringLiteral(
"toggleFullscreen"));
410 m_windowFullscreenAction->setCheckable(
true);
411 BT_CONNECT(m_windowFullscreenAction, &QAction::triggered,
415 m_showBookshelfAction = m_bookshelfDock->toggleViewAction();
416 m_showBookshelfAction->setIcon(CResMgr::mainMenu::view::showBookshelf::icon());
417 m_showBookshelfAction->setToolTip(tr(
"Toggle visibility of the bookshelf window"));
418 m_actionCollection->removeAction(QStringLiteral(
"showBookshelf"));
419 m_actionCollection->addAction(QStringLiteral(
"showBookshelf"),
420 m_showBookshelfAction);
421 m_showBookmarksAction = m_bookmarksDock->toggleViewAction();
422 m_showBookmarksAction->setIcon(CResMgr::mainMenu::view::showBookmarks::icon());
423 m_showBookmarksAction->setToolTip(tr(
"Toggle visibility of the bookmarks window"));
424 m_actionCollection->removeAction(QStringLiteral(
"showBookmarks"));
425 m_actionCollection->addAction(QStringLiteral(
"showBookmarks"),
426 m_showBookmarksAction);
427 m_showMagAction = m_magDock->toggleViewAction();
428 m_showMagAction->setIcon(CResMgr::mainMenu::view::showMag::icon());
429 m_showMagAction->setToolTip(tr(
"Toggle visibility of the mag window"));
430 m_actionCollection->removeAction(QStringLiteral(
"showMag"));
431 m_actionCollection->addAction(QStringLiteral(
"showMag"), m_showMagAction);
433 auto const sessionGuiConf =
436 m_showTextAreaHeadersAction =
437 &m_actionCollection->action(
438 QStringLiteral(
"showParallelTextHeaders"));
439 m_showTextAreaHeadersAction->setCheckable(
true);
440 m_showTextAreaHeadersAction->setChecked(
441 sessionGuiConf.value<
bool>(
442 QStringLiteral(
"showTextWindowHeaders"),
444 BT_CONNECT(m_showTextAreaHeadersAction, &QAction::toggled,
447 m_showMainWindowToolbarAction =
448 &m_actionCollection->action(QStringLiteral(
"showToolbar"));
449 m_showMainWindowToolbarAction->setCheckable(
true);
450 m_showMainWindowToolbarAction->setChecked(
451 sessionGuiConf.value<
bool>(QStringLiteral(
"showMainToolbar"),
453 BT_CONNECT(m_showMainWindowToolbarAction, &QAction::triggered,
456 m_showTextWindowNavigationAction =
457 &m_actionCollection->action(QStringLiteral(
"showNavigation"));
458 m_showTextWindowNavigationAction->setCheckable(
true);
459 m_showTextWindowNavigationAction->setChecked(
460 sessionGuiConf.value<
bool>(
461 QStringLiteral(
"showTextWindowNavigator"),
true));
462 BT_CONNECT(m_showTextWindowNavigationAction, &QAction::toggled,
465 m_showTextWindowModuleChooserAction =
466 &m_actionCollection->action(QStringLiteral(
"showWorks"));
467 m_showTextWindowModuleChooserAction->setCheckable(
true);
468 m_showTextWindowModuleChooserAction->setChecked(
469 sessionGuiConf.value<
bool>(
470 QStringLiteral(
"showTextWindowModuleSelectorButtons"),
472 BT_CONNECT(m_showTextWindowModuleChooserAction, &QAction::toggled,
475 m_showTextWindowToolButtonsAction =
476 &m_actionCollection->action(QStringLiteral(
"showTools"));
477 m_showTextWindowToolButtonsAction->setCheckable(
true);
478 m_showTextWindowToolButtonsAction->setChecked(
479 sessionGuiConf.value<
bool>(
480 QStringLiteral(
"showTextWindowToolButtons"),
482 BT_CONNECT(m_showTextWindowToolButtonsAction, &QAction::toggled,
485 m_toolbarsInEachWindow =
486 &m_actionCollection->action(
487 QStringLiteral(
"showToolbarsInTextWindows"));
488 m_toolbarsInEachWindow->setCheckable(
true);
489 m_toolbarsInEachWindow->setChecked(
490 sessionGuiConf.value<
bool>(
491 QStringLiteral(
"showToolbarsInEachWindow"),
493 BT_CONNECT(m_toolbarsInEachWindow, &QAction::toggled,
497 m_searchOpenWorksAction =
498 &m_actionCollection->action(QStringLiteral(
"searchOpenWorks"));
499 BT_CONNECT(m_searchOpenWorksAction, &QAction::triggered,
502 m_searchStandardBibleAction =
503 &m_actionCollection->action(QStringLiteral(
"searchStdBible"));
504 BT_CONNECT(m_searchStandardBibleAction, &QAction::triggered,
508 m_windowCloseAction =
509 &m_actionCollection->action(QStringLiteral(
"closeWindow"));
510 BT_CONNECT(m_windowCloseAction, &QAction::triggered,
511 m_mdi, &CMDIArea::closeActiveSubWindow);
513 m_windowCloseAllAction =
514 &m_actionCollection->action(QStringLiteral(
"closeAllWindows"));
515 BT_CONNECT(m_windowCloseAllAction, &QAction::triggered,
516 m_mdi, &CMDIArea::closeAllSubWindows);
518 m_windowCascadeAction =
519 &m_actionCollection->action(QStringLiteral(
"cascade"));
520 BT_CONNECT(m_windowCascadeAction, &QAction::triggered,
523 m_windowTileAction = &m_actionCollection->action(QStringLiteral(
"tile"));
524 BT_CONNECT(m_windowTileAction, &QAction::triggered,
527 m_windowTileVerticalAction =
528 &m_actionCollection->action(QStringLiteral(
"tileVertically"));
529 BT_CONNECT(m_windowTileVerticalAction, &QAction::triggered,
532 m_windowTileHorizontalAction =
533 &m_actionCollection->action(QStringLiteral(
"tileHorizontally"));
534 BT_CONNECT(m_windowTileHorizontalAction, &QAction::triggered,
538 sessionGuiConf.value<
alignmentMode>(QStringLiteral(
"alignmentMode"),
541 m_windowManualModeAction =
542 &m_actionCollection->action(QStringLiteral(
"manualArrangement"));
543 m_windowManualModeAction->setCheckable(
true);
545 m_windowAutoTabbedAction =
546 &m_actionCollection->action(QStringLiteral(
"autoTabbed"));
547 m_windowAutoTabbedAction->setCheckable(
true);
550 m_windowAutoTileVerticalAction =
551 &m_actionCollection->action(QStringLiteral(
"autoVertical"));
552 m_windowAutoTileVerticalAction->setCheckable(
true);
555 m_windowAutoTileHorizontalAction =
556 &m_actionCollection->action(QStringLiteral(
"autoHorizontal"));
557 m_windowAutoTileHorizontalAction->setCheckable(
true);
559 m_windowAutoTileAction =
560 &m_actionCollection->action(QStringLiteral(
"autoTile"));
561 m_windowAutoTileAction->setCheckable(
true);
563 m_windowAutoCascadeAction =
564 &m_actionCollection->action(QStringLiteral(
"autoCascade"));
565 m_windowAutoCascadeAction->setCheckable(
true);
574 alignmentAction = m_windowAutoTabbedAction;
break;
576 alignmentAction = m_windowAutoTileVerticalAction;
break;
578 alignmentAction = m_windowAutoTileHorizontalAction;
break;
580 alignmentAction = m_windowAutoTileAction;
break;
582 alignmentAction = m_windowAutoCascadeAction;
break;
585 alignmentAction = m_windowManualModeAction;
break;
587 alignmentAction->setChecked(
true);
588 slotUpdateWindowArrangementActions(alignmentAction);
590 m_windowSaveToNewProfileAction =
591 &m_actionCollection->action(QStringLiteral(
"saveNewSession"));
592 BT_CONNECT(m_windowSaveToNewProfileAction, &QAction::triggered,
595 m_setPreferencesAction =
596 &m_actionCollection->action(QStringLiteral(
"setPreferences"));
597 m_setPreferencesAction->setMenuRole( QAction::PreferencesRole );
598 BT_CONNECT(m_setPreferencesAction, &QAction::triggered,
601 m_bookshelfWizardAction =
602 &m_actionCollection->action(QStringLiteral(
"bookshelfWizard"));
603 m_bookshelfWizardAction->setMenuRole( QAction::ApplicationSpecificRole );
604 BT_CONNECT(m_bookshelfWizardAction, &QAction::triggered,
607 m_openHandbookAction =
608 &m_actionCollection->action(QStringLiteral(
"openHandbook"));
609 BT_CONNECT(m_openHandbookAction, &QAction::triggered,
612 m_bibleStudyHowtoAction =
613 &m_actionCollection->action(QStringLiteral(
"bibleStudyHowto"));
614 BT_CONNECT(m_bibleStudyHowtoAction, &QAction::triggered,
617 m_aboutBibleTimeAction =
618 &m_actionCollection->action(QStringLiteral(
"aboutBibleTime"));
619 m_aboutBibleTimeAction->setMenuRole( QAction::AboutRole );
620 BT_CONNECT(m_aboutBibleTimeAction, &QAction::triggered,
623 m_tipOfTheDayAction =
624 &m_actionCollection->action(QStringLiteral(
"tipOfTheDay"));
625 BT_CONNECT(m_tipOfTheDayAction, &QAction::triggered,
628 if (
btApp->debugMode()) {
629 m_debugWidgetAction =
new QAction(
this);
630 m_debugWidgetAction->setCheckable(
true);
631 BT_CONNECT(m_debugWidgetAction, &QAction::triggered,
635 retranslateUiActions(m_actionCollection);
640 m_fileMenu =
new QMenu(
this);
641 m_fileMenu->addAction(m_openWorkAction);
642 m_fileMenu->addSeparator();
643 m_fileMenu->addAction(m_quitAction);
644 menuBar()->addMenu(m_fileMenu);
647 m_viewMenu =
new QMenu(
this);
648 m_viewMenu->addAction(m_windowFullscreenAction);
649 m_viewMenu->addAction(m_showBookshelfAction);
650 m_viewMenu->addAction(m_showBookmarksAction);
651 m_viewMenu->addAction(m_showMagAction);
652 m_viewMenu->addAction(m_showTextAreaHeadersAction);
653 m_viewMenu->addSeparator();
655 m_toolBarsMenu =
new QMenu(
this);
656 m_toolBarsMenu->addAction( m_showMainWindowToolbarAction);
657 m_toolBarsMenu->addAction(m_showTextWindowNavigationAction);
658 m_toolBarsMenu->addAction(m_showTextWindowModuleChooserAction);
659 m_toolBarsMenu->addAction(m_showTextWindowToolButtonsAction);
660 m_toolBarsMenu->addSeparator();
661 m_toolBarsMenu->addAction(m_toolbarsInEachWindow);
662 m_viewMenu->addMenu(m_toolBarsMenu);
663 m_viewMenu->addSeparator();
665 m_scrollMenu=
new QMenu(
this);
666 m_scrollMenu->addAction(m_autoScrollUpAction);
667 m_scrollMenu->addAction(m_autoScrollDownAction);
668 m_scrollMenu->addAction(m_autoScrollPauseAction);
669 m_viewMenu->addMenu(m_scrollMenu);
671 menuBar()->addMenu(m_viewMenu);
674 m_searchMenu =
new QMenu(
this);
675 m_searchMenu->addAction(m_searchOpenWorksAction);
676 m_searchMenu->addAction(m_searchStandardBibleAction);
677 menuBar()->addMenu(m_searchMenu);
680 m_windowMenu =
new QMenu(
this);
681 m_openWindowsMenu =
new QMenu(
this);
682 BT_CONNECT(m_openWindowsMenu, &QMenu::aboutToShow,
684 m_windowMenu->addMenu(m_openWindowsMenu);
685 m_windowMenu->addAction(m_windowCloseAction);
686 m_windowMenu->addAction(m_windowCloseAllAction);
687 m_windowMenu->addSeparator();
688 m_windowMenu->addAction(m_windowCascadeAction);
689 m_windowMenu->addAction(m_windowTileAction);
690 m_windowMenu->addAction(m_windowTileVerticalAction);
691 m_windowMenu->addAction(m_windowTileHorizontalAction);
692 m_windowArrangementMenu =
new QMenu(
this);
693 m_windowArrangementActionGroup =
new QActionGroup(m_windowArrangementMenu);
694 m_windowArrangementMenu->addAction(m_windowManualModeAction);
695 m_windowArrangementActionGroup->addAction(m_windowManualModeAction);
696 m_windowArrangementMenu->addAction(m_windowAutoTabbedAction);
697 m_windowArrangementActionGroup->addAction(m_windowAutoTabbedAction);
698 m_windowArrangementMenu->addAction(m_windowAutoTileVerticalAction);
699 m_windowArrangementActionGroup->addAction(m_windowAutoTileVerticalAction);
700 m_windowArrangementMenu->addAction(m_windowAutoTileHorizontalAction);
701 m_windowArrangementActionGroup->addAction(m_windowAutoTileHorizontalAction);
702 m_windowArrangementMenu->addAction(m_windowAutoTileAction);
703 m_windowArrangementActionGroup->addAction(m_windowAutoTileAction);
704 m_windowArrangementMenu->addAction(m_windowAutoCascadeAction);
705 m_windowArrangementActionGroup->addAction(m_windowAutoCascadeAction);
706 BT_CONNECT(m_windowArrangementActionGroup, &QActionGroup::triggered,
709 m_windowMenu->addMenu(m_windowArrangementMenu);
710 m_windowMenu->addSeparator();
711 m_windowMenu->addAction(m_windowSaveToNewProfileAction);
712 m_windowLoadProfileMenu =
new QMenu(
this);
713 m_windowLoadProfileActionGroup =
new QActionGroup(m_windowLoadProfileMenu);
714 m_windowMenu->addMenu(m_windowLoadProfileMenu);
715 m_windowDeleteProfileMenu =
new QMenu(
this);
716 m_windowMenu->addMenu(m_windowDeleteProfileMenu);
717 BT_CONNECT(m_windowLoadProfileMenu, &QMenu::triggered,
719 BT_CONNECT(m_windowDeleteProfileMenu, &QMenu::triggered,
721 refreshProfileMenus();
722 menuBar()->addMenu(m_windowMenu);
727 m_settingsMenu =
new QMenu(
this);
728 m_settingsMenu->addAction(m_setPreferencesAction);
729 m_settingsMenu->addSeparator();
730 m_settingsMenu->addAction(m_bookshelfWizardAction);
731 menuBar()->addMenu(m_settingsMenu);
735 m_fileMenu->addAction(m_setPreferencesAction);
736 m_fileMenu->addAction(m_bookshelfWizardAction);
740 m_helpMenu =
new QMenu(
this);
741 m_helpMenu->addAction(m_openHandbookAction);
742 m_helpMenu->addAction(m_bibleStudyHowtoAction);
743 m_helpMenu->addAction(m_tipOfTheDayAction);
744 m_helpMenu->addSeparator();
745 m_helpMenu->addAction(m_aboutBibleTimeAction);
746 if (m_debugWidgetAction) {
747 m_helpMenu->addSeparator();
748 m_helpMenu->addAction(m_debugWidgetAction);
750 menuBar()->addMenu(m_helpMenu);
755 openWorkButton->setDefaultAction(m_openWorkAction);
756 openWorkButton->setPopupMode(QToolButton::InstantPopup);
757 m_mainToolBar->addWidget(openWorkButton);
759 m_mainToolBar->addAction(m_windowFullscreenAction);
760 m_mainToolBar->addAction(
761 &m_actionCollection->action(QStringLiteral(
"showBookshelf")));
762 m_mainToolBar->addAction(
763 &m_actionCollection->action(QStringLiteral(
"showBookmarks")));
764 m_mainToolBar->addAction(
765 &m_actionCollection->action(QStringLiteral(
"showMag")));
766 m_mainToolBar->addAction(m_searchOpenWorksAction);
767 m_mainToolBar->addAction(m_openHandbookAction);
771 m_bookmarksDock->setWindowTitle(tr(
"Bookmarks"));
772 m_magDock->setWindowTitle(tr(
"Mag"));
773 m_mainToolBar->setWindowTitle(tr(
"Main toolbar"));
774 m_navToolBar->setWindowTitle(tr(
"Navigation toolbar"));
775 m_worksToolBar->setWindowTitle(tr(
"Works toolbar"));
776 m_toolsToolBar->setWindowTitle(tr(
"Tools toolbar"));
778 m_fileMenu->setTitle(tr(
"&File"));
779 m_viewMenu->setTitle(tr(
"&View"));
780 m_toolBarsMenu->setTitle(tr(
"Toolbars"));
781 m_scrollMenu->setTitle(tr(
"Scroll"));
783 m_searchMenu->setTitle(tr(
"&Search"));
784 m_windowMenu->setTitle(tr(
"&Window"));
785 m_openWindowsMenu->setTitle(tr(
"O&pen windows"));
786 m_windowArrangementMenu->setTitle(tr(
"&Arrangement mode"));
787 m_windowLoadProfileMenu->setTitle(tr(
"Sw&itch session"));
788 m_windowDeleteProfileMenu->setTitle(tr(
"&Delete session"));
792 m_settingsMenu->setTitle(tr(
"Se&ttings"));
795 m_helpMenu->setTitle(tr(
"&Help"));
797 if (m_debugWidgetAction)
798 m_debugWidgetAction->setText(tr(
"Show \"What's this widget\" dialog"));
800 retranslateUiActions(m_actionCollection);
809 ac->
action(QStringLiteral(
"showToolbarsInTextWindows"))
810 .setText(tr(
"Show toolbars in text windows"));
811 ac->
action(QStringLiteral(
"showToolbar")).setText(tr(
"Show main toolbar"));
812 ac->
action(QStringLiteral(
"showNavigation"))
813 .setText(tr(
"Show navigation bar"));
814 ac->
action(QStringLiteral(
"showWorks")).setText(tr(
"Show works toolbar"));
815 ac->
action(QStringLiteral(
"showTools")).setText(tr(
"Show tools toolbar"));
816 ac->
action(QStringLiteral(
"showFormat"))
817 .setText(tr(
"Show formatting toolbar"));
818 ac->
action(QStringLiteral(
"showBookshelf")).setText(tr(
"Show bookshelf"));
819 ac->
action(QStringLiteral(
"showBookmarks")).setText(tr(
"Show bookmarks"));
820 ac->
action(QStringLiteral(
"showMag")).setText(tr(
"Show mag"));
821 ac->
action(QStringLiteral(
"showParallelTextHeaders"))
822 .setText(tr(
"Show parallel text headers"));
836 { createReadDisplayWindow(module); });
static QToolBar * createToolBar(QWidget *parent, bool visible)
BtConfig & btConfig()
This is a shortchand for BtConfig::getInstance().
void loadProfile(QAction *action)
void slotModuleUnlock(CSwordModuleInfo *module)
void slotBookshelfWizard()
void slotShowDebugWindow(bool)
void moduleAbout(CSwordModuleInfo *module)
CKeyChooser * keyChooser() const
void slotActiveWindowChanged(QMdiSubWindow *window)
static void retranslateUiActions(BtActionCollection *ac)
void deleteProfile(QAction *action)
void slotTileHorizontal()
void slotUpdateWindowArrangementActions(QAction *trigerredAction)
void createCentralWidget()
void slotToggleWorksToolbar()
void slotOpenAboutDialog()
static void insertKeyboardActions(BtActionCollection *const a)
void slotSearchDefaultBible()
void slotSettingsOptions()
void slotToggleMainToolbar()
void slotToggleTextWindowHeader()
void slotOpenWindowsMenuAboutToShow()
void openOnlineHelp_Handbook()
void createMenuAndToolBar()
void slotToggleToolsToolbar()
void slotToggleToolBarsInEachWindow()
void openOnlineHelp_Howto()
void slotWindowMenuAboutToShow()
CDisplayWindow * createReadDisplayWindow(QList< CSwordModuleInfo * > modules, QString const &key)
Creates a new presenter in the MDI area according to the type of the module.
void slotToggleNavigatorToolbar()
void addAction(QString const &name, QAction *const action)
QAction & action(QString const &name) const
BtConfigCore group(Prefix &&prefix) const &
T value(QString const &key, T const &defaultValue=T()) const
Returns the settings value for the given global key.
BtConfigCore session() const
void triggered(CSwordModuleInfo *module)
void createReadDisplayWindow(QList< CSwordModuleInfo * >, QString const &)
Emitted when a module should be opened.
void magInfoProvided(Rendering::InfoType const, QString const &data)
void highlightTextInActiveWindow(const QString &text, bool caseSensitive)
void findNextTextInActiveWindow()
void findPreviousTextInActiveWindow()
void setInfo(const QString &renderedData, const QString &lang=QString())