BibleTime
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Properties | Private Attributes | List of all members
CMDIArea Class Reference

#include <cmdiarea.h>

Inheritance diagram for CMDIArea:

Public Types

enum  MDIArrangementMode {
  ArrangementModeTileVertical = 1 , ArrangementModeTileHorizontal = 2 , ArrangementModeCascade = 3 , ArrangementModeManual = 4 ,
  ArrangementModeTile = 5 , ArrangementModeTabbed = 6
}
 

Public Slots

void findNextTextInActiveWindow ()
 
void findPreviousTextInActiveWindow ()
 
void highlightTextInActiveWindow (const QString &text, bool caseSensitive)
 
void myCascade ()
 
void myTile ()
 
void myTileHorizontal ()
 
void myTileVertical ()
 

Signals

void sigSetToplevelCaption (const QString &)
 

Public Member Functions

QMdiSubWindow * addSubWindow (QWidget *widget, Qt::WindowFlags windowFlags=Qt::WindowFlags())
 
BibleTimebibleTimeWindow ()
 
 CMDIArea (BibleTime *parent)
 
void enableWindowMinMaxFlags (bool enable)
 
MDIArrangementMode getMDIArrangementMode () const
 
void setMDIArrangementMode (const MDIArrangementMode mode)
 
void triggerWindowUpdate ()
 
QList< QMdiSubWindow * > usableWindowList () const
 

Protected Slots

void closeTab (int i)
 

Protected Member Functions

void emitWindowCaptionChanged ()
 
bool eventFilter (QObject *o, QEvent *e) override
 
void findTextInActiveWindow (bool const backward)
 
void fixSystemMenu (QMdiSubWindow *subWindow)
 
void resizeEvent (QResizeEvent *e) override
 

Properties

MDIArrangementMode m_mdiArrangementMode
 

Private Attributes

CDisplayWindowm_activeWindow
 
BibleTimem_bibleTime
 

Detailed Description

A custom MDI area widget.

Definition at line 31 of file cmdiarea.h.

Member Enumeration Documentation

◆ MDIArrangementMode

Possible MDI subwindow arrangement modes.

Enumerator
ArrangementModeTileVertical 
ArrangementModeTileHorizontal 
ArrangementModeCascade 
ArrangementModeManual 
ArrangementModeTile 
ArrangementModeTabbed 

Definition at line 41 of file cmdiarea.h.

Constructor & Destructor Documentation

◆ CMDIArea()

CMDIArea::CMDIArea ( BibleTime parent)

Member Function Documentation

◆ addSubWindow()

QMdiSubWindow * CMDIArea::addSubWindow ( QWidget widget,
Qt::WindowFlags  windowFlags = Qt::WindowFlags() 
)

Reimplementation of QMdiArea::addSubWindow().

Definition at line 96 of file cmdiarea.cpp.

References ArrangementModeManual, enableWindowMinMaxFlags(), fixSystemMenu(), m_mdiArrangementMode, and triggerWindowUpdate().

Referenced by BibleTime::createReadDisplayWindow().

◆ bibleTimeWindow()

BibleTime* CMDIArea::bibleTimeWindow ( )
inline

Returns the BibleTime main window

Definition at line 66 of file cmdiarea.h.

References m_bibleTime.

◆ closeTab

void CMDIArea::closeTab ( int  i)
protectedslot

Called whan a tabbed subwindow is closed from the tab

Definition at line 155 of file cmdiarea.cpp.

◆ emitWindowCaptionChanged()

void CMDIArea::emitWindowCaptionChanged ( )
protected

Definition at line 332 of file cmdiarea.cpp.

References sigSetToplevelCaption().

Referenced by myCascade(), myTile(), myTileHorizontal(), and myTileVertical().

◆ enableWindowMinMaxFlags()

void CMDIArea::enableWindowMinMaxFlags ( bool  enable)

Show or hide the sub-window min/max buttons.

Definition at line 448 of file cmdiarea.cpp.

Referenced by addSubWindow(), and BibleTime::slotUpdateWindowArrangementActions().

◆ eventFilter()

bool CMDIArea::eventFilter ( QObject o,
QEvent *  e 
)
overrideprotected

Reimplementation of QObject::eventFilter() used to handle some MDI subwindow events.

Definition at line 380 of file cmdiarea.cpp.

References sigSetToplevelCaption(), and triggerWindowUpdate().

◆ findNextTextInActiveWindow

void CMDIArea::findNextTextInActiveWindow ( )
slot

Definition at line 351 of file cmdiarea.cpp.

References findTextInActiveWindow().

Referenced by BibleTime::createCentralWidget().

◆ findPreviousTextInActiveWindow

void CMDIArea::findPreviousTextInActiveWindow ( )
slot

Definition at line 353 of file cmdiarea.cpp.

References findTextInActiveWindow().

Referenced by BibleTime::createCentralWidget().

◆ findTextInActiveWindow()

void CMDIArea::findTextInActiveWindow ( bool const  backward)
protected

