DockHandler

Detailed Description

Classes

struct  DockProperties
 
struct  DockSizePrefs
 
class  DockContextHandler
 
class  DockHandler
 

Class Documentation

◆ DockProperties

struct DockProperties

Public Member Functions

 DockProperties ()
 
 DockProperties (QDockWidget *dw, bool vis, Qt::DockWidgetArea dar, Qt::Orientation dor, bool dvis, bool vs)
 
 DockProperties (const DockProperties &dp)
 
DockPropertiesoperator= (const DockProperties &dp)
 

Public Attributes

QDockWidget * dockWidget
 
bool visibleState
 
Qt::DockWidgetArea defaultArea
 
Qt::Orientation defaultOrientation
 
bool defaultVisibility
 
bool viewSensitive
 
bool neverBeenVisible
 
QSize sizeStash
 
std::function< void()> actionOnShow
 

Constructor & Destructor Documentation

◆ DockProperties() [1/3]

DockProperties::DockProperties ( )
inline

◆ DockProperties() [2/3]

DockProperties::DockProperties ( QDockWidget *  dw,
bool  vis,
Qt::DockWidgetArea  dar,
Qt::Orientation  dor,
bool  dvis,
bool  vs 
)
inline

◆ DockProperties() [3/3]

DockProperties::DockProperties ( const DockProperties dp)
inline

Member Function Documentation

◆ operator=()

DockProperties & DockProperties::operator= ( const DockProperties dp)
inline

Member Data Documentation

◆ dockWidget

QDockWidget* DockProperties::dockWidget

◆ visibleState

bool DockProperties::visibleState

◆ defaultArea

Qt::DockWidgetArea DockProperties::defaultArea

◆ defaultOrientation

Qt::Orientation DockProperties::defaultOrientation

◆ defaultVisibility

bool DockProperties::defaultVisibility

◆ viewSensitive

bool DockProperties::viewSensitive

◆ neverBeenVisible

bool DockProperties::neverBeenVisible

◆ sizeStash

QSize DockProperties::sizeStash

◆ actionOnShow

std::function<void()> DockProperties::actionOnShow

◆ DockSizePrefs

struct DockSizePrefs

Public Member Functions

 DockSizePrefs ()
 

Public Attributes

QList< QDockWidget * > docks
 
QList< int > hDockSizes
 
QList< int > vDockSizes
 
bool nonUniformVisibility = false
 

Constructor & Destructor Documentation

◆ DockSizePrefs()

DockSizePrefs::DockSizePrefs ( )
inline

Member Data Documentation

◆ docks

QList<QDockWidget*> DockSizePrefs::docks

◆ hDockSizes

QList<int> DockSizePrefs::hDockSizes

◆ vDockSizes

QList<int> DockSizePrefs::vDockSizes

◆ nonUniformVisibility

bool DockSizePrefs::nonUniformVisibility = false

◆ DockContextHandler

class DockContextHandler

Public Member Functions

 DockContextHandler (QWidget *widget, const QString &name)
 
virtual ~DockContextHandler ()
 
QString getName () const
 
QWidget * getParentWindow () const
 
virtual void notifyFontChanged ()
 
virtual void notifyOffsetChanged (uint64_t)
 
virtual void notifyThemeChanged ()
 
virtual void notifyViewChanged (ViewFrame *)
 
virtual void notifyViewLocationChanged (View *, const ViewLocation &)
 
virtual void notifyVisibilityChanged (bool)
 
virtual bool shouldBeVisible (ViewFrame *)
 

Protected Attributes

QString m_name
 
UIActionHandler m_actionHandler
 
ContextMenuManagerm_contextMenuManager = nullptr
 
Menum_menu = nullptr
 
QWidget * m_parentWindow
 

Constructor & Destructor Documentation

◆ DockContextHandler()

DockContextHandler::DockContextHandler ( QWidget *  widget,
const QString &  name 
)

◆ ~DockContextHandler()

virtual DockContextHandler::~DockContextHandler ( )
virtual

Member Function Documentation

◆ getName()

QString DockContextHandler::getName ( ) const
inline

◆ getParentWindow()

QWidget * DockContextHandler::getParentWindow ( ) const
inline

◆ notifyFontChanged()

virtual void DockContextHandler::notifyFontChanged ( )
inlinevirtual

◆ notifyOffsetChanged()

virtual void DockContextHandler::notifyOffsetChanged ( uint64_t  )
inlinevirtual

◆ notifyThemeChanged()

virtual void DockContextHandler::notifyThemeChanged ( )
inlinevirtual

◆ notifyViewChanged()

virtual void DockContextHandler::notifyViewChanged ( ViewFrame )
inlinevirtual

◆ notifyViewLocationChanged()

virtual void DockContextHandler::notifyViewLocationChanged ( View ,
const ViewLocation  
)
inlinevirtual

◆ notifyVisibilityChanged()

virtual void DockContextHandler::notifyVisibilityChanged ( bool  )
inlinevirtual

◆ shouldBeVisible()

virtual bool DockContextHandler::shouldBeVisible ( ViewFrame )
inlinevirtual

Member Data Documentation

◆ m_name

QString DockContextHandler::m_name
protected

◆ m_actionHandler

UIActionHandler DockContextHandler::m_actionHandler
protected

◆ m_contextMenuManager

ContextMenuManager* DockContextHandler::m_contextMenuManager = nullptr
protected

◆ m_menu

Menu* DockContextHandler::m_menu = nullptr
protected

◆ m_parentWindow

QWidget* DockContextHandler::m_parentWindow
protected

◆ DockHandler

