example: Show usage of segmented indicators

This commit is contained in:
Sergio Martins
2020-08-23 16:57:48 +01:00
parent 283d814dc6
commit 113e6453ea
4 changed files with 22 additions and 0 deletions

View File

@@ -37,6 +37,8 @@
using namespace KDDockWidgets;
DropIndicatorType DefaultWidgetFactory::s_dropIndicatorType = DropIndicatorType::Classic;
FrameworkWidgetFactory::~FrameworkWidgetFactory()
{
}
@@ -84,6 +86,13 @@ FloatingWindow *DefaultWidgetFactory::createFloatingWindow(Frame *frame, MainWin
DropIndicatorOverlayInterface *DefaultWidgetFactory::createDropIndicatorOverlay(DropArea *dropArea) const
{
switch (s_dropIndicatorType) {
case DropIndicatorType::Classic:
return new ClassicIndicators(dropArea);
case DropIndicatorType::Segmented:
return new SegmentedIndicators(dropArea);
}
return new ClassicIndicators(dropArea);
}