diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:31 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:31 -0400 |
commit | 294b5ec5834affa57641475946b8d2aeca53c577 (patch) | |
tree | ca25b634d0f24ab5b1fc38eb805e72e0e993e0f1 /src/bibletime.h | |
parent | e8a196082586bb68e0bf254a8f6f4b8f39071f32 (diff) |
Imported Upstream version 2.4
Diffstat (limited to 'src/bibletime.h')
-rw-r--r-- | src/bibletime.h | 61 |
1 files changed, 42 insertions, 19 deletions
diff --git a/src/bibletime.h b/src/bibletime.h index cb3c26d..42cf04f 100644 --- a/src/bibletime.h +++ b/src/bibletime.h @@ -10,29 +10,29 @@ #ifndef BIBLETIME_H #define BIBLETIME_H -#include "frontend/profile/cprofilemgr.h" -#include "frontend/profile/cprofile.h" -#include "frontend/displaywindow/cdisplaywindow.h" - -class CSwordModuleInfo; +#include <QMainWindow> #include <QList> -#include <QMainWindow> +#include "frontend/displaywindow/cdisplaywindow.h" +#include "frontend/profile/cprofile.h" +#include "frontend/profile/cprofilemgr.h" +#include <QSignalMapper> -class BtActionClass; -class CMDIArea; -class CDisplayWindow; -class CBookmarkIndex; -class CBookshelfIndex; -class BtBookshelfDockWidget; namespace InfoDisplay { class CInfoDisplay; } +class BtActionClass; +class BtBookshelfDockWidget; +class CBookmarkIndex; +class CDisplayWindow; +class CMDIArea; +class CSwordModuleInfo; class QAction; class QMenu; class QToolBar; class QSplitter; +class QSignalMapper; /** * @page backend The structure of the backend @@ -73,7 +73,7 @@ class QSplitter; * The main index is implemented in the class CGroupManager, the items of the * main index are implemented in the class CGroupManagerItem. * Each CGroupManagerItem has a type() function which returns the type of - * the object (Module, Bookmark or Group).<BR> + * the object (Module, Bookmark or Group).<br/> * The display windows are all derived from the base class CPresenter. * The display windows which handle Sword modules are all derived from the * CSwordPresenter class. @@ -81,14 +81,14 @@ class QSplitter; * Bibles, CCommentaryPresenter for commentaries and CLexiconPresenter for * lexicon and dictionaries. * CSwordPresenter provides the essential base functions which are - * reimplemented in the derived classes (for example CSwordPresenter::lookup).<BR> + * reimplemented in the derived classes (for example CSwordPresenter::lookup).<br/> * </p><p> * Another important part of the frontend are the keychoosers. * They provide an interface to choose a key of a module. * The interface for different module types is different. * The base class is CKeyChooser which is the factory for the derived classes. * Use the function CKeyChooser::createInstance to get the correct - * keychooser implementation for the desired module.<BR> + * keychooser implementation for the desired module.<br/> * </p> */ @@ -98,10 +98,10 @@ class QSplitter; * BibleTime is devided in two major parts, the backend and the frontend. * The backend is mainly a wrapper around Sword's classes to use Qt functionality * to allow easy access to it's functionality and to have it in a (more or less :) - * object oriented structure.</p><BR> + * object oriented structure.</p><br/> * <p> - * -Introduction to the backend: @ref backend<BR> - * -Introduction to the frontend: @ref frontend.<BR> + * -Introduction to the backend: @ref backend<br/> + * -Introduction to the frontend: @ref frontend.<br/> * The main class of BibleTime is called @ref BibleTime, which is the main window * and initializes all important parts at startup. The text display windows * belong to the @ref frontend. @@ -119,7 +119,7 @@ class QSplitter; * This is the general way of all BibleTime classes. */ class BibleTime : public QMainWindow { - friend class CMDIArea; + friend class CDisplayWindow; friend class BibleTimeDBusAdaptor; Q_OBJECT public: @@ -189,6 +189,14 @@ class BibleTime : public QMainWindow { protected: // Protected methods /** + * Catch QMainWindow events + */ + bool event(QEvent* event); + /** + * Initializes the sword.conf in the $HOME\Sword directory + */ + void initSwordConfigFile(); + /** * Initializes the view of this widget */ void initView(); @@ -238,12 +246,17 @@ class BibleTime : public QMainWindow { void searchInModule(CSwordModuleInfo *module); void moduleUnlock(CSwordModuleInfo *module); void moduleAbout(CSwordModuleInfo *module); + void quit(); /** * Is called when the window menu is about to show ;-) */ void slotWindowMenuAboutToShow(); /** + * Is called when the open windows menu is about to show ;-) + */ + void slotOpenWindowsMenuAboutToShow(); + /** * This slot is connected with the windowAutoTile_action object */ void slotAutoTileVertical(); @@ -272,6 +285,10 @@ class BibleTime : public QMainWindow { */ void slotToggleToolbar(); /** + * Used to set the active menu + */ + void slotSetActiveSubWindow(QWidget* window); + /** * Saves to the profile with the menu id ID */ void saveProfile(QAction* action); @@ -342,6 +359,7 @@ class BibleTime : public QMainWindow { // VIEW menu actions QAction* m_viewToolbar_action; QMenu* m_windowMenu; + QMenu* m_openWindowsMenu; /** WINDOW menu actions */ QAction* m_windowCascade_action; QAction* m_windowTileHorizontal_action; @@ -350,6 +368,7 @@ class BibleTime : public QMainWindow { QAction* m_windowAutoCascade_action; QAction* m_windowAutoTileVertical_action; QAction* m_windowAutoTileHorizontal_action; + QAction* m_windowClose_action; QAction* m_windowCloseAll_action; BtActionCollection* m_actionCollection; @@ -359,6 +378,10 @@ class BibleTime : public QMainWindow { QMenu* m_windowDeleteProfileMenu; QAction* m_windowFullscreen_action; + /** + * Signal mapper to map windows to menu items. + */ + QSignalMapper* m_windowMapper; /// \todo remove? // QList<QAction*> m_windowOpenWindowsList; |