Public Types | Public Slots | Signals | Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
pqViewFrame Class Reference

pqViewFrame is used to represent a frame for any ParaView view shown in the pqMultiViewWidget. More...

#include <pqViewFrame.h>

Inherits QWidget.

Public Types

enum  StandardButton {
  NoButton = 0x0000, SplitHorizontal = 0x0001, SplitVertical = 0x0002, Maximize = 0x0004,
  Restore = 0x0008, Close = 0x0010
}
 

Public Slots

void setBorderVisibility (bool val)
 set whether the border is visible. More...
 
void setTitleBarVisibility (bool val)
 set whether the title-bar is visible. More...
 
void setDecorationsVisibility (bool val)
 
void onViewNameChanged (pqServerManagerModelItem *)
 
bool eventFilter (QObject *, QEvent *) override
 event filter to handle drag/drop events. More...
 

Signals

void buttonPressed (int button)
 fired when a standard button is pressed. More...
 
void actionTriggered (QAction *action)
 fired when one of the custom title-bar actions is triggered. More...
 
void swapPositions (const QString &other)
 Fired to indicate the positions for the two frames need to be swapped. More...
 
void finishDrag (pqViewFrame *source)
 Internal signal, fired to notify the target pqViewFrame instance that the drag operation has completed. More...
 

Public Member Functions

 pqViewFrame (QWidget *parent=nullptr)
 
 ~pqViewFrame () override
 
void setTitle (const QString &text)
 Get/Set the window title. More...
 
QString title () const
 
void setCentralWidget (QWidget *widget, pqView *view=nullptr)
 Get/Set the central widget shown in this frame. More...
 
QWidget * centralWidget () const
 
void setBorderColor (const QColor &clr)
 Get/Set the border BorderColor. More...
 
const QColor & borderColor () const
 
bool isBorderVisible () const
 Get/Set the border visibility. More...
 
bool isTitleBarVisible () const
 Get whether the title-bar is shown. More...
 
 Q_DECLARE_FLAGS (StandardButtons, StandardButton)
 
void setStandardButtons (StandardButtons buttons)
 This holds the collection of standard buttons the frame should show in the title-bar. More...
 
StandardButtons standardButtons () const
 
void addTitleBarAction (QAction *action)
 One can add arbitrary actions to be shown on the title bar. More...
 
QAction * addTitleBarAction (const QString &title)
 
QAction * addTitleBarAction (const QIcon &icon, const QString &title)
 
QAction * addTitleBarSeparator ()
 One can add a separator between actions. More...
 
void removeTitleBarActions ()
 remove all added custom title-bar actions. More...
 
QMenu * contextMenu () const
 Provides access to the context menu. More...
 
QUuid uniqueID () const
 provides access to the unique id assigned to the frame. More...
 

Protected Types

typedef QMap< StandardButton, QPointer< QToolButton > > StandardToolButtonsMap
 

Protected Slots

void buttonClicked ()
 
void contextMenuRequested (const QPoint &)
 

Protected Member Functions

virtual void updateComponentVisibilities ()
 Updates the visibilities for various components of the pqViewFrame based on flags set on the instance. More...
 
void drag ()
 methods to manage drag-drop. More...
 
void dragEnter (QDragEnterEvent *)
 
void drop (QDropEvent *)
 

Protected Attributes

bool DecorationsVisible
 
bool TitleBarVisible
 
bool BorderVisible
 
QColor BorderColor
 
StandardButtons Buttons
 
QPointer< QToolBar > ToolBar
 
QPointer< QWidget > CentralWidget
 
QPointer< QMenu > ContextMenu
 
QUuid UniqueID
 
QPoint DragStartPosition
 
StandardToolButtonsMap StandardToolButtons
 
QPalette PaletteWithBorder
 
QPalette PaletteWithoutBorder
 
QString PlainTitle
 

Detailed Description

pqViewFrame is used to represent a frame for any ParaView view shown in the pqMultiViewWidget.

