mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 23:51:33 +08:00
2513ab1f2b
* Q_PROPERTY MEMBER wasn't available, use READ and WRITE instead * Disables namespace with qt4 * Updates default stylesheet to work with qt4 (no namespaces) Unifies include/forward-declaration style in header files. README status updates
53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
#ifndef SECTION_TITLE_WIDGET_H
|
|
#define SECTION_TITLE_WIDGET_H
|
|
|
|
#include <QFrame>
|
|
#include <QPoint>
|
|
|
|
#include "ads/API.h"
|
|
#include "ads/SectionContent.h"
|
|
|
|
ADS_NAMESPACE_BEGIN
|
|
class ContainerWidget;
|
|
class SectionWidget;
|
|
class FloatingWidget;
|
|
|
|
class SectionTitleWidget : public QFrame
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(bool activeTab READ isActiveTab WRITE setActiveTab NOTIFY activeTabChanged)
|
|
|
|
friend class ContainerWidget;
|
|
friend class SectionWidget;
|
|
|
|
SectionContent::RefPtr _content;
|
|
|
|
// Drag & Drop (Floating)
|
|
QPointer<FloatingWidget> _fw;
|
|
QPoint _dragStartPos;
|
|
|
|
// Drag & Drop (Title/Tabs)
|
|
bool _tabMoving;
|
|
|
|
// Property values
|
|
bool _activeTab;
|
|
|
|
public:
|
|
SectionTitleWidget(SectionContent::RefPtr content, QWidget* parent);
|
|
|
|
bool isActiveTab() const;
|
|
void setActiveTab(bool active);
|
|
|
|
protected:
|
|
virtual void mousePressEvent(QMouseEvent* ev);
|
|
virtual void mouseReleaseEvent(QMouseEvent* ev);
|
|
virtual void mouseMoveEvent(QMouseEvent* ev);
|
|
|
|
signals:
|
|
void activeTabChanged();
|
|
void clicked();
|
|
};
|
|
|
|
ADS_NAMESPACE_END
|
|
#endif
|