class DockHandler

Public Slots

void viewChanged (ViewFrame *frame)
 
void visibilityChanged (bool visible)
 
void topLevelChanged (bool topLevel)
 
void removeWidget (QObject *object)
 

Signals

void notifyVisibilityChanged ()
 

Public Member Functions

 DockHandler (QObject *parent, int windowIndex)
 
void close ()
 
void notifyRestoredFromState ()
 
void reset (bool initial=false)
 
void reset (const QString &name)
 
void resizeDocksOnShow (bool resizeDocks)
 
bool addDockWidget (QWidget *widget, Qt::DockWidgetArea area=Qt::BottomDockWidgetArea, Qt::Orientation orientation=Qt::Horizontal, bool defaultVisibility=false)
 
bool addDockWidget (const QString &name, const std::function< QWidget *(const QString &, ViewFrame *, BinaryViewRef)> &createWidget, Qt::DockWidgetArea area=Qt::BottomDockWidgetArea, Qt::Orientation orientation=Qt::Horizontal, bool defaultVisibility=false)
 
void createDynamicWidgets (ViewFrame *frame, BinaryViewRef data, std::map< QString, QPointer< QWidget > > &store, std::vector< QString > filter, bool isExcludeFilter=true)
 
QDockWidget * getDockWidget (const QString &name)
 
ViewFramegetViewFrame ()
 
bool isVisible (const QString &name)
 
void setVisible (const QString &name, bool visible)
 
void saveState (QSettings &settings, const QString &windowStateName)
 
void restoreState (QSettings &settings, const QString &windowStateName)
 
void saveDockSizes (bool nullFrame=false)
 
void restoreDockSizes ()
 
bool shouldResizeDocks ()
 
void updateFonts ()
 
void clearViewLocation (View *view)
 
void updateViewLocation (View *view, const ViewLocation &viewLocation)
 
void updateTheme ()
 
void addActionOnShow (const QString &name, const std::function< void()> &action)
 

Static Public Member Functions

static DockHandlergetActiveDockHandler ()
 

Friends

class DockContextHandler
 

Constructor & Destructor Documentation

◆ DockHandler()

DockHandler::DockHandler ( QObject *  parent,
int  windowIndex 
)
explicit

Member Function Documentation

◆ close()

void DockHandler::close ( )

◆ notifyRestoredFromState()

void DockHandler::notifyRestoredFromState ( )

◆ reset() [1/2]

void DockHandler::reset ( bool  initial = false)

◆ reset() [2/2]

void DockHandler::reset ( const QString &  name)

◆ resizeDocksOnShow()

void DockHandler::resizeDocksOnShow ( bool  resizeDocks)
inline

◆ addDockWidget() [1/2]

bool DockHandler::addDockWidget ( QWidget *  widget,
Qt::DockWidgetArea  area = Qt::BottomDockWidgetArea,
Qt::Orientation  orientation = Qt::Horizontal,
bool  defaultVisibility = false 
)

◆ addDockWidget() [2/2]

bool DockHandler::addDockWidget ( const QString &  name,
const std::function< QWidget *(const QString &, ViewFrame *, BinaryViewRef)> &  createWidget,
Qt::DockWidgetArea  area = Qt::BottomDockWidgetArea,
Qt::Orientation  orientation = Qt::Horizontal,
bool  defaultVisibility = false 
)

◆ createDynamicWidgets()

void DockHandler::createDynamicWidgets ( ViewFrame frame,
BinaryViewRef  data,
std::map< QString, QPointer< QWidget > > &  store,
std::vector< QString >  filter,
bool  isExcludeFilter = true 
)

◆ getDockWidget()

QDockWidget * DockHandler::getDockWidget ( const QString &  name)

◆ getViewFrame()

ViewFrame * DockHandler::getViewFrame ( )
inline

◆ isVisible()

bool DockHandler::isVisible ( const QString &  name)

◆ setVisible()

void DockHandler::setVisible ( const QString &  name,
bool  visible 
)

◆ saveState()

void DockHandler::saveState ( QSettings &  settings,
const QString &  windowStateName 
)

◆ restoreState()

void DockHandler::restoreState ( QSettings &  settings,
const QString &  windowStateName 
)

◆ saveDockSizes()

void DockHandler::saveDockSizes ( bool  nullFrame = false)

◆ restoreDockSizes()

void DockHandler::restoreDockSizes ( )

◆ shouldResizeDocks()

bool DockHandler::shouldResizeDocks ( )

◆ updateFonts()

void DockHandler::updateFonts ( )

◆ clearViewLocation()

void DockHandler::clearViewLocation ( View view)

◆ updateViewLocation()

void DockHandler::updateViewLocation ( View view,
const ViewLocation viewLocation 
)

◆ updateTheme()

void DockHandler::updateTheme ( )

◆ addActionOnShow()

void DockHandler::addActionOnShow ( const QString &  name,
const std::function< void()> &  action 
)

◆ getActiveDockHandler()

static DockHandler * DockHandler::getActiveDockHandler ( )
static

◆ notifyVisibilityChanged

void DockHandler::notifyVisibilityChanged ( )
signal

◆ viewChanged

void DockHandler::viewChanged ( ViewFrame frame)
slot

◆ visibilityChanged

void DockHandler::visibilityChanged ( bool  visible)
slot

◆ topLevelChanged

void DockHandler::topLevelChanged ( bool  topLevel)
slot

◆ removeWidget

void DockHandler::removeWidget ( QObject *  object)
slot

Friends And Related Function Documentation

◆ DockContextHandler

friend class DockContextHandler
friend