A frame has title-bar that can be used to show arbitrary buttons, as well as a border that can be used to indicate if the frame is active.

Definition at line 31 of file pqViewFrame.h.

Member Typedef Documentation

◆ StandardToolButtonsMap

typedef QMap<StandardButton, QPointer<QToolButton> > pqViewFrame::StandardToolButtonsMap
protected

Definition at line 202 of file pqViewFrame.h.

Member Enumeration Documentation

◆ StandardButton

Enumerator
NoButton 
SplitHorizontal 
SplitVertical 
Maximize 
Restore 
Close 

Definition at line 73 of file pqViewFrame.h.

Constructor & Destructor Documentation

◆ pqViewFrame()

pqViewFrame::pqViewFrame ( QWidget *  parent = nullptr)

◆ ~pqViewFrame()

pqViewFrame::~pqViewFrame ( )
override

Member Function Documentation

◆ setTitle()

void pqViewFrame::setTitle ( const QString &  text)

Get/Set the window title.

If not empty, the title is shown in the title-bar.

◆ title()

QString pqViewFrame::title ( ) const

◆ setCentralWidget()

void pqViewFrame::setCentralWidget ( QWidget *  widget,
pqView view = nullptr 
)

Get/Set the central widget shown in this frame.

Similar to QLayout::addWidget, this call takes the ownership of the widget and the widget will be deleted with pqViewFrame is deleted or another widget is set using setCentralWidget().

◆ centralWidget()

QWidget* pqViewFrame::centralWidget ( ) const

◆ setBorderColor()

void pqViewFrame::setBorderColor ( const QColor &  clr)

Get/Set the border BorderColor.

The border is only drawn when the borderVisibility is set to true.

◆ borderColor()

const QColor& pqViewFrame::borderColor ( ) const
inline

Definition at line 61 of file pqViewFrame.h.

◆ isBorderVisible()

bool pqViewFrame::isBorderVisible ( ) const
inline

Get/Set the border visibility.

Definition at line 66 of file pqViewFrame.h.

◆ isTitleBarVisible()

bool pqViewFrame::isTitleBarVisible ( ) const
inline

Get whether the title-bar is shown.

Definition at line 71 of file pqViewFrame.h.

◆ Q_DECLARE_FLAGS()

pqViewFrame::Q_DECLARE_FLAGS ( StandardButtons  ,
StandardButton   
)

◆ setStandardButtons()

void pqViewFrame::setStandardButtons ( StandardButtons  buttons)

This holds the collection of standard buttons the frame should show in the title-bar.

◆ standardButtons()

StandardButtons pqViewFrame::standardButtons ( ) const
inline

Definition at line 90 of file pqViewFrame.h.

◆ addTitleBarAction() [1/3]

void pqViewFrame::addTitleBarAction ( QAction *  action)

One can add arbitrary actions to be shown on the title bar.

◆ addTitleBarAction() [2/3]

QAction* pqViewFrame::addTitleBarAction ( const QString &  title)

◆ addTitleBarAction() [3/3]

QAction* pqViewFrame::addTitleBarAction ( const QIcon &  icon,
const QString &  title 
)

◆ addTitleBarSeparator()

QAction* pqViewFrame::addTitleBarSeparator ( )

One can add a separator between actions.

◆ removeTitleBarActions()

void pqViewFrame::removeTitleBarActions ( )

remove all added custom title-bar actions.

◆ contextMenu()

QMenu* pqViewFrame::contextMenu ( ) const

Provides access to the context menu.

◆ uniqueID()

QUuid pqViewFrame::uniqueID ( ) const
inline

provides access to the unique id assigned to the frame.

Definition at line 117 of file pqViewFrame.h.

◆ buttonPressed

void pqViewFrame::buttonPressed ( int  button)
signal

fired when a standard button is pressed.

◆ actionTriggered

void pqViewFrame::actionTriggered ( QAction *  action)
signal

