5#ifndef DABSTRACTDIALOG_H
6#define DABSTRACTDIALOG_H
13#include <dtkwidget_global.h>
19DWIDGET_BEGIN_NAMESPACE
21class DAbstractDialogPrivate;
22class LIBDTKWIDGETSHARED_EXPORT
DAbstractDialog :
public QDialog,
public DTK_CORE_NAMESPACE::DObject
26 Q_PROPERTY(DisplayPosition displayPosition READ displayPosition WRITE setDisplayPosition)
29 enum DisplayPosition {
34 DisplayCenter = Center,
35 DisplayTopRight = TopRight
38 Q_ENUMS(DisplayPosition)
39 Q_ENUMS(DisplayPostion)
44 DisplayPosition displayPosition()
const;
46 void move(
const QPoint &pos);
47 inline void move(
int x,
int y)
50 void setGeometry(
const QRect &rect);
51 inline void setGeometry(
int x,
int y,
int width,
int height)
52 { setGeometry(
QRect(x, y, width, height));}
56 void moveToTopRight();
57 void moveToCenterByRect(
const QRect &rect);
58 void moveToTopRightByRect(
const QRect &rect);
60 void setDisplayPosition(DisplayPosition displayPosition);
70 void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
71 void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
72 void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
73 void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
74 void showEvent(QShowEvent *event)
override;