2016-02-03 15:01:26 +08:00
|
|
|
#ifndef ADS_API_H
|
|
|
|
#define ADS_API_H
|
2015-12-09 19:21:38 +08:00
|
|
|
|
2016-02-26 19:43:14 +08:00
|
|
|
#include <QFlags>
|
|
|
|
class QWidget;
|
2015-12-09 19:21:38 +08:00
|
|
|
class QSplitter;
|
|
|
|
|
2016-02-24 04:31:09 +08:00
|
|
|
// DLL Export API
|
|
|
|
#ifdef _WIN32
|
|
|
|
#ifdef ADS_EXPORT
|
|
|
|
#define ADS_EXPORT_API __declspec(dllexport)
|
|
|
|
#else
|
2016-02-24 22:17:53 +08:00
|
|
|
#define ADS_EXPORT_API __declspec(dllimport)
|
2016-02-24 04:31:09 +08:00
|
|
|
#endif
|
2016-02-25 00:39:35 +08:00
|
|
|
#else
|
|
|
|
#define ADS_EXPORT_API
|
2016-02-24 04:31:09 +08:00
|
|
|
#endif
|
|
|
|
|
2016-02-15 19:27:23 +08:00
|
|
|
// Use namespace
|
|
|
|
// Disabled with Qt4!
|
|
|
|
#ifdef ADS_NAMESPACE_ENABLED
|
2016-02-12 18:07:45 +08:00
|
|
|
#define ADS_NAMESPACE_BEGIN namespace ads {
|
|
|
|
#define ADS_NAMESPACE_END }
|
2016-02-15 20:56:42 +08:00
|
|
|
#define ADS_NS ::ads
|
2016-02-12 18:07:45 +08:00
|
|
|
#else
|
|
|
|
#define ADS_NAMESPACE_BEGIN
|
|
|
|
#define ADS_NAMESPACE_END
|
|
|
|
#define ADS_NS
|
|
|
|
#endif
|
2015-12-09 19:21:38 +08:00
|
|
|
|
|
|
|
// Width of the native window frame border (based on OS).
|
|
|
|
#define ADS_WINDOW_FRAME_BORDER_WIDTH 7
|
|
|
|
|
|
|
|
// Indicates whether ADS should include animations.
|
|
|
|
//#define ADS_ANIMATIONS_ENABLED 1
|
|
|
|
//#define ADS_ANIMATION_DURATION 150
|
|
|
|
|
|
|
|
ADS_NAMESPACE_BEGIN
|
2016-02-26 19:43:14 +08:00
|
|
|
class ContainerWidget;
|
|
|
|
class SectionWidget;
|
2015-12-09 19:21:38 +08:00
|
|
|
|
|
|
|
enum DropArea
|
|
|
|
{
|
2016-02-03 17:50:34 +08:00
|
|
|
InvalidDropArea = 0,
|
|
|
|
TopDropArea = 1,
|
|
|
|
RightDropArea = 2,
|
|
|
|
BottomDropArea = 4,
|
|
|
|
LeftDropArea = 8,
|
|
|
|
CenterDropArea = 16,
|
|
|
|
|
|
|
|
AllAreas = TopDropArea | RightDropArea | BottomDropArea | LeftDropArea | CenterDropArea
|
2015-12-09 19:21:38 +08:00
|
|
|
};
|
2016-02-03 17:50:34 +08:00
|
|
|
Q_DECLARE_FLAGS(DropAreas, DropArea)
|
2015-12-09 19:21:38 +08:00
|
|
|
|
2016-02-26 19:43:14 +08:00
|
|
|
void deleteEmptySplitter(ContainerWidget* container);
|
|
|
|
ContainerWidget* findParentContainerWidget(QWidget* w);
|
|
|
|
SectionWidget* findParentSectionWidget(QWidget* w);
|
|
|
|
QSplitter* findParentSplitter(QWidget* w);
|
|
|
|
QSplitter* findImmediateSplitter(QWidget* w);
|
2015-12-09 19:21:38 +08:00
|
|
|
|
|
|
|
ADS_NAMESPACE_END
|
2016-02-03 17:50:34 +08:00
|
|
|
#endif
|