Changeset View
Changeset View
Standalone View
Standalone View
abstract_client.h
Show First 20 Lines • Show All 662 Lines • ▼ Show 20 Line(s) | 334 | public: | |||
---|---|---|---|---|---|
663 | enum ForceGeometry_t { NormalGeometrySet, ForceGeometrySet }; | 663 | enum ForceGeometry_t { NormalGeometrySet, ForceGeometrySet }; | ||
664 | void move(int x, int y, ForceGeometry_t force = NormalGeometrySet); | 664 | void move(int x, int y, ForceGeometry_t force = NormalGeometrySet); | ||
665 | void move(const QPoint &p, ForceGeometry_t force = NormalGeometrySet); | 665 | void move(const QPoint &p, ForceGeometry_t force = NormalGeometrySet); | ||
666 | virtual void resizeWithChecks(int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | 666 | virtual void resizeWithChecks(int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | ||
667 | void resizeWithChecks(const QSize& s, ForceGeometry_t force = NormalGeometrySet); | 667 | void resizeWithChecks(const QSize& s, ForceGeometry_t force = NormalGeometrySet); | ||
668 | void keepInArea(QRect area, bool partial = false); | 668 | void keepInArea(QRect area, bool partial = false); | ||
669 | virtual QSize minSize() const; | 669 | virtual QSize minSize() const; | ||
670 | virtual QSize maxSize() const; | 670 | virtual QSize maxSize() const; | ||
671 | virtual void setGeometry(int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | 671 | virtual void setGeometry(const QRect &rect, ForceGeometry_t force = NormalGeometrySet) = 0; | ||
672 | void setGeometry(const QRect& r, ForceGeometry_t force = NormalGeometrySet); | | |||
673 | /// How to resize the window in order to obey constains (mainly aspect ratios) | 672 | /// How to resize the window in order to obey constains (mainly aspect ratios) | ||
674 | enum Sizemode { | 673 | enum Sizemode { | ||
675 | SizemodeAny, | 674 | SizemodeAny, | ||
676 | SizemodeFixedW, ///< Try not to affect width | 675 | SizemodeFixedW, ///< Try not to affect width | ||
677 | SizemodeFixedH, ///< Try not to affect height | 676 | SizemodeFixedH, ///< Try not to affect height | ||
678 | SizemodeMax ///< Try not to make it larger in either direction | 677 | SizemodeMax ///< Try not to make it larger in either direction | ||
679 | }; | 678 | }; | ||
680 | /** | 679 | /** | ||
▲ Show 20 Lines • Show All 650 Lines • ▼ Show 20 Line(s) | 1329 | { | |||
1331 | move(p.x(), p.y(), force); | 1330 | move(p.x(), p.y(), force); | ||
1332 | } | 1331 | } | ||
1333 | 1332 | | |||
1334 | inline void AbstractClient::resizeWithChecks(const QSize& s, AbstractClient::ForceGeometry_t force) | 1333 | inline void AbstractClient::resizeWithChecks(const QSize& s, AbstractClient::ForceGeometry_t force) | ||
1335 | { | 1334 | { | ||
1336 | resizeWithChecks(s.width(), s.height(), force); | 1335 | resizeWithChecks(s.width(), s.height(), force); | ||
1337 | } | 1336 | } | ||
1338 | 1337 | | |||
1339 | inline void AbstractClient::setGeometry(const QRect& r, ForceGeometry_t force) | | |||
1340 | { | | |||
1341 | setGeometry(r.x(), r.y(), r.width(), r.height(), force); | | |||
1342 | } | | |||
1343 | | ||||
1344 | inline const QList<AbstractClient*>& AbstractClient::transients() const | 1338 | inline const QList<AbstractClient*>& AbstractClient::transients() const | ||
1345 | { | 1339 | { | ||
1346 | return m_transients; | 1340 | return m_transients; | ||
1347 | } | 1341 | } | ||
1348 | 1342 | | |||
1349 | inline bool AbstractClient::areGeometryUpdatesBlocked() const | 1343 | inline bool AbstractClient::areGeometryUpdatesBlocked() const | ||
1350 | { | 1344 | { | ||
1351 | return m_blockGeometryUpdates != 0; | 1345 | return m_blockGeometryUpdates != 0; | ||
Show All 34 Lines |