fired when one of the custom title-bar actions is triggered.

◆ swapPositions

void pqViewFrame::swapPositions ( const QString &  other)
signal

Fired to indicate the positions for the two frames need to be swapped.

◆ finishDrag

void pqViewFrame::finishDrag ( pqViewFrame source)
signal

Internal signal, fired to notify the target pqViewFrame instance that the drag operation has completed.

◆ setBorderVisibility

void pqViewFrame::setBorderVisibility ( bool  val)
inlineslot

set whether the border is visible.

Definition at line 145 of file pqViewFrame.h.

◆ setTitleBarVisibility

void pqViewFrame::setTitleBarVisibility ( bool  val)
inlineslot

set whether the title-bar is visible.

Definition at line 154 of file pqViewFrame.h.

◆ setDecorationsVisibility

void pqViewFrame::setDecorationsVisibility ( bool  val)
inlineslot

Definition at line 160 of file pqViewFrame.h.

◆ onViewNameChanged

void pqViewFrame::onViewNameChanged ( pqServerManagerModelItem )
slot

◆ eventFilter

bool pqViewFrame::eventFilter ( QObject *  ,
QEvent *   
)
overrideslot

event filter to handle drag/drop events.

◆ updateComponentVisibilities()

virtual void pqViewFrame::updateComponentVisibilities ( )
protectedvirtual

Updates the visibilities for various components of the pqViewFrame based on flags set on the instance.

◆ drag()

void pqViewFrame::drag ( )
protected

methods to manage drag-drop.

◆ dragEnter()

void pqViewFrame::dragEnter ( QDragEnterEvent *  )
protected

◆ drop()

void pqViewFrame::drop ( QDropEvent *  )
protected

◆ buttonClicked

void pqViewFrame::buttonClicked ( )
protectedslot

◆ contextMenuRequested

void pqViewFrame::contextMenuRequested ( const QPoint &  )
protectedslot

Member Data Documentation

◆ DecorationsVisible

bool pqViewFrame::DecorationsVisible
protected

Definition at line 192 of file pqViewFrame.h.

◆ TitleBarVisible

bool pqViewFrame::TitleBarVisible
protected

Definition at line 193 of file pqViewFrame.h.

◆ BorderVisible

bool pqViewFrame::BorderVisible
protected

Definition at line 194 of file pqViewFrame.h.

◆ BorderColor

QColor pqViewFrame::BorderColor
protected

Definition at line 195 of file pqViewFrame.h.

◆ Buttons

StandardButtons pqViewFrame::Buttons
protected

Definition at line 196 of file pqViewFrame.h.

◆ ToolBar

QPointer<QToolBar> pqViewFrame::ToolBar
protected

Definition at line 197 of file pqViewFrame.h.

◆ CentralWidget

QPointer<QWidget> pqViewFrame::CentralWidget
protected

Definition at line 198 of file pqViewFrame.h.

◆ ContextMenu

QPointer<QMenu> pqViewFrame::ContextMenu
protected

Definition at line 199 of file pqViewFrame.h.

◆ UniqueID

QUuid pqViewFrame::UniqueID
protected

Definition at line 200 of file pqViewFrame.h.

◆ DragStartPosition

QPoint pqViewFrame::DragStartPosition
protected

Definition at line 201 of file pqViewFrame.h.

◆ StandardToolButtons

StandardToolButtonsMap pqViewFrame::StandardToolButtons
protected

Definition at line 203 of file pqViewFrame.h.

◆ PaletteWithBorder

QPalette pqViewFrame::PaletteWithBorder
protected

Definition at line 204 of file pqViewFrame.h.

◆ PaletteWithoutBorder

QPalette pqViewFrame::PaletteWithoutBorder
protected

Definition at line 205 of file pqViewFrame.h.

◆ PlainTitle

QString pqViewFrame::PlainTitle
protected

Definition at line 206 of file pqViewFrame.h.


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