blob: c78bfd0b45ff98dc2400a23ce2599b4ccdcd176d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright (C) 2020 Uwe Kindler
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later
#pragma once
#include "ads_globals.h"
#include <QSplitter>
namespace ADS {
struct DockSplitterPrivate;
/**
* Splitter used internally instead of QSplitter with some additional
* fuctionality.
*/
class ADS_EXPORT DockSplitter : public QSplitter
{
Q_OBJECT
private:
DockSplitterPrivate *d;
friend struct DockSplitterPrivate;
public:
DockSplitter(QWidget *parent = nullptr);
DockSplitter(Qt::Orientation orientation, QWidget *parent = nullptr);
/**
* Prints debug info
*/
~DockSplitter() override;
/**
* Returns true, if any of the internal widgets is visible
*/
bool hasVisibleContent() const;
/**
* Returns first widget or nullptr if splitter is empty
*/
QWidget *firstWidget() const;
/**
* Returns last widget of nullptr is splitter is empty
*/
QWidget *lastWidget() const;
/**
* Returns true if the splitter contains central widget of dock manager.
*/
bool isResizingWithContainer() const;
}; // class DockSplitter
} // namespace ADS
|