21 #ifndef __ctkBasePopupWidget_h 22 #define __ctkBasePopupWidget_h 25 #include <QEasingCurve> 30 #include "ctkWidgetsExport.h" 32 class ctkBasePopupWidgetPrivate;
50 Q_PROPERTY(
AnimationEffect animationEffect READ animationEffect WRITE setAnimationEffect)
58 Q_PROPERTY(
int effectDuration READ effectDuration WRITE setEffectDuration);
69 Q_PROPERTY( QEasingCurve::Type easingCurve READ easingCurve WRITE setEasingCurve);
74 Q_PROPERTY( Qt::Alignment alignment READ alignment WRITE setAlignment);
79 Q_PROPERTY( Qt::Orientations orientation READ orientation WRITE setOrientation);
87 Q_PROPERTY( Qt::LayoutDirection horizontalDirection READ horizontalDirection WRITE setHorizontalDirection);
106 QWidget* baseWidget()
const;
110 WindowOpacityFadeEffect = 0,
124 int effectDuration()
const;
127 void setEffectDuration(
int duration);
131 QEasingCurve::Type easingCurve()
const;
134 void setEasingCurve(QEasingCurve::Type easingCurve);
138 Qt::Alignment alignment()
const;
141 void setAlignment(Qt::Alignment alignment);
145 Qt::Orientations orientation()
const;
148 void setOrientation(Qt::Orientations orientation);
164 Qt::LayoutDirection horizontalDirection()
const;
167 void setHorizontalDirection(Qt::LayoutDirection direction);
172 virtual void hidePopup();
175 virtual void showPopup();
178 inline void showPopup(
bool show);
183 void popupOpened(
bool open);
187 QScopedPointer<ctkBasePopupWidgetPrivate>
d_ptr;
188 Q_PROPERTY(
double effectAlpha READ effectAlpha WRITE setEffectAlpha DESIGNABLE
false)
189 Q_PROPERTY(QRect effectGeometry READ effectGeometry WRITE setEffectGeometry DESIGNABLE false)
191 double effectAlpha()const;
192 QRect effectGeometry()const;
194 virtual
void setBaseWidget(QWidget* baseWidget);
195 virtual
bool event(QEvent* event);
196 virtual
void paintEvent(QPaintEvent*);
199 virtual
void onEffectFinished();
200 void setEffectAlpha(
double alpha);
201 void setEffectGeometry(QRect geometry);
202 void onBaseWidgetDestroyed();
206 Q_DISABLE_COPY(ctkBasePopupWidget);
213 void ctkBasePopupWidget::showPopup(
bool show)
Q_DECLARE_METATYPE(ctkDICOMPersonName)