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
68 dlg->show();
69}
70
71/** Save the settings, used when no settings have been saved before **/
74
75/** Opens the bookshelf wizard. */
78
79/** Is called just before the window menu is shown. */
82
83 const int numSubWindows = m_mdi->subWindowList().count();
84 m_actions->windows.closeWindow->setEnabled(numSubWindows);
85 m_actions->windows.closeAllWindows->setEnabled(numSubWindows);
86 m_openWindowsMenu->setEnabled(numSubWindows);
87
88 const bool enableManualArrangeActions = numSubWindows > 1;
89 m_actions->windows.tileVertically->setEnabled(enableManualArrangeActions);
90 m_actions->windows.tileHorizontally->setEnabled(enableManualArrangeActions);
91 m_actions->windows.tile->setEnabled(enableManualArrangeActions);
92 m_actions->windows.cascade->setEnabled(enableManualArrangeActions);
93}
94
95/** Is called just before the open windows menu is shown. */
98
99 m_openWindowsMenu->clear();
100 for (auto * const window : m_mdi->usableWindowList()) {
101 QAction *openWindowAction = m_openWindowsMenu->addAction(window->windowTitle());
102 openWindowAction->setCheckable(true);
103 openWindowAction->setChecked(window == m_mdi->activeSubWindow());
104 BT_CONNECT(openWindowAction, &QAction::triggered,
105 [this, window]{ slotSetActiveSubWindow(window); });
106 }
107}
108
109/** This slot is connected with the windowAutoTileAction object */
111 BT_ASSERT(trigerredAction);
112
113 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
114 if (trigerredAction == m_actions->windows.arrangementMode.autoTileVertically) {
116 guiConfig.setValue(QStringLiteral("alignmentMode"), autoTileVertical);
117 }
118 else if (trigerredAction == m_actions->windows.arrangementMode.autoTileHorizontally) {
120 guiConfig.setValue(QStringLiteral("alignmentMode"), autoTileHorizontal);
121 }
122 else if (trigerredAction == m_actions->windows.arrangementMode.autoTile) {
124 guiConfig.setValue(QStringLiteral("alignmentMode"), autoTile);
125 }
126 else if (trigerredAction == m_actions->windows.arrangementMode.tabbed) {
128 guiConfig.setValue(QStringLiteral("alignmentMode"), autoTabbed);
129 }
130 else if (trigerredAction == m_actions->windows.arrangementMode.autoCascade) {
132 guiConfig.setValue(QStringLiteral("alignmentMode"), autoCascade);
133 }
134 else {
136 || trigerredAction == m_actions->windows.tile
137 || trigerredAction == m_actions->windows.cascade
138 || trigerredAction == m_actions->windows.tileVertically
139 || trigerredAction == m_actions->windows.tileHorizontally);
140
141 if (trigerredAction != m_actions->windows.arrangementMode.manual)
142 m_actions->windows.arrangementMode.manual->setChecked(true);
143
146 guiConfig.setValue(QStringLiteral("alignmentMode"), manual);
147
148 if (trigerredAction == m_actions->windows.tile)
149 m_mdi->myTile();
150 else if (trigerredAction == m_actions->windows.cascade)
151 m_mdi->myCascade();
152 else if (trigerredAction == m_actions->windows.tileVertically)
154 else if (trigerredAction == m_actions->windows.tileHorizontally)
156
157 return;
158 }
159
161}
162
165
168
171
174
175/** Shows/hides the toolbar */
178 auto guiConf = btConfig().session().group(QStringLiteral("GUI"));
179 bool const currentState =
180 guiConf.value<bool>(QStringLiteral("showMainToolbar"), true);
181 guiConf.setValue(QStringLiteral("showMainToolbar"), !currentState);
182 if (m_actions->view.toolbars.showMainToolbar->isChecked()) {
183 m_mainToolBar->show();
184 }
185 else {
186 m_mainToolBar->hide();
187 }
188}
189
191 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
192 bool const currentState =
193 guiConfig.value<bool>(QStringLiteral("showTextWindowHeaders"),
194 true);
195 guiConfig.setValue(QStringLiteral("showTextWindowHeaders"), !currentState);
196 Q_EMIT toggledTextWindowHeader(!currentState);
197}
198
200 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
201 bool const currentState =
202 guiConfig.value<bool>(QStringLiteral("showTextWindowNavigator"),
203 true);
204 guiConfig.setValue(QStringLiteral("showTextWindowNavigator"),
205 !currentState);
206 if (guiConfig.value<bool>(QStringLiteral("showToolbarsInEachWindow"), true))
207 {
208 Q_EMIT toggledTextWindowNavigator(!currentState);
209 } else {
210 m_navToolBar->setVisible(
211 guiConfig.value<bool>(
212 QStringLiteral("showTextWindowNavigator"),
213 true));
214 }
215}
216
218 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
219 bool const currentState =
220 guiConfig.value<bool>(QStringLiteral("showTextWindowToolButtons"),
221 true);
222 guiConfig.setValue(QStringLiteral("showTextWindowToolButtons"),
223 !currentState);
224 if (guiConfig.value<bool>(QStringLiteral("showToolbarsInEachWindow"), true))
225 {
226 Q_EMIT toggledTextWindowToolButtons(!currentState);
227 } else {
228 m_toolsToolBar->setVisible(
229 guiConfig.value<bool>(
230 QStringLiteral("showTextWindowToolButtons"),
231 true));
232 }
233}
234
236 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
237 bool const currentState =
238 guiConfig.value<bool>(
239 QStringLiteral("showTextWindowModuleSelectorButtons"),
240 true);
241 guiConfig.setValue(QStringLiteral("showTextWindowModuleSelectorButtons"),
242 !currentState);
243 if (guiConfig.value<bool>(QStringLiteral("showToolbarsInEachWindow"), true))
244 {
245 Q_EMIT toggledTextWindowModuleChooser(!currentState);
246 } else {
247 m_worksToolBar->setVisible(
248 guiConfig.value<bool>(
249 QStringLiteral("showTextWindowModuleSelectorButtons"),
250 true));
251 }
252}
253
255 auto guiConfig = btConfig().session().group(QStringLiteral("GUI"));
256 bool const currentState =
257 guiConfig.value<bool>(QStringLiteral("showToolbarsInEachWindow"),
258 true);
259 guiConfig.setValue(QStringLiteral("showToolbarsInEachWindow"),
260 !currentState);
262}
263
265 auto const guiConfig = btConfig().session().group(QStringLiteral("GUI"));
266 if (guiConfig.value<bool>(QStringLiteral("showToolbarsInEachWindow"), true))
267 {
268 // set main window widgets invisible
269 m_navToolBar->setVisible(false);
270 m_worksToolBar->setVisible(false);
271 m_toolsToolBar->setVisible(false);
272 // set state of sub window widets
274 guiConfig.value<bool>(
275 QStringLiteral("showTextWindowNavigator"),
276 true));
278 guiConfig.value<bool>(
279 QStringLiteral("showTextWindowModuleSelectorButtons"),
280 true));
282 guiConfig.value<bool>(
283 QStringLiteral("showTextWindowToolButtons"),
284 true));
285 } else {
286 // set state of main window widgets
287 m_navToolBar->setVisible(
288 guiConfig.value<bool>(
289 QStringLiteral("showTextWindowNavigator"),
290 true));
291 m_worksToolBar->setVisible(
292 guiConfig.value<bool>(
293 QStringLiteral("showTextWindowModuleSelectorButtons"),
294 true));
295 m_toolsToolBar->setVisible(
296 guiConfig.value<bool>(
297 QStringLiteral("showTextWindowToolButtons"),
298 true));
299 //set sub window widgets invisible
300 Q_EMIT toggledTextWindowNavigator(false);
301 Q_EMIT toggledTextWindowToolButtons(false);
302 Q_EMIT toggledTextWindowModuleChooser(false);
303 }
304}
305
306/** Sets the active window. */
308 if (!window)
309 return;
310 m_mdi->setActiveSubWindow(dynamic_cast<QMdiSubWindow*>(window));
311}
312
314 //get the modules of the open windows
315 BtConstModuleList modules;
316
317 for (auto const * const subWindow : m_mdi->subWindowList()) {
318 const CDisplayWindow * const w = dynamic_cast<CDisplayWindow*>(subWindow->widget());
319 if (w != nullptr) {
320 modules << w->constModules();
321 }
322 }
323 openSearchDialog(std::move(modules));
324}
325
326void BibleTime::slotActiveWindowChanged(QMdiSubWindow* window)
327{
328 if (window == nullptr)
329 m_findWidget->setVisible(false);
331}
332
333/* Search default Bible slot
334 * Call CSearchDialog::openDialog with only the default bible module
335 */
337 BtConstModuleList module;
338 if (auto const * const bible =
339 btConfig().getDefaultSwordModuleByType(
340 QStringLiteral("standardBible")))
341 module.append(bible);
342 openSearchDialog(std::move(module));
343}
344
347 if (url.isEmpty()) {
349 this,
350 tr("Error locating handbook!"),
351 tr("A suitable installed handbook could not be found!"));
352 return;
353 }
354 if (!QDesktopServices::openUrl(QUrl::fromLocalFile(url)))
356 this,
357 tr("Error opening handbook!"),
358 tr("The installed handbook could not be opened!"));
359}
360
362 auto url(util::directory::getHowto());
363 if (url.isEmpty()) {
365 this,
366 tr("Error locating howto!"),
367 tr("A suitable installed howto could not be found!"));
368 return;
369 }
370 if (!QDesktopServices::openUrl(QUrl::fromLocalFile(url)))
372 this,
373 tr("Error opening howto!"),
374 tr("The installed howto could not be opened!"));
375}
376
378 BtAboutDialog* dlg = new BtAboutDialog(this);
379 dlg->show();
380}
381
383 BtTipDialog* dlg = new BtTipDialog(this);
384 dlg->show();
385}
386
388 // Save main window settings:
389 auto conf = btConfig().session();
390 conf.setValue(QStringLiteral("MainWindow/geometry"), saveGeometry());
391 conf.setValue(QStringLiteral("MainWindow/state"), saveState());
392 conf.setValue(QStringLiteral("MainWindow/MDIArrangementMode"),
393 static_cast<int>(m_mdi->getMDIArrangementMode()));
394
395 conf.setValue(QStringLiteral("FindIsVisible"),
396 m_findWidget->isVisible());
397
398 QStringList windowsList;
399 for (auto const * const w : m_mdi->subWindowList(QMdiArea::StackingOrder)) {
400 CDisplayWindow * const displayWindow = dynamic_cast<CDisplayWindow*>(w->widget());
401 if (!displayWindow)
402 continue;
403
404 const QString windowKey = QString::number(windowsList.size());
405 windowsList.append(windowKey);
406 auto windowConf = conf.group(QStringLiteral("window/") + windowKey);
407 displayWindow->storeProfileSettings(windowConf);
408 }
409 conf.setValue(QStringLiteral("windowsList"), windowsList);
410}
411
413 BT_ASSERT(action);
414 QVariant keyProperty = action->property("ProfileKey");
415 BT_ASSERT(keyProperty.typeId() == QMetaType::QString);
416 BT_ASSERT(btConfig().sessionNames().contains(keyProperty.toString()));
417 loadProfile(keyProperty.toString());
418}
419
420void BibleTime::loadProfile(const QString & profileKey) {
421 auto & conf = btConfig();
422 BT_ASSERT(conf.sessionNames().contains(profileKey));
423
424 // do nothing if requested session is the current session
425 if (profileKey == conf.currentSessionKey())
426 return;
427
428 // Save old profile:
429 saveProfile();
430
431 // Close all open windows BEFORE switching profile:
432 m_mdi->closeAllSubWindows();
433
434 // Switch profile Activate profile:
435 conf.setCurrentSession(profileKey);
438}
439
442
443 // Disable updates while doing big changes:
444 setUpdatesEnabled(false);
445
446 // Close all open windows:
447 m_mdi->closeAllSubWindows();
448
449 // Reload main window settings:
450 auto const sessionConf = btConfig().session();
451 auto const mwConf = sessionConf.group(QStringLiteral("MainWindow"));
452 restoreGeometry(mwConf.value<QByteArray>(QStringLiteral("geometry")));
453 restoreState(mwConf.value<QByteArray>(QStringLiteral("state")));
454
455 /*
456 * restoreState includes visibility of child widgets, the manually added
457 * qactions (so not including bookmark, bookshelf and mag) are not restored
458 * though, so we restore their state here.
459 */
460 auto const guiConf = sessionConf.group(QStringLiteral("GUI"));
461 setQActionCheckedNoTrigger(m_actions->view.fullscreen, isFullScreen());
462 setQActionCheckedNoTrigger(
464 guiConf.value<bool>(QStringLiteral("showTextWindowHeaders"),
465 true));
466 setQActionCheckedNoTrigger(
468 guiConf.value<bool>(QStringLiteral("showMainToolbar"), true));
469 setQActionCheckedNoTrigger(
471 guiConf.value<bool>(QStringLiteral("showTextWindowNavigator"),
472 true));
473 setQActionCheckedNoTrigger(
475 guiConf.value<bool>(
476 QStringLiteral("showTextWindowModuleSelectorButtons"),
477 true));
478 setQActionCheckedNoTrigger(
480 guiConf.value<bool>(QStringLiteral("showTextWindowToolButtons"),
481 true));
482 setQActionCheckedNoTrigger(
484 guiConf.value<bool>(QStringLiteral("showToolbarsInEachWindow"),
485 true));
486
488 static_cast<CMDIArea::MDIArrangementMode>(
489 mwConf.value<int>(QStringLiteral("MDIArrangementMode"),
491
492 m_findWidget->setVisible(
493 sessionConf.value<bool>(QStringLiteral("FindIsVisible"),
494 false));
495
496 QWidget * focusWindow = nullptr;
497 struct WindowLoadStatus {
498 QStringList failedModules;
499 QList<CSwordModuleInfo *> okModules;
500 };
501 QMap<QString, WindowLoadStatus> failedWindows;
502 for (auto const & w
503 : sessionConf.value<QStringList>(QStringLiteral("windowsList")))
504 {
505 BT_ASSERT(!w.endsWith('/'));
506 auto const windowConf =
507 sessionConf.group(QStringLiteral("window/") + w);
508
509 // Try to determine window modules:
510 WindowLoadStatus wls;
511 for (auto const & moduleName
512 : windowConf.value<QStringList>(QStringLiteral("modules")))
513 {
514 if (auto * const m =
516 {
517 wls.okModules.append(m);
518 } else {
519 wls.failedModules.append(moduleName);
520 }
521 }
522
523 // Check whether the window totally failed (no modules can be loaded):
524 if (wls.okModules.isEmpty()) {
525 failedWindows.insert(w, wls);
526 continue;
527 }
528
529 // Check whether the window partially failed:
530 if (!wls.failedModules.isEmpty())
531 failedWindows.insert(w, wls);
532
533 // Try to respawn the window:
534 auto const key = windowConf.value<QString>(QStringLiteral("key"));
535 if (auto * const window = createReadDisplayWindow(wls.okModules, key)) {
536 window->applyProfileSettings(windowConf);
537 if (windowConf.value<bool>(QStringLiteral("hasFocus"), false))
538 focusWindow = window;
539 } else {
540 failedWindows.insert(w, wls);
541 }
542 }
543
544 /* This call is necessary to restore the visibility of the toolbars in the child
545 * windows, since their state is not saved automatically.
546 */
548
549 // Re-arrange MDI:
551
552 // Activate focused window:
553 if (focusWindow)
554 focusWindow->setFocus();
555
556 // Re-enable updates and repaint:
557 setUpdatesEnabled(true);
558 repaint(); /// \bug The main window (except decors) is all black without this (not even hover over toolbar buttons work)
559 raise(); /// \bug The main window would not refresh at all. A call to this function or adjustSize() seems to fix this
560
561 /// \todo For windows in failedWindows ask whether to keep the settings / close windows etc
562}
563
565 BT_ASSERT(action);
566 QVariant keyProperty = action->property("ProfileKey");
567 BT_ASSERT(keyProperty.typeId() == QMetaType::QString);
568 BT_ASSERT(btConfig().sessionNames().contains(keyProperty.toString()));
569
570 /// \todo Ask for confirmation
571 btConfig().deleteSession(keyProperty.toString());
573}
574
576 setWindowState(windowState() ^ Qt::WindowFullScreen);
578}
579
580template <bool goingUp>
583
584 static constexpr int const intervals[21] = {
585 1, 2, 3, 5, 9, 15, 25, 43, 72, 120, 200,
586 120, 72, 43, 25, 15, 9, 5, 3, 2, 1
587 };
588
589 static constexpr int const nudgeSpeed = goingUp ? 1 : -1;
590 if (m_autoScrollSpeed == 0
591 || ((m_autoScrollSpeed > 0) != goingUp // going in the opposite when
592 && !m_autoScrollTimer.isActive())) // resuming from pause
593 {
594 m_autoScrollSpeed = nudgeSpeed; // start safe at slow speed
595 m_autoScrollTimer.setInterval(intervals[m_autoScrollSpeed + 10]);
596 } else if (m_autoScrollSpeed != nudgeSpeed * 10) { // Stay in [-10, 10]
597 m_autoScrollSpeed += nudgeSpeed;
598 if (m_autoScrollSpeed == 0) {
599 m_autoScrollTimer.stop();
600 m_actions->view.scroll.pauseAutoScroll->setEnabled(false);
601 return;
602 }
603 m_autoScrollTimer.setInterval(intervals[m_autoScrollSpeed + 10]);
604 }
605
606 m_autoScrollTimer.start();
607 m_actions->view.scroll.pauseAutoScroll->setEnabled(true);
608}
609
610template void BibleTime::autoScroll<true>();
611template void BibleTime::autoScroll<false>();
612
615 return;
617 if (m_autoScrollTimer.isActive()) {
618 m_autoScrollTimer.stop();
619 } else {
620 m_autoScrollTimer.start();
621 }
622}
623
626 return false;
628 return true;
629}
630
632 m_autoScrollTimer.stop();
634 m_actions->view.scroll.pauseAutoScroll->setEnabled(false);
635}
636
638 auto * display = getCurrentDisplay();
639 if (display) {
640 display->scroll(m_autoScrollSpeed > 0 ? -1 : 1);
641 display->updateReferenceText();
642 }
643}
644
645/** Saves current settings into a new profile. */
647 BtConfig & conf = btConfig();
648
649 // Get new unique name:
650 QString name;
651 for (;;) {
652 bool ok;
653 name = QInputDialog::getText(
654 this, tr("New Session"),
655 tr("Please enter a name for the new session."),
656 QLineEdit::Normal, name, &ok);
657 if (!ok)
658 return;
659
660 if (!name.isEmpty()) {
661 // Check whether name already exists:
662 if (conf.sessionNames().values().contains(name)) {
663 message::showInformation(this, tr("Session already exists"),
664 tr("Session with the name \"%1\" "
665 "already exists. Please provide a "
666 "different name.").arg(name));
667 } else {
668 break;
669 }
670 }
671 }
672
673 // Also save old profile:
674 saveProfile();
675
676 // Save new profile:
677 conf.setCurrentSession(conf.addSession(name));
678 saveProfile();
679
680 // Refresh profile menus:
682}
683
684/** Slot to refresh the saved profile and load profile menus. */
688
689 BtConfig & conf = btConfig();
690 auto const & sessions = conf.sessionNames();
691
692 const bool enableActions = sessions.size() > 1;
693 m_windowLoadProfileMenu->setEnabled(enableActions);
694 m_windowDeleteProfileMenu->setEnabled(enableActions);
695
696
697 if (enableActions) {
698 for (auto it = sessions.constBegin(); it != sessions.constEnd(); ++it) {
699 QAction * a;
700
701 a = m_windowLoadProfileMenu->addAction(it.value());
702 a->setProperty("ProfileKey", it.key());
703 a->setActionGroup(m_windowLoadProfileActionGroup);
704 a->setCheckable(true);
705 if (it.key() == conf.currentSessionKey())
706 a->setChecked(true);
707
708 a = m_windowDeleteProfileMenu->addAction(it.value());
709 a->setProperty("ProfileKey", it.key());
710 if (it.key() == conf.currentSessionKey())
711 a->setDisabled(true);
712 }
713 }
714}
715
717 if (show) {
720 BT_CONNECT(m_debugWindow, &QObject::destroyed, m_debugWidgetAction,
721 [action=m_debugWidgetAction] { action->setChecked(false); },
722 Qt::DirectConnection);
723 } else {
724 delete m_debugWindow;
725 }
726}
#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:158
void loadProfile(QAction *action)
QPointer< QWidget > m_debugWindow
Definition bibletime.h:478
BtModuleChooserBar * m_worksToolBar
Definition bibletime.h:450
void slotBookshelfWizard()
void slotOpenTipDialog()
void slotSearchModules()
void slotShowDebugWindow(bool)
int m_autoScrollSpeed
Definition bibletime.h:473
QToolBar * m_mainToolBar
Definition bibletime.h:448
QAction * m_debugWidgetAction
Definition bibletime.h:477
void slotActiveWindowChanged(QMdiSubWindow *window)
ActionCollection * m_actions
Definition bibletime.h:468
void deleteProfile(QAction *action)
void slotTileHorizontal()
CMDIArea * m_mdi
Definition bibletime.h:470
InfoDisplay::CInfoDisplay * m_infoDisplay
Definition bibletime.h:446
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:464
void refreshProfileMenus()
void slotToggleToolsToolbar()
QToolBar * m_toolsToolBar
Definition bibletime.h:451
void slotToggleToolBarsInEachWindow()
void toggledTextWindowModuleChooser(bool newState)
QToolBar * m_navToolBar
Definition bibletime.h:449
BtFindWidget * m_findWidget
Definition bibletime.h:471
void saveToNewProfile()
void slotTileVertical()
BtModelViewReadDisplay * getCurrentDisplay()
void openOnlineHelp_Howto()
void slotWindowMenuAboutToShow()
QMenu * m_windowsMenu
Definition bibletime.h:458
void autoScrollStop()
void saveConfigSettings()
QMenu * m_windowLoadProfileMenu
Definition bibletime.h:462
QActionGroup * m_windowLoadProfileActionGroup
Definition bibletime.h:463
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:474
QMenu * m_openWindowsMenu
Definition bibletime.h:459
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:213
QString addSession(const QString &name)
Creates a new session with the given name.
Definition btconfig.cpp:177
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:169
QHash< QString, QString > sessionNames() const
Definition btconfig.h:78
void deleteSession(const QString &key)
Deletes the session with the given key.
Definition btconfig.cpp:205
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()