#pragma once #include #include #include #include #include "iPlugin_global.h" // DockWidget扩展 class I_PLUGIN_EXPORT ZxDockWidget : public QDockWidget { Q_OBJECT public: ZxDockWidget(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0); ZxDockWidget(QWidget *parent = 0, Qt::WindowFlags flags = 0); ~ZxDockWidget(); bool IsWindowOpacity(void); void WindowOpacity(bool bOpacity); void changeTitle(bool bTopLevel); public slots: void slotFeaturesChanged(QDockWidget::DockWidgetFeatures features); void slotTopLevelChanged(bool topLevel); void slotAllowedAreasChanged(Qt::DockWidgetAreas allowedAreas); void slotVisibilityChanged(bool visible); void slotDockLocationChanged(Qt::DockWidgetArea area); protected: virtual void leaveEvent(QEvent * event); virtual void enterEvent(QEvent * event); virtual bool event(QEvent *event); void paintEvent(QPaintEvent *event); void init(); protected: bool m_bIsWindowOpacity; QString m_sTitle; };