Changeset View
Changeset View
Standalone View
Standalone View
abstract_client.h
Show First 20 Lines • Show All 619 Lines • ▼ Show 20 Line(s) | 324 | public: | |||
---|---|---|---|---|---|
620 | void setQuickTileMode(QuickTileMode mode, bool keyboard = false); | 620 | void setQuickTileMode(QuickTileMode mode, bool keyboard = false); | ||
621 | QuickTileMode quickTileMode() const { | 621 | QuickTileMode quickTileMode() const { | ||
622 | return QuickTileMode(m_quickTileMode); | 622 | return QuickTileMode(m_quickTileMode); | ||
623 | } | 623 | } | ||
624 | Layer layer() const override; | 624 | Layer layer() const override; | ||
625 | void updateLayer(); | 625 | void updateLayer(); | ||
626 | 626 | | |||
627 | enum ForceGeometry_t { NormalGeometrySet, ForceGeometrySet }; | 627 | enum ForceGeometry_t { NormalGeometrySet, ForceGeometrySet }; | ||
628 | virtual void move(int x, int y, ForceGeometry_t force = NormalGeometrySet); | 628 | void move(int x, int y, ForceGeometry_t force = NormalGeometrySet); | ||
629 | void move(const QPoint &p, ForceGeometry_t force = NormalGeometrySet); | 629 | void move(const QPoint &p, ForceGeometry_t force = NormalGeometrySet); | ||
630 | virtual void resizeWithChecks(int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | 630 | virtual void resizeWithChecks(int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | ||
631 | void resizeWithChecks(const QSize& s, ForceGeometry_t force = NormalGeometrySet); | 631 | void resizeWithChecks(const QSize& s, ForceGeometry_t force = NormalGeometrySet); | ||
632 | void keepInArea(QRect area, bool partial = false); | 632 | void keepInArea(QRect area, bool partial = false); | ||
633 | virtual QSize minSize() const; | 633 | virtual QSize minSize() const; | ||
634 | virtual QSize maxSize() const; | 634 | virtual QSize maxSize() const; | ||
635 | virtual void setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | 635 | virtual void setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | ||
636 | void setFrameGeometry(const QRect &rect, ForceGeometry_t force = NormalGeometrySet); | 636 | void setFrameGeometry(const QRect &rect, ForceGeometry_t force = NormalGeometrySet); | ||
▲ Show 20 Lines • Show All 383 Lines • ▼ Show 20 Line(s) | 925 | protected: | |||
1020 | void checkOffscreenPosition(QRect *geom, const QRect &screenArea); | 1020 | void checkOffscreenPosition(QRect *geom, const QRect &screenArea); | ||
1021 | int borderLeft() const; | 1021 | int borderLeft() const; | ||
1022 | int borderRight() const; | 1022 | int borderRight() const; | ||
1023 | int borderTop() const; | 1023 | int borderTop() const; | ||
1024 | int borderBottom() const; | 1024 | int borderBottom() const; | ||
1025 | virtual void changeMaximize(bool horizontal, bool vertical, bool adjust) = 0; | 1025 | virtual void changeMaximize(bool horizontal, bool vertical, bool adjust) = 0; | ||
1026 | virtual void setGeometryRestore(const QRect &geo) = 0; | 1026 | virtual void setGeometryRestore(const QRect &geo) = 0; | ||
1027 | 1027 | | |||
1028 | /** | | |||
1029 | * Called from move after updating the geometry. Can be reimplemented to perform specific tasks. | | |||
1030 | * The base implementation does nothing. | | |||
1031 | */ | | |||
1032 | virtual void doMove(int x, int y); | | |||
1033 | void blockGeometryUpdates(bool block); | 1028 | void blockGeometryUpdates(bool block); | ||
1034 | void blockGeometryUpdates(); | 1029 | void blockGeometryUpdates(); | ||
1035 | void unblockGeometryUpdates(); | 1030 | void unblockGeometryUpdates(); | ||
1036 | bool areGeometryUpdatesBlocked() const; | 1031 | bool areGeometryUpdatesBlocked() const; | ||
1037 | enum PendingGeometry_t { | 1032 | enum PendingGeometry_t { | ||
1038 | PendingGeometryNone, | 1033 | PendingGeometryNone, | ||
1039 | PendingGeometryNormal, | 1034 | PendingGeometryNormal, | ||
1040 | PendingGeometryForced | 1035 | PendingGeometryForced | ||
▲ Show 20 Lines • Show All 271 Lines • ▼ Show 20 Line(s) | 1302 | public: | |||
1312 | ~GeometryUpdatesBlocker() { | 1307 | ~GeometryUpdatesBlocker() { | ||
1313 | cl->blockGeometryUpdates(false); | 1308 | cl->blockGeometryUpdates(false); | ||
1314 | } | 1309 | } | ||
1315 | 1310 | | |||
1316 | private: | 1311 | private: | ||
1317 | AbstractClient* cl; | 1312 | AbstractClient* cl; | ||
1318 | }; | 1313 | }; | ||
1319 | 1314 | | |||
1320 | inline void AbstractClient::move(const QPoint& p, ForceGeometry_t force) | | |||
1321 | { | | |||
1322 | move(p.x(), p.y(), force); | | |||
1323 | } | | |||
1324 | | ||||
1325 | inline void AbstractClient::resizeWithChecks(const QSize& s, AbstractClient::ForceGeometry_t force) | 1315 | inline void AbstractClient::resizeWithChecks(const QSize& s, AbstractClient::ForceGeometry_t force) | ||
1326 | { | 1316 | { | ||
1327 | resizeWithChecks(s.width(), s.height(), force); | 1317 | resizeWithChecks(s.width(), s.height(), force); | ||
1328 | } | 1318 | } | ||
1329 | 1319 | | |||
1330 | inline void AbstractClient::setFrameGeometry(const QRect &rect, ForceGeometry_t force) | 1320 | inline void AbstractClient::setFrameGeometry(const QRect &rect, ForceGeometry_t force) | ||
1331 | { | 1321 | { | ||
1332 | setFrameGeometry(rect.x(), rect.y(), rect.width(), rect.height(), force); | 1322 | setFrameGeometry(rect.x(), rect.y(), rect.width(), rect.height(), force); | ||
Show All 39 Lines |