Changeset View
Changeset View
Standalone View
Standalone View
abstract_client.h
Show First 20 Lines • Show All 618 Lines • ▼ Show 20 Line(s) | 323 | public: | |||
---|---|---|---|---|---|
619 | void setQuickTileMode(QuickTileMode mode, bool keyboard = false); | 619 | void setQuickTileMode(QuickTileMode mode, bool keyboard = false); | ||
620 | QuickTileMode quickTileMode() const { | 620 | QuickTileMode quickTileMode() const { | ||
621 | return QuickTileMode(m_quickTileMode); | 621 | return QuickTileMode(m_quickTileMode); | ||
622 | } | 622 | } | ||
623 | Layer layer() const override; | 623 | Layer layer() const override; | ||
624 | void updateLayer(); | 624 | void updateLayer(); | ||
625 | 625 | | |||
626 | enum ForceGeometry_t { NormalGeometrySet, ForceGeometrySet }; | 626 | enum ForceGeometry_t { NormalGeometrySet, ForceGeometrySet }; | ||
627 | void move(int x, int y, ForceGeometry_t force = NormalGeometrySet); | 627 | virtual void move(int x, int y, ForceGeometry_t force = NormalGeometrySet); | ||
628 | void move(const QPoint &p, ForceGeometry_t force = NormalGeometrySet); | 628 | void move(const QPoint &p, ForceGeometry_t force = NormalGeometrySet); | ||
629 | virtual void resizeWithChecks(int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | 629 | virtual void resizeWithChecks(int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | ||
630 | void resizeWithChecks(const QSize& s, ForceGeometry_t force = NormalGeometrySet); | 630 | void resizeWithChecks(const QSize& s, ForceGeometry_t force = NormalGeometrySet); | ||
631 | void keepInArea(QRect area, bool partial = false); | 631 | void keepInArea(QRect area, bool partial = false); | ||
632 | virtual QSize minSize() const; | 632 | virtual QSize minSize() const; | ||
633 | virtual QSize maxSize() const; | 633 | virtual QSize maxSize() const; | ||
634 | virtual void setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | 634 | virtual void setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; | ||
635 | void setFrameGeometry(const QRect &rect, ForceGeometry_t force = NormalGeometrySet); | 635 | void setFrameGeometry(const QRect &rect, ForceGeometry_t force = NormalGeometrySet); | ||
Show All 14 Lines | |||||
650 | virtual QSize sizeForClientSize(const QSize &wsize, Sizemode mode = SizemodeAny, bool noframe = false) const; | 650 | virtual QSize sizeForClientSize(const QSize &wsize, Sizemode mode = SizemodeAny, bool noframe = false) const; | ||
651 | 651 | | |||
652 | /** | 652 | /** | ||
653 | * Adjust the frame size @p frame according to the window's size hints. | 653 | * Adjust the frame size @p frame according to the window's size hints. | ||
654 | */ | 654 | */ | ||
655 | QSize adjustedSize(const QSize&, Sizemode mode = SizemodeAny) const; | 655 | QSize adjustedSize(const QSize&, Sizemode mode = SizemodeAny) const; | ||
656 | QSize adjustedSize() const; | 656 | QSize adjustedSize() const; | ||
657 | 657 | | |||
658 | /** | ||||
659 | * Calculates the matching client position for the given frame position @p point. | ||||
660 | */ | ||||
661 | virtual QPoint framePosToClientPos(const QPoint &point) const; | ||||
662 | /** | ||||
663 | * Calculates the matching frame position for the given client position @p point. | ||||
664 | */ | ||||
665 | virtual QPoint clientPosToFramePos(const QPoint &point) const; | ||||
666 | /** | ||||
667 | * Calculates the matching client size for the given frame size @p size. | ||||
668 | * | ||||
669 | * Notice that size constraints won't be applied. | ||||
670 | * | ||||
671 | * Default implementation returns the frame size with frame margins being excluded. | ||||
672 | */ | ||||
673 | virtual QSize frameSizeToClientSize(const QSize &size) const; | ||||
674 | /** | ||||
675 | * Calculates the matching frame size for the given client size @p size. | ||||
676 | * | ||||
677 | * Notice that size constraints won't be applied. | ||||
678 | * | ||||
679 | * Default implementation returns the client size with frame margins being included. | ||||
680 | */ | ||||
681 | virtual QSize clientSizeToFrameSize(const QSize &size) const; | ||||
682 | /** | ||||
683 | * Calculates the matching client rect for the given frame rect @p rect. | ||||
684 | * | ||||
685 | * Notice that size constraints won't be applied. | ||||
686 | */ | ||||
687 | QRect frameRectToClientRect(const QRect &rect) const; | ||||
688 | /** | ||||
689 | * Calculates the matching frame rect for the given client rect @p rect. | ||||
690 | * | ||||
691 | * Notice that size constraints won't be applied. | ||||
692 | */ | ||||
693 | QRect clientRectToFrameRect(const QRect &rect) const; | ||||
694 | | ||||
658 | bool isMove() const { | 695 | bool isMove() const { | ||
659 | return isMoveResize() && moveResizePointerMode() == PositionCenter; | 696 | return isMoveResize() && moveResizePointerMode() == PositionCenter; | ||
660 | } | 697 | } | ||
661 | bool isResize() const { | 698 | bool isResize() const { | ||
662 | return isMoveResize() && moveResizePointerMode() != PositionCenter; | 699 | return isMoveResize() && moveResizePointerMode() != PositionCenter; | ||
663 | } | 700 | } | ||
664 | /** | 701 | /** | ||
665 | * Cursor shape for move/resize mode. | 702 | * Cursor shape for move/resize mode. | ||
▲ Show 20 Lines • Show All 665 Lines • Show Last 20 Lines |