MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Types | Public Member Functions | Protected Member Functions | List of all members
DISPLIB::DraggableFramelessWidget Class Reference

The DraggableFramelessWidget class provides draggable and frameless QWidget. More...

#include <draggableframelesswidget.h>

Public Types

typedef QSharedPointer< DraggableFramelessWidgetSPtr
 
typedef QSharedPointer< const DraggableFramelessWidgetConstSPtr
 

Public Member Functions

 DraggableFramelessWidget (QWidget *parent=0, Qt::WindowFlags flags=Qt::Window, bool bRoundEdges=false, bool bDraggable=true, bool bFrameless=true)
 
 ~DraggableFramelessWidget ()
 
void setDraggable (bool bFlag)
 

Protected Member Functions

void mouseMoveEvent (QMouseEvent *event)
 
void mousePressEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void resizeEvent (QResizeEvent *event)
 
QRegion roundedRect (const QRect &rect, int r)
 

Detailed Description

The DraggableFramelessWidget class provides draggable and frameless QWidget.

DECLARE CLASS DraggableFramelessWidget

Definition at line 75 of file draggableframelesswidget.h.

Inheritance diagram for DISPLIB::DraggableFramelessWidget:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for DraggableFramelessWidget.

Definition at line 81 of file draggableframelesswidget.h.

◆ SPtr

Shared pointer type for DraggableFramelessWidget.

Definition at line 80 of file draggableframelesswidget.h.

Constructor & Destructor Documentation

◆ DraggableFramelessWidget()

DraggableFramelessWidget::DraggableFramelessWidget ( QWidget *  parent = 0,
Qt::WindowFlags  flags = Qt::Window,
bool  bRoundEdges = false,
bool  bDraggable = true,
bool  bFrameless = true 
)

Constructs a DraggableFramelessWidget which is a child of parent.

Parameters
[in]parentThe parent of the widget.
[in]flagsThe window flags.
[in]bRoundEdgesFlag specifying whether to round the edges.
[in]bDraggableFlag specifying whether this widget is draggable.
[in]bFramelessFlag specifying whether this widget is frameless.

Definition at line 62 of file draggableframelesswidget.cpp.

◆ ~DraggableFramelessWidget()

DraggableFramelessWidget::~DraggableFramelessWidget ( )

Destructs a DraggableFramelessWidget

Definition at line 78 of file draggableframelesswidget.cpp.

Member Function Documentation

◆ mouseMoveEvent()

void DraggableFramelessWidget::mouseMoveEvent ( QMouseEvent *  event)
protected

Reimplmented mouseMoveEvent.

Definition at line 106 of file draggableframelesswidget.cpp.

◆ mousePressEvent()

void DraggableFramelessWidget::mousePressEvent ( QMouseEvent *  event)
protected

Reimplmented mouseMoveEvent.

Definition at line 91 of file draggableframelesswidget.cpp.

◆ mouseReleaseEvent()

void DraggableFramelessWidget::mouseReleaseEvent ( QMouseEvent *  event)
protected

Reimplmented mouseReleaseEvent.

Definition at line 120 of file draggableframelesswidget.cpp.

◆ resizeEvent()

void DraggableFramelessWidget::resizeEvent ( QResizeEvent *  event)
protected

Reimplmented mouseMoveEvent.

Definition at line 129 of file draggableframelesswidget.cpp.

◆ roundedRect()

QRegion DraggableFramelessWidget::roundedRect ( const QRect &  rect,
int  r 
)
protected

Calculates a rect with rounded edged.

Parameters
[in]rectthe rect which is supposed to be rounded.
[in]rthe radius of round edges.
Returns
the rounded rect in form of a QRegion.

Definition at line 138 of file draggableframelesswidget.cpp.

◆ setDraggable()

void DraggableFramelessWidget::setDraggable ( bool  bFlag)

Set the draggable flag of this widget.

Parameters
[in]bFlagthe flag to set.

Definition at line 84 of file draggableframelesswidget.cpp.


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