2016-07-15 11:00:55 +08:00
|
|
|
#ifndef DOCKPOPUPWINDOW_H
|
|
|
|
#define DOCKPOPUPWINDOW_H
|
|
|
|
|
2016-07-18 10:09:26 +08:00
|
|
|
#include "dbus/dbusxmousearea.h"
|
|
|
|
|
2016-07-15 11:00:55 +08:00
|
|
|
#include <darrowrectangle.h>
|
|
|
|
|
|
|
|
class DockPopupWindow : public Dtk::Widget::DArrowRectangle
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit DockPopupWindow(QWidget *parent = 0);
|
2016-07-19 15:08:16 +08:00
|
|
|
~DockPopupWindow();
|
2016-07-15 11:00:55 +08:00
|
|
|
|
|
|
|
bool model() const;
|
|
|
|
|
2016-07-18 10:09:26 +08:00
|
|
|
public slots:
|
2016-07-15 11:00:55 +08:00
|
|
|
void show(const QPoint &pos, const bool model = false);
|
2016-07-19 15:08:16 +08:00
|
|
|
void hide();
|
2016-07-15 11:00:55 +08:00
|
|
|
|
2016-07-18 10:09:26 +08:00
|
|
|
signals:
|
|
|
|
void accept() const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void mousePressEvent(QMouseEvent *e);
|
|
|
|
|
|
|
|
private slots:
|
2016-07-20 16:30:56 +08:00
|
|
|
void globalMouseRelease(int button, int x, int y, const QString &id);
|
2016-07-18 10:09:26 +08:00
|
|
|
|
2016-07-15 11:00:55 +08:00
|
|
|
private:
|
|
|
|
bool m_model;
|
2016-07-18 10:09:26 +08:00
|
|
|
QString m_mouseAreaKey;
|
|
|
|
|
|
|
|
QTimer *m_acceptDelayTimer;
|
|
|
|
|
|
|
|
DBusXMouseArea *m_mouseInter;
|
2016-07-15 11:00:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DOCKPOPUPWINDOW_H
|