◆ fixSystemMenu()

void CMDIArea::fixSystemMenu ( QMdiSubWindow *  subWindow)
protected

Definition at line 85 of file cmdiarea.cpp.

Referenced by addSubWindow().

◆ getMDIArrangementMode()

MDIArrangementMode CMDIArea::getMDIArrangementMode ( ) const
inline

Returns the current MDI arrangement mode.

Definition at line 79 of file cmdiarea.h.

References m_mdiArrangementMode.

Referenced by BibleTime::saveProfile().

◆ highlightTextInActiveWindow

void CMDIArea::highlightTextInActiveWindow ( const QString &  text,
bool  caseSensitive 
)
slot

◆ myCascade

void CMDIArea::myCascade ( )
slot

Our own cascade version which, if only one subwindow is left, shows it maximized.

Note
This not set an automatic arrangement mode, it just arranges the subwindows once. However, this method is also used when arranging the subwindows into a cascade automatically.

Definition at line 286 of file cmdiarea.cpp.

References emitWindowCaptionChanged(), and usableWindowList().

Referenced by BibleTime::slotUpdateWindowArrangementActions(), and triggerWindowUpdate().

◆ myTile

void CMDIArea::myTile ( )
slot

Our own auto tile version which, if only one subwindow is left, shows it

Note
This not set an automatic arrangement mode, it just arranges the subwindows once. However, this method is also used when arranging the subwindows into a tile automatically.

Definition at line 231 of file cmdiarea.cpp.

References emitWindowCaptionChanged(), and usableWindowList().

Referenced by setMDIArrangementMode(), BibleTime::slotUpdateWindowArrangementActions(), and triggerWindowUpdate().

◆ myTileHorizontal

void CMDIArea::myTileHorizontal ( )
slot

Our own horizontal tile version which, if only one subwindow is left, shows it maximized.

Note
This not set an automatic arrangement mode, it just arranges the subwindows once. However, this method is also used when arranging the subwindows into a horizontal tiling automatically.

Definition at line 197 of file cmdiarea.cpp.

References emitWindowCaptionChanged(), and usableWindowList().

Referenced by BibleTime::slotUpdateWindowArrangementActions(), and triggerWindowUpdate().

◆ myTileVertical

void CMDIArea::myTileVertical ( )
slot

Our own vertical tile version which, if only one subwindow is left, shows it maximized.

Note
This not set an automatic arrangement mode, it just arranges the subwindows once. However, this method is also used when arranging the subwindows into a vertical tiling automatically.

Definition at line 163 of file cmdiarea.cpp.

References emitWindowCaptionChanged(), and usableWindowList().

Referenced by BibleTime::processCommandline(), BibleTime::slotUpdateWindowArrangementActions(), and triggerWindowUpdate().

◆ resizeEvent()

void CMDIArea::resizeEvent ( QResizeEvent *  e)
overrideprotected

Reimplementation of QWidget::resizeEvent() to handle our automatic tiling properly.

Definition at line 363 of file cmdiarea.cpp.

References ArrangementModeTabbed, m_mdiArrangementMode, and triggerWindowUpdate().

◆ setMDIArrangementMode()

void CMDIArea::setMDIArrangementMode ( const MDIArrangementMode  mode)

Resets the MDI arrangement mode and arranges the windows.

Parameters
[in]modenew MDI arrangement mode.

Definition at line 135 of file cmdiarea.cpp.

References ArrangementModeManual, ArrangementModeTabbed, ArrangementModeTile, m_mdiArrangementMode, myTile(), and triggerWindowUpdate().

Referenced by BibleTime::reloadProfile(), and BibleTime::slotUpdateWindowArrangementActions().

◆ sigSetToplevelCaption

void CMDIArea::sigSetToplevelCaption ( const QString &  )
signal

Emits a signal to set the caption of the toplevel widget.

Referenced by CMDIArea(), emitWindowCaptionChanged(), and eventFilter().

◆ triggerWindowUpdate()

void CMDIArea::triggerWindowUpdate ( )

◆ usableWindowList()

QList< QMdiSubWindow * > CMDIArea::usableWindowList ( ) const
Returns
a lists of all subwindows which are not minimized or hidden.

Definition at line 341 of file cmdiarea.cpp.

Referenced by myCascade(), myTile(), myTileHorizontal(), myTileVertical(), and BibleTime::slotOpenWindowsMenuAboutToShow().

Member Data Documentation

◆ m_activeWindow

CDisplayWindow* CMDIArea::m_activeWindow
private

Definition at line 180 of file cmdiarea.h.

Referenced by CMDIArea().

◆ m_bibleTime

BibleTime* CMDIArea::m_bibleTime
private

Definition at line 181 of file cmdiarea.h.

Referenced by bibleTimeWindow(), and CMDIArea().

Property Documentation

◆ m_mdiArrangementMode

MDIArrangementMode CMDIArea::m_mdiArrangementMode
readwrite

The documentation for this class was generated from the following files: