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-2025 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 //get the modules of the open windows
321 BtConstModuleList modules;
322
323 for (auto const * const subWindow : m_mdi->subWindowList()) {
324 const CDisplayWindow * const w = dynamic_cast<CDisplayWindow*>(subWindow->widget());
325 if (w != nullptr) {
326 modules << w->constModules();
327 }
328 }
329 openSearchDialog(std::move(modules));
330}
331
332void BibleTime::slotActiveWindowChanged(QMdiSubWindow* window)
333{
334 if (window == nullptr)
335 m_findWidget->setVisible(false);
337}
338
339/* Search default Bible slot
340 * Call CSearchDialog::openDialog with only the default bible module
341 */
343 BtConstModuleList module;
344 if (auto const * const bible =
345 btConfig().getDefaultSwordModuleByType(
346 QStringLiteral("standardBible")))
347 module.append(bible);
348 openSearchDialog(std::move(module));
349}
350
353 if (url.isEmpty()) {
355 this,
356 tr("Error locating handbook!"),
357 tr("A suitable installed handbook could not be found!"));
358 return;
359 }
360 if (!QDesktopServices::openUrl(QUrl::fromLocalFile(url)))
362 this,
363 tr("Error opening handbook!"),
364 tr("The installed handbook could not be opened!"));
365}
366
368 auto url(util::directory::getHowto());
369 if (url.isEmpty()) {
371 this,
372 tr("Error locating howto!"),
373 tr("A suitable installed howto could not be found!"));
374 return;
375 }
376 if (!QDesktopServices::openUrl(QUrl::fromLocalFile(url)))
378 this,
379 tr("Error opening howto!"),
380 tr("The installed howto could not be opened!"));
381}
382
384 BtAboutDialog* dlg = new BtAboutDialog(this);
385 dlg->show();
386}
387
389 BtTipDialog* dlg = new BtTipDialog(this);
390 dlg->show();
391}
392
394 // Save main window settings:
395 auto conf = btConfig().session();
396 conf.setValue(QStringLiteral("MainWindow/geometry"), saveGeometry());
397 conf.setValue(QStringLiteral("MainWindow/state"), saveState());
398 conf.setValue(QStringLiteral("MainWindow/MDIArrangementMode"),
399 static_cast<int>(m_mdi->getMDIArrangementMode()));
400
401 conf.setValue(QStringLiteral("FindIsVisible"),
402 m_findWidget->isVisible());
403
404 QStringList windowsList;
405 for (auto const * const w : m_mdi->subWindowList(QMdiArea::StackingOrder)) {
406 CDisplayWindow * const displayWindow = dynamic_cast<CDisplayWindow*>(w->widget());
407 if (!displayWindow)
408 continue;
409
410 const QString windowKey = QString::number(windowsList.size());
411 windowsList.append(windowKey);
412 auto windowConf = conf.group(QStringLiteral("window/") + windowKey);
413 displayWindow->storeProfileSettings(windowConf);
414 }
415 conf.setValue(QStringLiteral("windowsList"), windowsList);
416}
417
419 BT_ASSERT(action);
420 QVariant keyProperty = action->property("ProfileKey");
421 BT_ASSERT(keyProperty.typeId() == QMetaType::QString);
422 BT_ASSERT(btConfig().sessionNames().contains(keyProperty.toString()));
423 loadProfile(keyProperty.toString());
424}
425
426void BibleTime::loadProfile(const QString & profileKey) {
427 auto & conf = btConfig();
428 BT_ASSERT(conf.sessionNames().contains(profileKey));
429
430 // do nothing if requested session is the current session
431 if (profileKey == conf.currentSessionKey())
432 return;
433
434 // Save old profile:
435 saveProfile();
436
437 // Close all open windows BEFORE switching profile:
438 m_mdi->closeAllSubWindows();
439
440 // Switch profile Activate profile:
441 conf.setCurrentSession(profileKey);
444}
445
448
449 // Disable updates while doing big changes:
450 setUpdatesEnabled(false);
451
452 // Close all open windows:
453 m_mdi->closeAllSubWindows();
454
455 // Reload main window settings:
456 auto const sessionConf = btConfig().session();
457 auto const mwConf = sessionConf.group(QStringLiteral("MainWindow"));
458 restoreGeometry(mwConf.value<QByteArray>(QStringLiteral("geometry")));
459 restoreState(mwConf.value<QByteArray>(QStringLiteral("state")));
460
461 /*
462 * restoreState includes visibility of child widgets, the manually added
463 * qactions (so not including bookmark, bookshelf and mag) are not restored
464 * though, so we restore their state here.
465 */
466 auto const guiConf = sessionConf.group(QStringLiteral("GUI"));
467 setQActionCheckedNoTrigger(m_actions->view.fullscreen, isFullScreen());
468 setQActionCheckedNoTrigger(
470 guiConf.value<bool>(QStringLiteral("showTextWindowHeaders"),
471 true));
472 setQActionCheckedNoTrigger(
474 guiConf.value<bool>(QStringLiteral("showMainToolbar"), true));
475 setQActionCheckedNoTrigger(
477 guiConf.value<bool>(QStringLiteral("showTextWindowNavigator"),
478 true));
479 setQActionCheckedNoTrigger(
481 guiConf.value<bool>(
482 QStringLiteral("showTextWindowModuleSelectorButtons"),
483 true));
484 setQActionCheckedNoTrigger(
486 guiConf.value<bool>(QStringLiteral("showTextWindowToolButtons"),
487 true));
488 setQActionCheckedNoTrigger(
490 guiConf.value<bool>(QStringLiteral("showToolbarsInEachWindow"),
491 true));
492
494 static_cast<CMDIArea::MDIArrangementMode>(
495 mwConf.value<int>(QStringLiteral("MDIArrangementMode"),
497
498 m_findWidget->setVisible(
499 sessionConf.value<bool>(QStringLiteral("FindIsVisible"),
500 false));
501
502 QWidget * focusWindow = nullptr;
503 struct WindowLoadStatus {
504 QStringList failedModules;
505 QList<CSwordModuleInfo *> okModules;
506 };
507 QMap<QString, WindowLoadStatus> failedWindows;
508 for (auto const & w
509 : sessionConf.value<QStringList>(QStringLiteral("windowsList")))
510 {
511 BT_ASSERT(!w.endsWith('/'));
512 auto const windowConf =
513 sessionConf.group(QStringLiteral("window/") + w);
514
515 // Try to determine window modules:
516 WindowLoadStatus wls;
517 for (auto const & moduleName
518 : windowConf.value<QStringList>(QStringLiteral("modules")))
519 {
520 if (auto * const m =
522 {
523 wls.okModules.append(m);
524 } else {
525 wls.failedModules.append(moduleName);
526 }
527 }
528
529 // Check whether the window totally failed (no modules can be loaded):
530 if (wls.okModules.isEmpty()) {
531 failedWindows.insert(w, wls);
532 continue;
533 }
534
535 // Check whether the window partially failed:
536 if (!wls.failedModules.isEmpty())
537 failedWindows.insert(w, wls);
538
539 // Try to respawn the window:
540 auto const key = windowConf.value<QString>(QStringLiteral("key"));
541 if (auto * const window = createReadDisplayWindow(wls.okModules, key)) {
542 window->applyProfileSettings(windowConf);
543 if (windowConf.value<bool>(QStringLiteral("hasFocus"), false))
544 focusWindow = window;
545 } else {
546 failedWindows.insert(w, wls);
547 }
548 }
549
550 /* This call is necessary to restore the visibility of the toolbars in the child
551 * windows, since their state is not saved automatically.
552 */
554
555 // Re-arrange MDI:
557
558 // Activate focused window:
559 if (focusWindow)
560 focusWindow->setFocus();
561
562 // Re-enable updates and repaint:
563 setUpdatesEnabled(true);
564 repaint(); /// \bug The main window (except decors) is all black without this (not even hover over toolbar buttons work)
565 raise(); /// \bug The main window would not refresh at all. A call to this function or adjustSize() seems to fix this
566
567 /// \todo For windows in failedWindows ask whether to keep the settings / close windows etc
568}
569
571 BT_ASSERT(action);
572 QVariant keyProperty = action->property("ProfileKey");
573 BT_ASSERT(keyProperty.typeId() == QMetaType::QString);
574 BT_ASSERT(btConfig().sessionNames().contains(keyProperty.toString()));
575
576 /// \todo Ask for confirmation
577 btConfig().deleteSession(keyProperty.toString());
579}
580
582 setWindowState(windowState() ^ Qt::WindowFullScreen);
584}
585
586template <bool goingUp>
589
590 static constexpr int const intervals[21] = {
591 1, 2, 3, 5, 9, 15, 25, 43, 72, 120, 200,
592 120, 72, 43, 25, 15, 9, 5, 3, 2, 1
593 };
594
595 static constexpr int const nudgeSpeed = goingUp ? 1 : -1;
596 if (m_autoScrollSpeed == 0
597 || ((m_autoScrollSpeed > 0) != goingUp // going in the opposite when
598 && !m_autoScrollTimer.isActive())) // resuming from pause
599 {
600 m_autoScrollSpeed = nudgeSpeed; // start safe at slow speed
601 m_autoScrollTimer.setInterval(intervals[m_autoScrollSpeed + 10]);
602 } else if (m_autoScrollSpeed != nudgeSpeed * 10) { // Stay in [-10, 10]
603 m_autoScrollSpeed += nudgeSpeed;
604 if (m_autoScrollSpeed == 0) {
605 m_autoScrollTimer.stop();
606 m_actions->view.scroll.pauseAutoScroll->setEnabled(false);
607 return;
608 }
609 m_autoScrollTimer.setInterval(intervals[m_autoScrollSpeed + 10]);
610 }
611
612 m_autoScrollTimer.start();
613 m_actions->view.scroll.pauseAutoScroll->setEnabled(true);
614}
615
616template void BibleTime::autoScroll<true>();
617template void BibleTime::autoScroll<false>();
618
621 return;
623 if (m_autoScrollTimer.isActive()) {
624 m_autoScrollTimer.stop();
625 } else {
626 m_autoScrollTimer.start();
627 }
628}
629
632 return false;
634 return true;
635}
636
638 m_autoScrollTimer.stop();
640 m_actions->view.scroll.pauseAutoScroll->setEnabled(false);
641}
642
644 auto * display = getCurrentDisplay();
645 if (display) {
646 display->scroll(m_autoScrollSpeed > 0 ? -1 : 1);
647 display->updateReferenceText();
648 }
649}
650
651/** Saves current settings into a new profile. */
653 BtConfig & conf = btConfig();
654
655 // Get new unique name:
656 QString name;
657 for (;;) {
658 bool ok;
659 name = QInputDialog::getText(
660 this, tr("New Session"),
661 tr("Please enter a name for the new session."),
662 QLineEdit::Normal, name, &ok);
663 if (!ok)
664 return;
665
666 if (!name.isEmpty()) {
667 // Check whether name already exists:
668 if (conf.sessionNames().values().contains(name)) {
669 message::showInformation(this, tr("Session already exists"),
670 tr("Session with the name \"%1\" "
671 "already exists. Please provide a "
672 "different name.").arg(name));
673 } else {
674 break;
675 }
676 }
677 }
678
679 // Also save old profile:
680 saveProfile();
681
682 // Save new profile:
683 conf.setCurrentSession(conf.addSession(name));
684 saveProfile();
685
686 // Refresh profile menus:
688}
689
690/** Slot to refresh the saved profile and load profile menus. */
694
695 BtConfig & conf = btConfig();
696 auto const & sessions = conf.sessionNames();
697
698 const bool enableActions = sessions.size() > 1;
699 m_windowLoadProfileMenu->setEnabled(enableActions);
700 m_windowDeleteProfileMenu->setEnabled(enableActions);
701
702
703 if (enableActions) {
704 for (auto it = sessions.constBegin(); it != sessions.constEnd(); ++it) {
705 QAction * a;
706
707 a = m_windowLoadProfileMenu->addAction(it.value());
708 a->setProperty("ProfileKey", it.key());
709 a->setActionGroup(m_windowLoadProfileActionGroup);
710 a->setCheckable(true);
711 if (it.key() == conf.currentSessionKey())
712 a->setChecked(true);
713
714 a = m_windowDeleteProfileMenu->addAction(it.value());
715 a->setProperty("ProfileKey", it.key());
716 if (it.key() == conf.currentSessionKey())
717 a->setDisabled(true);
718 }
719 }
720}
721
723 if (show) {
726 BT_CONNECT(m_debugWindow, &QObject::destroyed, m_debugWidgetAction,
727 [action=m_debugWidgetAction] { action->setChecked(false); },
728 Qt::DirectConnection);
729 } else {
730 delete m_debugWindow;
731 }
732}
#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:496
BtModuleChooserBar * m_worksToolBar
Definition bibletime.h:468
void slotBookshelfWizard()
void slotOpenTipDialog()
void slotSearchModules()
void slotShowDebugWindow(bool)
int m_autoScrollSpeed
Definition bibletime.h:491
QToolBar * m_mainToolBar
Definition bibletime.h:466
QAction * m_debugWidgetAction
Definition bibletime.h:495
void slotActiveWindowChanged(QMdiSubWindow *window)
ActionCollection * m_actions
Definition bibletime.h:486
void deleteProfile(QAction *action)
void slotTileHorizontal()
CMDIArea * m_mdi
Definition bibletime.h:488
InfoDisplay::CInfoDisplay * m_infoDisplay
Definition bibletime.h:464
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:482
void refreshProfileMenus()
void slotToggleToolsToolbar()
QToolBar * m_toolsToolBar
Definition bibletime.h:469
void slotToggleToolBarsInEachWindow()
void toggledTextWindowModuleChooser(bool newState)
QToolBar * m_navToolBar
Definition bibletime.h:467
BtFindWidget * m_findWidget
Definition bibletime.h:489
void saveToNewProfile()
void slotTileVertical()
BtModelViewReadDisplay * getCurrentDisplay()
void openOnlineHelp_Howto()
void slotWindowMenuAboutToShow()
QMenu * m_windowsMenu
Definition bibletime.h:476
void autoScrollStop()
void saveConfigSettings()
QMenu * m_windowLoadProfileMenu
Definition bibletime.h:480
QActionGroup * m_windowLoadProfileActionGroup
Definition bibletime.h:481
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:492
QMenu * m_openWindowsMenu
Definition bibletime.h:477
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()