JKQtExtras
a library of useful Qt widgets and tools
JKQTEVisibleHandleSplitter Class Reference

a QSplitter that has a really visible Splitter handle More...

#include <jkqtevisiblehandlesplitter.h>

Inheritance diagram for JKQTEVisibleHandleSplitter:
Collaboration diagram for JKQTEVisibleHandleSplitter:

Public Slots

void setDecorated (bool enabled)
 switches the decoration of the handle on or off (decoration is a roughed up surface area) More...
 
void setGripWidth (int width)
 sets the width of the handle More...
 
void setHoverEffect (bool enabled)
 switches the hover effect of the handle on or off (hover effect highlights the handle when the mouse hovers over it) More...
 

Public Member Functions

 JKQTEVisibleHandleSplitter (Qt::Orientation orientation, QWidget *parent=nullptr)
 
 JKQTEVisibleHandleSplitter (QWidget *parent=nullptr)
 
bool decorated () const
 indicates whether the decoration of the handle is on or off (decoration is a roughed up surface area) More...
 
int gripWidth () const
 the width of the handle More...
 
bool hoverEffect () const
 indicates whether the hover effect of the handle is on or off (hover effect highlights the handle when the mouse hovers over it) More...
 

Protected Member Functions

QSplitterHandle * createHandle ()
 

Properties

bool decorated
 
int gripWidth
 
bool hoverEffect
 

Detailed Description

a QSplitter that has a really visible Splitter handle

This is a simple replacement for QSplitter, which only adds sime visual tweaks:

  • a better visible handle
  • a highlighting/hover effect
  • a changeable grip width

The splitter looks like this:

Usage is simple:

JKQTEVisibleHandleSplitter* splitV=new JKQTEVisibleHandleSplitter(Qt::Vertical, this);
JKQTEVisibleHandleSplitter* splitH=new JKQTEVisibleHandleSplitter(Qt::Horizontal, this);
QTextEdit* wid;
splitV->addWidget(wid=new QTextEdit);
wid->setPlainText("Move mouse over the splitter in between the widgets.\nThen you can move the splitter and see its highlighting effect.");
splitH->addWidget(new QTextEdit);
splitH->addWidget(new QTextEdit);
splitV->addWidget(splitH);

Constructor & Destructor Documentation

◆ JKQTEVisibleHandleSplitter() [1/2]

JKQTEVisibleHandleSplitter::JKQTEVisibleHandleSplitter ( Qt::Orientation  orientation,
QWidget *  parent = nullptr 
)
explicit

◆ JKQTEVisibleHandleSplitter() [2/2]

JKQTEVisibleHandleSplitter::JKQTEVisibleHandleSplitter ( QWidget *  parent = nullptr)
explicit

Member Function Documentation

◆ createHandle()

QSplitterHandle* JKQTEVisibleHandleSplitter::createHandle ( )
protected

◆ decorated()

bool JKQTEVisibleHandleSplitter::decorated ( ) const

indicates whether the decoration of the handle is on or off (decoration is a roughed up surface area)

◆ gripWidth()

int JKQTEVisibleHandleSplitter::gripWidth ( ) const

the width of the handle

◆ hoverEffect()

bool JKQTEVisibleHandleSplitter::hoverEffect ( ) const

indicates whether the hover effect of the handle is on or off (hover effect highlights the handle when the mouse hovers over it)

◆ setDecorated

void JKQTEVisibleHandleSplitter::setDecorated ( bool  enabled)
slot

switches the decoration of the handle on or off (decoration is a roughed up surface area)

◆ setGripWidth

void JKQTEVisibleHandleSplitter::setGripWidth ( int  width)
slot

sets the width of the handle

◆ setHoverEffect

void JKQTEVisibleHandleSplitter::setHoverEffect ( bool  enabled)
slot

switches the hover effect of the handle on or off (hover effect highlights the handle when the mouse hovers over it)

Property Documentation

◆ decorated

bool JKQTEVisibleHandleSplitter::decorated
readwrite

◆ gripWidth

int JKQTEVisibleHandleSplitter::gripWidth
readwrite

◆ hoverEffect

bool JKQTEVisibleHandleSplitter::hoverEffect
readwrite

The documentation for this class was generated from the following file:
JKQTEVisibleHandleSplitter::JKQTEVisibleHandleSplitter
JKQTEVisibleHandleSplitter(Qt::Orientation orientation, QWidget *parent=nullptr)
JKQTEVisibleHandleSplitter
a QSplitter that has a really visible Splitter handle
Definition: jkqtevisiblehandlesplitter.h:44