Splitter

Detailed Description

Classes

struct  SplitterWidgetSizing
 
struct  SplitterWidget
 
class  Splitter
 

Enumerations

enum  SplitterWidgetSizingStyle { RelativeWidgetSize , WidgetSizeInPoints }
 

Class Documentation

◆ SplitterWidgetSizing

struct SplitterWidgetSizing

Public Member Functions

QVariantMap serialize () const
 

Static Public Member Functions

static SplitterWidgetSizing relativeSize (float relativeSize=1, const QString &group=QString())
 
static SplitterWidgetSizing pointSize (int size)
 
static std::optional< SplitterWidgetSizingdeserialize (const QVariantMap &value)
 

Public Attributes

SplitterWidgetSizingStyle style
 
float referenceSize
 
bool isDefault
 
float requestedSize
 
QString group
 

Member Function Documentation

◆ relativeSize()

static SplitterWidgetSizing SplitterWidgetSizing::relativeSize ( float  relativeSize = 1,
const QString &  group = QString() 
)
static

◆ pointSize()

static SplitterWidgetSizing SplitterWidgetSizing::pointSize ( int  size)
static

◆ serialize()

QVariantMap SplitterWidgetSizing::serialize ( ) const

◆ deserialize()

static std::optional< SplitterWidgetSizing > SplitterWidgetSizing::deserialize ( const QVariantMap &  value)
static

Member Data Documentation

◆ style

SplitterWidgetSizingStyle SplitterWidgetSizing::style

◆ referenceSize

float SplitterWidgetSizing::referenceSize

◆ isDefault

bool SplitterWidgetSizing::isDefault

◆ requestedSize

float SplitterWidgetSizing::requestedSize

◆ group

QString SplitterWidgetSizing::group

◆ SplitterWidget

struct SplitterWidget
Class Members
QString key
QWidget * widget
bool visible
SplitterWidgetSizing sizing
int actualSize
int minimumSize

◆ Splitter

class Splitter

Signals

void splitterMoved ()
 

Public Member Functions

 Splitter (Qt::Orientation orientation)
 
void addWidget (const QString &key, QWidget *widget, const SplitterWidgetSizing &defaultSize)
 
void insertWidget (const QString &key, size_t index, QWidget *widget, const SplitterWidgetSizing &defaultSize)
 
void addRelativeSizeGroup (const QString &group, float relativeSize)
 
QVariantMap saveState ()
 
void saveState (QSettings &settings, const QString &stateName)
 
void restoreState (const QVariantMap &state)
 
void restoreState (const QSettings &settings, const QString &stateName)
 
void resetToDefault ()
 
std::optional< SplitterWidgetSizingsizing (const QString &key) const
 
std::optional< SplitterWidgetSizingsizing (QWidget *widget) const
 
void setSizing (const QString &key, const SplitterWidgetSizing &sizing)
 
void setRequestedSize (const QString &key, float size)
 
void setRequestedSize (QWidget *widget, float size)
 
Qt::Orientation orientation () const
 
void setOrientation (Qt::Orientation orientation)
 
QList< int > sizes () const
 
void setSizes (const QList< int > &sizes)
 

Protected Member Functions

virtual void paintEvent (QPaintEvent *event) override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 
virtual void mouseReleaseEvent (QMouseEvent *event) override
 
virtual void leaveEvent (QEvent *event) override
 
virtual void resizeEvent (QResizeEvent *event) override
 
virtual void childEvent (QChildEvent *event) override
 
virtual bool event (QEvent *event) override
 

Constructor & Destructor Documentation

◆ Splitter()

Splitter::Splitter ( Qt::Orientation  orientation)

Member Function Documentation

◆ addWidget()

void Splitter::addWidget ( const QString &  key,
QWidget *  widget,
const SplitterWidgetSizing defaultSize 
)

◆ insertWidget()

void Splitter::insertWidget ( const QString &  key,
size_t  index,
QWidget *  widget,
const SplitterWidgetSizing defaultSize 
)

◆ addRelativeSizeGroup()

void Splitter::addRelativeSizeGroup ( const QString &  group,
float  relativeSize 
)

◆ saveState() [1/2]

QVariantMap Splitter::saveState ( )

◆ saveState() [2/2]

void Splitter::saveState ( QSettings &  settings,
const QString &  stateName 
)

◆ restoreState() [1/2]

void Splitter::restoreState ( const QVariantMap &  state)

◆ restoreState() [2/2]

void Splitter::restoreState ( const QSettings &  settings,
const QString &  stateName 
)

◆ resetToDefault()

void Splitter::resetToDefault ( )

◆ sizing() [1/2]

std::optional< SplitterWidgetSizing > Splitter::sizing ( const QString &  key) const

◆ sizing() [2/2]

std::optional< SplitterWidgetSizing > Splitter::sizing ( QWidget *  widget) const

◆ setSizing()

void Splitter::setSizing ( const QString &  key,
const SplitterWidgetSizing sizing 
)

◆ setRequestedSize() [1/2]

void Splitter::setRequestedSize ( const QString &  key,
float  size 
)

◆ setRequestedSize() [2/2]

void Splitter::setRequestedSize ( QWidget *  widget,
float  size 
)

◆ orientation()

Qt::Orientation Splitter::orientation ( ) const
inline

◆ setOrientation()

void Splitter::setOrientation ( Qt::Orientation  orientation)

◆ sizes()

QList< int > Splitter::sizes ( ) const

◆ setSizes()

void Splitter::setSizes ( const QList< int > &  sizes)

◆ paintEvent()

virtual void Splitter::paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

◆ mousePressEvent()

virtual void Splitter::mousePressEvent ( QMouseEvent *  event)
overrideprotectedvirtual

◆ mouseMoveEvent()

virtual void Splitter::mouseMoveEvent ( QMouseEvent *  event)
overrideprotectedvirtual

◆ mouseReleaseEvent()

virtual void Splitter::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotectedvirtual

◆ leaveEvent()

virtual void Splitter::leaveEvent ( QEvent *  event)
overrideprotectedvirtual

◆ resizeEvent()

virtual void Splitter::resizeEvent ( QResizeEvent *  event)
overrideprotectedvirtual

◆ childEvent()

virtual void Splitter::childEvent ( QChildEvent *  event)
overrideprotectedvirtual

◆ event()

virtual bool Splitter::event ( QEvent *  event)
overrideprotectedvirtual

◆ splitterMoved

void Splitter::splitterMoved ( )
signal

Enumeration Type Documentation

◆ SplitterWidgetSizingStyle

Enumerator
RelativeWidgetSize 
WidgetSizeInPoints