BibleTime
bibletime_slots.cpp
Go to the documentation of this file.
1/*********
2*
3* In the name of the Father, and of the Son, and of the Holy Spirit.
4*
5* This file is part of BibleTime's source code, https://bibletime.info/
6*
7* Copyright 1999-2026 by the BibleTime developers.
8* The BibleTime source code is licensed under the GNU General Public License
9* version 2.0.
10*
11**********/
12
13#include "bibletime.h"
14
15#include <QAction>
16#include <QClipboard>
17#include <QCursor>
18#include <QDesktopServices>
19#include <QInputDialog>
20#include <QMdiSubWindow>
21#include <QMenu>
22#include <QMetaObject>
23#include <QProcess>
24#include <QtGlobal>
25#include <QTimerEvent>
26#include <QToolBar>
27#include <QUrl>
28#include "../backend/config/btconfig.h"
29#include "../backend/managers/cswordbackend.h"
30#include "../util/btassert.h"
31#include "../util/btconnect.h"
32#include "../util/directory.h"
33#include "btaboutdialog.h"
34#include "cinfodisplay.h"
35#include "cmdiarea.h"
37#include "debugwindow.h"
42#include "messagedialog.h"
44#include "tips/bttipdialog.h"
45
46
47/** Opens the optionsdialog of BibleTime. */
51 [this]{
53 btConfig().booknameLanguage());
54
55 /** \todo update the bookmarks after Bible bookname language
56 has been changed. */
57 /* for (QTreeWidgetItemIterator it = m_mainIndex; *it; ++it)
58 if (auto * citem = dynamic_cast<CIndexItemBase*>(*it))
59 citem->update(); */
60
62 QStringLiteral("Application shortcuts"));
66
67 #ifdef BUILD_TEXT_TO_SPEECH
68 // reset current text-to-speech instance, will be recreated
69 // based on current config when needed
70 m_textToSpeech.reset();
71 #endif
72 });
73
74 dlg->show();
75}
76
77/** Save the settings, used when no settings have been saved before **/
80
81/** Opens the bookshelf wizard. */
84
85/** Is called just before the window menu is shown. */
88
89 const int numSubWindows = m_mdi->subWindowList().count();
90 m_actions->windows.closeWindow->setEnabled(numSubWindows);
91 m_actions->windows.closeAllWindows->setEnabled(numSubWindows);
92 m_openWindowsMenu->setEnabled(numSubWindows);
93
94 const bool enableManualArrangeActions = numSubWindows > 1;
95 m_actions->windows.tileVertically->setEnabled(enableManualArrangeActions);
96 m_actions->windows.tileHorizontally->setEnabled(enableManualArrangeActions);
97 m_actions->windows.tile->setEnabled(enableManualArrangeActions);
98 m_actions->windows.cascade->setEnabled(enableManualArrangeActions);
99}
100
101/** Is called just before the open windows menu is shown. */
104
105 m_openWindowsMenu->clear();
106 for (auto * const window : m_mdi->usableWindowList()) {
107 QAction *openWindowAction = m_openWindowsMenu->addAction(window->windowTitle());
108 openWindowAction->setCheckable(true);
109 openWindowAction->setChecked(window == m_mdi->activeSubWindow());
110 BT_CONNECT(openWindowAction, &QAction::triggered,
111 [this, window]{ slotSetActiveSubWindow(window); });
112 }
113}
114
115/** This slot is connected with the windowAutoTileAction object */
117 BT_ASSERT(trigerredAction);
118
119 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
120 if (trigerredAction == m_actions->windows.arrangementMode.autoTileVertically) {
122 guiConfig.setValue(QStringLiteral("alignmentMode"), autoTileVertical);
123 }
124 else if (trigerredAction == m_actions->windows.arrangementMode.autoTileHorizontally) {
126 guiConfig.setValue(QStringLiteral("alignmentMode"), autoTileHorizontal);
127 }
128 else if (trigerredAction == m_actions->windows.arrangementMode.autoTile) {
130 guiConfig.setValue(QStringLiteral("alignmentMode"), autoTile);
131 }
132 else if (trigerredAction == m_actions->windows.arrangementMode.tabbed) {
134 guiConfig.setValue(QStringLiteral("alignmentMode"), autoTabbed);
135 }
136 else if (trigerredAction == m_actions->windows.arrangementMode.autoCascade) {
138 guiConfig.setValue(QStringLiteral("alignmentMode"), autoCascade);
139 }
140 else {
142 || trigerredAction == m_actions->windows.tile
143 || trigerredAction == m_actions->windows.cascade
144 || trigerredAction == m_actions->windows.tileVertically
145 || trigerredAction == m_actions->windows.tileHorizontally);
146
147 if (trigerredAction != m_actions->windows.arrangementMode.manual)
148 m_actions->windows.arrangementMode.manual->setChecked(true);
149
152 guiConfig.setValue(QStringLiteral("alignmentMode"), manual);
153
154 if (trigerredAction == m_actions->windows.tile)
155 m_mdi->myTile();
156 else if (trigerredAction == m_actions->windows.cascade)
157 m_mdi->myCascade();
158 else if (trigerredAction == m_actions->windows.tileVertically)
160 else if (trigerredAction == m_actions->windows.tileHorizontally)
162
163 return;
164 }
165
167}
168
171
174
177
180
181/** Shows/hides the toolbar */
184 auto guiConf = btConfig().session().group(QStringLiteral("GUI"));
185 bool const currentState =
186 guiConf.value<bool>(QStringLiteral("showMainToolbar"), true);
187 guiConf.setValue(QStringLiteral("showMainToolbar"), !currentState);
188 if (m_actions->view.toolbars.showMainToolbar->isChecked()) {
189 m_mainToolBar->show();
190 }
191 else {
192 m_mainToolBar->hide();
193 }
194}
195
197 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
198 bool const currentState =
199 guiConfig.value<bool>(QStringLiteral("showTextWindowHeaders"),
200 true);
201 guiConfig.setValue(QStringLiteral("showTextWindowHeaders"), !currentState);
202 Q_EMIT toggledTextWindowHeader(!currentState);
203}
204
206 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
207 bool const currentState =
208 guiConfig.value<bool>(QStringLiteral("showTextWindowNavigator"),
209 true);
210 guiConfig.setValue(QStringLiteral("showTextWindowNavigator"),
211 !currentState);
212 if (guiConfig.value<bool>(QStringLiteral("showToolbarsInEachWindow"), true))
213 {
214 Q_EMIT toggledTextWindowNavigator(!currentState);
215 } else {
216 m_navToolBar->setVisible(
217 guiConfig.value<bool>(
218 QStringLiteral("showTextWindowNavigator"),
219 true));
220 }
221}
222
224 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
225 bool const currentState =
226 guiConfig.value<bool>(QStringLiteral("showTextWindowToolButtons"),
227 true);
228 guiConfig.setValue(QStringLiteral("showTextWindowToolButtons"),
229 !currentState);
230 if (guiConfig.value<bool>(QStringLiteral("showToolbarsInEachWindow"), true))
231 {
232 Q_EMIT toggledTextWindowToolButtons(!currentState);
233 } else {
234 m_toolsToolBar->setVisible(
235 guiConfig.value<bool>(
236 QStringLiteral("showTextWindowToolButtons"),
237 true));
238 }
239}
240
242 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
243 bool const currentState =
244 guiConfig.value<bool>(
245 QStringLiteral("showTextWindowModuleSelectorButtons"),
246 true);
247 guiConfig.setValue(QStringLiteral("showTextWindowModuleSelectorButtons"),
248 !currentState);
249 if (guiConfig.value<bool>(QStringLiteral("showToolbarsInEachWindow"), true))
250 {
251 Q_EMIT toggledTextWindowModuleChooser(!currentState);
252 } else {
253 m_worksToolBar->setVisible(
254 guiConfig.value<bool>(
255 QStringLiteral("showTextWindowModuleSelectorButtons"),
256 true));
257 }
258}
259
261 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
262 bool const currentState =
263 guiConfig.value<bool>(QStringLiteral("showToolbarsInEachWindow"),
264 true);
265 guiConfig.setValue(QStringLiteral("showToolbarsInEachWindow"),
266 !currentState);
268}
269
271 auto const guiConfig = btConfig().session().group(QStringLiteral("GUI"));
272 if (guiConfig.value<bool>(QStringLiteral("showToolbarsInEachWindow"), true))
273 {
274 // set main window widgets invisible
275 m_navToolBar->setVisible(false);
276 m_worksToolBar->setVisible(false);
277 m_toolsToolBar->setVisible(false);
278 // set state of sub window widets
280 guiConfig.value<bool>(
281 QStringLiteral("showTextWindowNavigator"),
282 true));
284 guiConfig.value<bool>(
285 QStringLiteral("showTextWindowModuleSelectorButtons"),
286 true));
288 guiConfig.value<bool>(
289 QStringLiteral("showTextWindowToolButtons"),
290 true));
291 } else {
292 // set state of main window widgets
293 m_navToolBar->setVisible(
294 guiConfig.value<bool>(
295 QStringLiteral("showTextWindowNavigator"),
296 true));
297 m_worksToolBar->setVisible(
298 guiConfig.value<bool>(
299 QStringLiteral("showTextWindowModuleSelectorButtons"),
300 true));
301 m_toolsToolBar->setVisible(
302 guiConfig.value<bool>(
303 QStringLiteral("showTextWindowToolButtons"),
304 true));
305 //set sub window widgets invisible
306 Q_EMIT toggledTextWindowNavigator(false);
307 Q_EMIT toggledTextWindowToolButtons(false);
308 Q_EMIT toggledTextWindowModuleChooser(false);
309 }
310}
311
312/** Sets the active window. */
314 if (!window)
315 return;
316 m_mdi->setActiveSubWindow(dynamic_cast<QMdiSubWindow*>(window));
317}
318
320 if (auto const * const window = m_mdi->activeSubWindow()) {
321 BT_ASSERT(dynamic_cast<CDisplayWindow *>(window->widget()));
322 auto & widget = *static_cast<CDisplayWindow const *>(window->widget());
323 openSearchDialog(widget.constModules());
324 } else {
326 }
327}
328
330 //get the modules of the open windows
331 BtConstModuleList modules;
332
333 for (auto const * const subWindow : m_mdi->subWindowList()) {
334 const CDisplayWindow * const w = dynamic_cast<CDisplayWindow*>(subWindow->widget());
335 if (w != nullptr) {
336 modules << w->constModules();
337 }
338 }
339 openSearchDialog(std::move(modules));
340}
341
342void BibleTime::slotActiveWindowChanged(QMdiSubWindow* window)
343{
344 if (window == nullptr)
345 m_findWidget->setVisible(false);
347}
348
349/* Search default Bible slot
350 * Call CSearchDialog::openDialog with only the default bible module
351 */
353 BtConstModuleList module;
354 if (auto const * const bible =
355 btConfig().getDefaultSwordModuleByType(
356 QStringLiteral("standardBible")))
357 module.append(bible);
358 openSearchDialog(std::move(module));
359}
360
363 if (url.isEmpty()) {
365 this,
366 tr("Error locating handbook!"),
367 tr("A suitable installed handbook could not be found!"));
368 return;
369 }
370 if (!QDesktopServices::openUrl(QUrl::fromLocalFile(url)))
372 this,
373 tr("Error opening handbook!"),
374 tr("The installed handbook could not be opened!"));
375}
376
378 auto url(util::directory::getHowto());
379 if (url.isEmpty()) {
381 this,
382 tr("Error locating howto!"),
383 tr("A suitable installed howto could not be found!"));
384 return;
385 }
386 if (!QDesktopServices::openUrl(QUrl::fromLocalFile(url)))
388 this,
389 tr("Error opening howto!"),
390 tr("The installed howto could not be opened!"));
391}
392
394 BtAboutDialog* dlg = new BtAboutDialog(this);
395 dlg->show();
396}
397
399 BtTipDialog* dlg = new BtTipDialog(this);
400 dlg->show();
401}
402
404 // Save main window settings:
405 auto conf = btConfig().session();
406 conf.setValue(QStringLiteral("MainWindow/geometry"), saveGeometry());
407 conf.setValue(QStringLiteral("MainWindow/state"), saveState());
408 conf.setValue(QStringLiteral("MainWindow/MDIArrangementMode"),
409 static_cast<int>(m_mdi->getMDIArrangementMode()));
410
411 conf.setValue(QStringLiteral("FindIsVisible"),
412 m_findWidget->isVisible());
413
414 QStringList windowsList;
415 for (auto const * const w : m_mdi->subWindowList(QMdiArea::StackingOrder)) {
416 CDisplayWindow * const displayWindow = dynamic_cast<CDisplayWindow*>(w->widget());
417 if (!displayWindow)
418 continue;
419
420 const QString windowKey = QString::number(windowsList.size());
421 windowsList.append(windowKey);
422 auto windowConf = conf.group(QStringLiteral("window/") + windowKey);
423 displayWindow->storeProfileSettings(windowConf);
424 }
425 conf.setValue(QStringLiteral("windowsList"), windowsList);
426}
427
429 BT_ASSERT(action);
430 QVariant keyProperty = action->property("ProfileKey");
431 BT_ASSERT(keyProperty.typeId() == QMetaType::QString);
432 BT_ASSERT(btConfig().sessionNames().contains(keyProperty.toString()));
433 loadProfile(keyProperty.toString());
434}
435
436void BibleTime::loadProfile(const QString & profileKey) {
437 auto & conf = btConfig();
438 BT_ASSERT(conf.sessionNames().contains(profileKey));
439
440 // do nothing if requested session is the current session
441 if (profileKey == conf.currentSessionKey())
442 return;
443
444 // Save old profile:
445 saveProfile();
446
447 // Close all open windows BEFORE switching profile:
448 m_mdi->closeAllSubWindows();
449
450 // Switch profile Activate profile:
451 conf.setCurrentSession(profileKey);
454}
455
458
459 // Disable updates while doing big changes:
460 setUpdatesEnabled(false);
461
462 // Close all open windows:
463 m_mdi->closeAllSubWindows();
464
465 // Reload main window settings:
466 auto const sessionConf = btConfig().session();
467 auto const mwConf = sessionConf.group(QStringLiteral("MainWindow"));
468 restoreGeometry(mwConf.value<QByteArray>(QStringLiteral("geometry")));
469 restoreState(mwConf.value<QByteArray>(QStringLiteral("state")));
470
471 /*
472 * restoreState includes visibility of child widgets, the manually added
473 * qactions (so not including bookmark, bookshelf and mag) are not restored
474 * though, so we restore their state here.
475 */
476 auto const guiConf = sessionConf.group(QStringLiteral("GUI"));
477 setQActionCheckedNoTrigger(m_actions->view.fullscreen, isFullScreen());
478 setQActionCheckedNoTrigger(
480 guiConf.value<bool>(QStringLiteral("showTextWindowHeaders"),
481 true));
482 setQActionCheckedNoTrigger(
484 guiConf.value<bool>(QStringLiteral("showMainToolbar"), true));
485 setQActionCheckedNoTrigger(
487 guiConf.value<bool>(QStringLiteral("showTextWindowNavigator"),
488 true));
489 setQActionCheckedNoTrigger(
491 guiConf.value<bool>(
492 QStringLiteral("showTextWindowModuleSelectorButtons"),
493 true));
494 setQActionCheckedNoTrigger(
496 guiConf.value<bool>(QStringLiteral("showTextWindowToolButtons"),
497 true));
498 setQActionCheckedNoTrigger(
500 guiConf.value<bool>(QStringLiteral("showToolbarsInEachWindow"),
501 true));
502
504 static_cast<CMDIArea::MDIArrangementMode>(
505 mwConf.value<int>(QStringLiteral("MDIArrangementMode"),
507
508 m_findWidget->setVisible(
509 sessionConf.value<bool>(QStringLiteral("FindIsVisible"),
510 false));
511
512 QWidget * focusWindow = nullptr;
513 struct WindowLoadStatus {
514 QStringList failedModules;
515 QList<CSwordModuleInfo *> okModules;
516 };
517 QMap<QString, WindowLoadStatus> failedWindows;
518 for (auto const & w
519 : sessionConf.value<QStringList>(QStringLiteral("windowsList")))
520 {
521 BT_ASSERT(!w.endsWith('/'));
522 auto const windowConf =
523 sessionConf.group(QStringLiteral("window/") + w);
524
525 // Try to determine window modules:
526 WindowLoadStatus wls;
527 for (auto const & moduleName
528 : windowConf.value<QStringList>(QStringLiteral("modules")))
529 {
530 if (auto * const m =
532 {
533 wls.okModules.append(m);
534 } else {
535 wls.failedModules.append(moduleName);
536 }
537 }
538
539 // Check whether the window totally failed (no modules can be loaded):
540 if (wls.okModules.isEmpty()) {
541 failedWindows.insert(w, wls);
542 continue;
543 }
544
545 // Check whether the window partially failed:
546 if (!wls.failedModules.isEmpty())
547 failedWindows.insert(w, wls);
548
549 // Try to respawn the window:
550 auto const key = windowConf.value<QString>(QStringLiteral("key"));
551 if (auto * const window = createReadDisplayWindow(wls.okModules, key)) {
552 window->applyProfileSettings(windowConf);
553 if (windowConf.value<bool>(QStringLiteral("hasFocus"), false))
554 focusWindow = window;
555 } else {
556 failedWindows.insert(w, wls);
557 }
558 }
559
560 /* This call is necessary to restore the visibility of the toolbars in the child
561 * windows, since their state is not saved automatically.
562 */
564
565 // Re-arrange MDI:
567
568 // Activate focused window:
569 if (focusWindow)
570 focusWindow->setFocus();
571
572 // Re-enable updates and repaint:
573 setUpdatesEnabled(true);
574 repaint(); /// \bug The main window (except decors) is all black without this (not even hover over toolbar buttons work)
575 raise(); /// \bug The main window would not refresh at all. A call to this function or adjustSize() seems to fix this
576
577 /// \todo For windows in failedWindows ask whether to keep the settings / close windows etc
578}
579
581 BT_ASSERT(action);
582 QVariant keyProperty = action->property("ProfileKey");
583 BT_ASSERT(keyProperty.typeId() == QMetaType::QString);
584 BT_ASSERT(btConfig().sessionNames().contains(keyProperty.toString()));
585
586 /// \todo Ask for confirmation
587 btConfig().deleteSession(keyProperty.toString());
589}
590
592 setWindowState(windowState() ^ Qt::WindowFullScreen);
594}
595
596template <bool goingUp>
599
600 static constexpr int const intervals[21] = {
601 1, 2, 3, 5, 9, 15, 25, 43, 72, 120, 200,
602 120, 72, 43, 25, 15, 9, 5, 3, 2, 1
603 };
604
605 static constexpr int const nudgeSpeed = goingUp ? 1 : -1;
606 if (m_autoScrollSpeed == 0
607 || ((m_autoScrollSpeed > 0) != goingUp // going in the opposite when
608 && !m_autoScrollTimer.isActive())) // resuming from pause
609 {
610 m_autoScrollSpeed = nudgeSpeed; // start safe at slow speed
611 m_autoScrollTimer.setInterval(intervals[m_autoScrollSpeed + 10]);
612 } else if (m_autoScrollSpeed != nudgeSpeed * 10) { // Stay in [-10, 10]
613 m_autoScrollSpeed += nudgeSpeed;
614 if (m_autoScrollSpeed == 0) {
615 m_autoScrollTimer.stop();
616 m_actions->view.scroll.pauseAutoScroll->setEnabled(false);
617 return;
618 }
619 m_autoScrollTimer.setInterval(intervals[m_autoScrollSpeed + 10]);
620 }
621
622 m_autoScrollTimer.start();
623 m_actions->view.scroll.pauseAutoScroll->setEnabled(true);
624}
625
626template void BibleTime::autoScroll<true>();
627template void BibleTime::autoScroll<false>();
628
631 return;
633 if (m_autoScrollTimer.isActive()) {
634 m_autoScrollTimer.stop();
635 } else {
636 m_autoScrollTimer.start();
637 }
638}
639
642 return false;
644 return true;
645}
646
648 m_autoScrollTimer.stop();
650 m_actions->view.scroll.pauseAutoScroll->setEnabled(false);
651}
652
654 auto * display = getCurrentDisplay();
655 if (display) {
656 display->scroll(m_autoScrollSpeed > 0 ? -1 : 1);
657 display->updateReferenceText();
658 }
659}
660
661/** Saves current settings into a new profile. */
663 BtConfig & conf = btConfig();
664
665 // Get new unique name:
666 QString name;
667 for (;;) {
668 bool ok;
669 name = QInputDialog::getText(
670 this, tr("New Session"),
671 tr("Please enter a name for the new session."),
672 QLineEdit::Normal, name, &ok);
673 if (!ok)
674 return;
675
676 if (!name.isEmpty()) {
677 // Check whether name already exists:
678 if (conf.sessionNames().values().contains(name)) {
679 message::showInformation(this, tr("Session already exists"),
680 tr("Session with the name \"%1\" "
681 "already exists. Please provide a "
682 "different name.").arg(name));
683 } else {
684 break;
685 }
686 }
687 }
688
689 // Also save old profile:
690 saveProfile();
691
692 // Save new profile:
693 conf.setCurrentSession(conf.addSession(name));
694 saveProfile();
695
696 // Refresh profile menus:
698}
699
700/** Slot to refresh the saved profile and load profile menus. */
704
705 BtConfig & conf = btConfig();
706 auto const & sessions = conf.sessionNames();
707
708 const bool enableActions = sessions.size() > 1;
709 m_windowLoadProfileMenu->setEnabled(enableActions);
710 m_windowDeleteProfileMenu->setEnabled(enableActions);
711
712
713 if (enableActions) {
714 for (auto it = sessions.constBegin(); it != sessions.constEnd(); ++it) {
715 QAction * a;
716
717 a = m_windowLoadProfileMenu->addAction(it.value());
718 a->setProperty("ProfileKey", it.key());
719 a->setActionGroup(m_windowLoadProfileActionGroup);
720 a->setCheckable(true);
721 if (it.key() == conf.currentSessionKey())
722 a->setChecked(true);
723
724 a = m_windowDeleteProfileMenu->addAction(it.value());
725 a->setProperty("ProfileKey", it.key());
726 if (it.key() == conf.currentSessionKey())
727 a->setDisabled(true);
728 }
729 }
730}
731
733 if (show) {
736 BT_CONNECT(m_debugWindow, &QObject::destroyed, m_debugWidgetAction,
737 [action=m_debugWidgetAction] { action->setChecked(false); },
738 Qt::DirectConnection);
739 } else {
740 delete m_debugWindow;
741 }
742}
#define BT_ASSERT(...)
Definition btassert.h:17
BtConfig & btConfig()
This is a shortchand for BtConfig::getInstance().
Definition btconfig.h:305
#define BT_CONNECT(...)
Definition btconnect.h:20
@ autoTabbed
Definition btglobal.h:74
@ autoTileHorizontal
Definition btglobal.h:72
@ autoCascade
Definition btglobal.h:75
@ autoTile
Definition btglobal.h:73
@ autoTileVertical
Definition btglobal.h:71
@ manual
Definition btglobal.h:76
QList< CSwordModuleInfo const * > BtConstModuleList
struct BibleTime::ActionCollection::@4 windows
struct BibleTime::ActionCollection::@2 view
struct BibleTime::ActionCollection::@2::@7 scroll
struct BibleTime::ActionCollection::@2::@6 toolbars
struct BibleTime::ActionCollection::@4::@8 arrangementMode
QAction * showToolbarsInTextWindows
Definition bibletime.h:161
void loadProfile(QAction *action)
QPointer< QWidget > m_debugWindow
Definition bibletime.h:499
BtModuleChooserBar * m_worksToolBar
Definition bibletime.h:471
void slotBookshelfWizard()
void slotOpenTipDialog()
void slotSearchModules()
void slotShowDebugWindow(bool)
int m_autoScrollSpeed
Definition bibletime.h:494
QToolBar * m_mainToolBar
Definition bibletime.h:469
QAction * m_debugWidgetAction
Definition bibletime.h:498
void slotActiveWindowChanged(QMdiSubWindow *window)
ActionCollection * m_actions
Definition bibletime.h:489
void slotSearchActiveWindow()
void deleteProfile(QAction *action)
void slotTileHorizontal()
CMDIArea * m_mdi
Definition bibletime.h:491
InfoDisplay::CInfoDisplay * m_infoDisplay
Definition bibletime.h:467
void slotUpdateWindowArrangementActions(QAction *trigerredAction)
void toggledTextWindowToolButtons(bool newState)
void slotToggleWorksToolbar()
void slotOpenAboutDialog()
void toggledTextWindowHeader(bool newState)
void openSearchDialog(BtConstModuleList modules, QString const &searchText={})
void slotSearchDefaultBible()
void slotSettingsOptions()
void slotToggleMainToolbar()
void autoScrollPause()
void slotToggleTextWindowHeader()
void showOrHideToolBars()
void setDisplayFocus()
void slotAutoScroll()
void toggledTextWindowNavigator(bool newState)
void slotOpenWindowsMenuAboutToShow()
void openOnlineHelp_Handbook()
QMenu * m_windowDeleteProfileMenu
Definition bibletime.h:485
void refreshProfileMenus()
void slotToggleToolsToolbar()
QToolBar * m_toolsToolBar
Definition bibletime.h:472
void slotToggleToolBarsInEachWindow()
void toggledTextWindowModuleChooser(bool newState)
QToolBar * m_navToolBar
Definition bibletime.h:470
BtFindWidget * m_findWidget
Definition bibletime.h:492
void saveToNewProfile()
void slotTileVertical()
BtModelViewReadDisplay * getCurrentDisplay()
void openOnlineHelp_Howto()
void slotWindowMenuAboutToShow()
QMenu * m_windowsMenu
Definition bibletime.h:479
void autoScrollStop()
void saveConfigSettings()
QMenu * m_windowLoadProfileMenu
Definition bibletime.h:483
QActionGroup * m_windowLoadProfileActionGroup
Definition bibletime.h:484
CDisplayWindow * createReadDisplayWindow(QList< CSwordModuleInfo * > modules, QString const &key)
Creates a new presenter in the MDI area according to the type of the module.
void refreshDisplayWindows() const
void slotToggleNavigatorToolbar()
QTimer m_autoScrollTimer
Definition bibletime.h:495
QMenu * m_openWindowsMenu
Definition bibletime.h:480
void slotSetActiveSubWindow(QWidget *window)
void toggleFullscreen()
bool autoScrollAnyKey()
void readShortcuts(QString const &group)
Read shortcuts from config.
The Bookshelf Manager wizard.
BtConfigCore group(Prefix &&prefix) const &
T value(QString const &key, T const &defaultValue=T()) const
Returns the settings value for the given global key.
void setValue(QString const &key, T const &value)
Sets a value for a key.
void signalSettingsChanged()
BtConfigCore session() const
Definition btconfig.cpp:212
QString addSession(const QString &name)
Creates a new session with the given name.
Definition btconfig.cpp:176
QString const & currentSessionKey() const
Definition btconfig.h:66
void setCurrentSession(const QString &key)
Notifies the configuration system that the session settings should be read from and saved to the give...
Definition btconfig.cpp:168
QHash< QString, QString > sessionNames() const
Definition btconfig.h:78
void deleteSession(const QString &key)
Deletes the session with the given key.
Definition btconfig.cpp:204
The base class for all display windows of BibleTime.
virtual void storeProfileSettings(BtConfigCore &windowConf) const
Stores the settings of this window to configuration.
BtConstModuleList constModules() const
MDIArrangementMode
Definition cmdiarea.h:41
@ ArrangementModeTileVertical
Definition cmdiarea.h:42
@ ArrangementModeCascade
Definition cmdiarea.h:44
@ ArrangementModeManual
Definition cmdiarea.h:45
@ ArrangementModeTabbed
Definition cmdiarea.h:47
@ ArrangementModeTileHorizontal
Definition cmdiarea.h:43
@ ArrangementModeTile
Definition cmdiarea.h:46
void myCascade()
Definition cmdiarea.cpp:277
void myTileVertical()
Definition cmdiarea.cpp:154
void setMDIArrangementMode(const MDIArrangementMode mode)
Definition cmdiarea.cpp:134
void enableWindowMinMaxFlags(bool enable)
Definition cmdiarea.cpp:438
void triggerWindowUpdate()
Definition cmdiarea.cpp:417
void myTile()
Definition cmdiarea.cpp:222
QList< QMdiSubWindow * > usableWindowList() const
Definition cmdiarea.cpp:332
void myTileHorizontal()
Definition cmdiarea.cpp:188
MDIArrangementMode getMDIArrangementMode() const
Definition cmdiarea.h:75
CSwordModuleInfo * findModuleByName(const QString &name) const
Searches for a module with the given name.
static CSwordBackend & instance() noexcept
void setBooknameLanguage(QString const &langName)
Sets the language for the international booknames of Sword.
void setQActionCheckedNoTrigger(QAction *const action, const bool checked)
QMessageBox::StandardButton showInformation(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)
QMessageBox::StandardButton showCritical(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)
QString getHandbook()
QString getHowto()