diff options
Diffstat (limited to 'src/bibletime.h')
-rw-r--r-- | src/bibletime.h | 98 |
1 files changed, 48 insertions, 50 deletions
diff --git a/src/bibletime.h b/src/bibletime.h index 22faac2..5712515 100644 --- a/src/bibletime.h +++ b/src/bibletime.h @@ -1,8 +1,10 @@ /********* * +* In the name of the Father, and of the Son, and of the Holy Spirit. +* * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ @@ -14,8 +16,7 @@ #include <QList> #include "frontend/displaywindow/cdisplaywindow.h" -#include "frontend/displaywindow/cwritewindow.h" -#include "frontend/profile/cprofilemgr.h" +#include "frontend/displaywindow/cplainwritewindow.h" #include <QSignalMapper> #ifdef BT_DEBUG #include <QMutex> @@ -27,6 +28,7 @@ class CInfoDisplay; } class BtActionClass; class BtBookshelfDockWidget; +class BtFindWidget; class BtOpenWorkAction; class CBookmarkIndex; class CDisplayWindow; @@ -34,7 +36,9 @@ class CMDIArea; class CSwordModuleInfo; class QAction; class QLabel; +class QMdiSubWindow; class QMenu; +class QActionGroup; class QToolBar; class QSplitter; class QSignalMapper; @@ -136,14 +140,6 @@ class BibleTime : public QMainWindow { static inline BibleTime *instance() { return m_instance; } /** - * Apply the settings given by the profile p - */ - void applyProfileSettings( Profile::CProfile* p ); - /** - * Stores the settings of the mainwindow in the profile p - */ - void storeProfileSettings( Profile::CProfile* p ); - /** * Save the configuration dialog settings, don't open dialog */ void saveConfigSettings(); @@ -194,7 +190,17 @@ class BibleTime : public QMainWindow { */ static bool moduleUnlock(CSwordModuleInfo *module, QWidget *parent = 0); - public slots: + /** + Get a pointer to the module associated with the current window + */ + const CSwordModuleInfo* getCurrentModule(); + + /** + Open the BtFindWidget below the mdi area + */ + void openFindWidget(); + +public slots: /** * Opens the optionsdialog of BibleTime. */ @@ -240,6 +246,10 @@ class BibleTime : public QMainWindow { */ void createMenuAndToolBar(); /** + Creates mdi and and BtFindWidget + */ + void createCentralWidget(); + /** * Initializes the sword.conf in the $HOME\Sword directory */ void initSwordConfigFile(); @@ -300,7 +310,7 @@ class BibleTime : public QMainWindow { */ CDisplayWindow* createReadDisplayWindow(QList<CSwordModuleInfo*> modules, const QString& key); CDisplayWindow* createReadDisplayWindow(CSwordModuleInfo* module, const QString& key = QString::null); - CDisplayWindow* createWriteDisplayWindow(CSwordModuleInfo* module, const QString& key, const CWriteWindow::WriteWindowType& type); + CDisplayWindow* createWriteDisplayWindow(CSwordModuleInfo * module, const QString & key, CPlainWriteWindow::WriteWindowType type); CDisplayWindow* moduleEditPlain(CSwordModuleInfo *module); CDisplayWindow* moduleEditHtml(CSwordModuleInfo *module); void searchInModule(CSwordModuleInfo *module); @@ -316,35 +326,13 @@ class BibleTime : public QMainWindow { * Is called when the open windows menu is about to show ;-) */ void slotOpenWindowsMenuAboutToShow(); - /** - * This slot is connected with the windowAutoTileVerticalAction object - */ - void slotAutoTileVertical(); - /** - * This slot is connected with the windowAutoTileHorizontalAction object - */ - void slotAutoTileHorizontal(); - /** - * This slot is connected with the windowAutoTileAction object - */ - void slotAutoTile(); - /** - * This slot is connected with the windowAutoTabbedAction object - */ - void slotAutoTabbed(); - /** - * This slot is connected with the windowAutoCascadeAction object - */ - void slotAutoCascade(); - void slotUpdateWindowArrangementActions( QAction* ); + void slotUpdateWindowArrangementActions(QAction * trigerredAction); void slotCascade(); void slotTile(); void slotTileVertical(); void slotTileHorizontal(); - void slotManualArrangementMode(); - /** * Shows/hides the main toolbar */ @@ -367,13 +355,13 @@ class BibleTime : public QMainWindow { */ void slotSetActiveSubWindow(QWidget* window); /** - * Saves to the profile with the menu id ID - */ - void saveProfile(QAction* action); + * The active window was changed + */ + void slotActiveWindowChanged(QMdiSubWindow* window); /** - * Saves the current settings into the currently activatred profile. + * Saves the current settings into the currently activated profile. */ - void saveProfile(Profile::CProfile* p); + void saveProfile(); /** * Deletes the chosen session from the menu and from disk. */ @@ -381,11 +369,15 @@ class BibleTime : public QMainWindow { /** * Loads the profile with the menu id ID */ - void loadProfile(QAction* action); + void loadProfile(QAction * action); + /** + * Loads the profile with the given key + */ + void loadProfile(const QString & profileKey); /** - * Loads the profile with the menu ID id + * Reloads the current profile */ - void loadProfile(Profile::CProfile* p); + void reloadProfile(); /** * Toggles between normal and fullscreen mode. */ @@ -474,6 +466,7 @@ class BibleTime : public QMainWindow { QAction *m_windowTileVerticalAction; QAction *m_windowManualModeAction; QMenu *m_windowArrangementMenu; + QActionGroup *m_windowArrangementActionGroup; QAction *m_windowAutoCascadeAction; QAction *m_windowAutoTileAction; QAction *m_windowAutoTabbedAction; @@ -481,6 +474,10 @@ class BibleTime : public QMainWindow { QAction *m_windowAutoTileHorizontalAction; QAction *m_windowCloseAction; QAction *m_windowCloseAllAction; + QAction* m_windowSaveToNewProfileAction; + QMenu* m_windowLoadProfileMenu; + QActionGroup* m_windowLoadProfileActionGroup; + QMenu* m_windowDeleteProfileMenu; // Settings menu: QMenu *m_settingsMenu; @@ -496,10 +493,7 @@ class BibleTime : public QMainWindow { BtActionCollection* m_actionCollection; - QMenu* m_windowSaveProfileMenu; - QAction* m_windowSaveToNewProfileAction; - QMenu* m_windowLoadProfileMenu; - QMenu* m_windowDeleteProfileMenu; + QAction* m_windowFullscreenAction; /** @@ -510,8 +504,7 @@ class BibleTime : public QMainWindow { // QList<QAction*> m_windowOpenWindowsList; CMDIArea* m_mdi; - - Profile::CProfileMgr m_profileMgr; + BtFindWidget* m_findWidget; protected: //DBUS interface implementation @@ -532,7 +525,12 @@ class BibleTime : public QMainWindow { void syncAllModulesByType(const CSwordModuleInfo::ModuleType type, const QString& key); private: + /** + * Set the visibility of all tool bars according to the configuration + * taking the toolbarsInEachWindow setting into account. + */ void showOrHideToolBars(); + #ifdef BT_DEBUG void deleteDebugWindow(); private slots: |