Move enum QuickTileFlag and ::setQuickTileMode to AbstractClient
This commit is contained in:
parent
5b53d2401e
commit
1a7e8aeaf2
2 changed files with 19 additions and 14 deletions
|
@ -135,6 +135,23 @@ public:
|
|||
// a helper for the workspace window packing. tests for screen validity and updates since in maximization case as with normal moving
|
||||
virtual void packTo(int left, int top);
|
||||
|
||||
enum QuickTileFlag {
|
||||
QuickTileNone = 0,
|
||||
QuickTileLeft = 1,
|
||||
QuickTileRight = 1<<1,
|
||||
QuickTileTop = 1<<2,
|
||||
QuickTileBottom = 1<<3,
|
||||
QuickTileHorizontal = QuickTileLeft|QuickTileRight,
|
||||
QuickTileVertical = QuickTileTop|QuickTileBottom,
|
||||
QuickTileMaximize = QuickTileLeft|QuickTileRight|QuickTileTop|QuickTileBottom
|
||||
};
|
||||
Q_DECLARE_FLAGS(QuickTileMode, QuickTileFlag)
|
||||
/** Set the quick tile mode ("snap") of this window.
|
||||
* This will also handle preserving and restoring of window geometry as necessary.
|
||||
* @param mode The tile mode (left/right) to give this window.
|
||||
*/
|
||||
virtual void setQuickTileMode(QuickTileMode mode, bool keyboard = false) = 0;
|
||||
|
||||
// TODO: remove boolean trap
|
||||
static bool belongToSameApplication(const AbstractClient* c1, const AbstractClient* c2, bool active_hack = false);
|
||||
|
||||
|
@ -151,5 +168,6 @@ protected:
|
|||
|
||||
Q_DECLARE_METATYPE(KWin::AbstractClient*)
|
||||
Q_DECLARE_METATYPE(QList<KWin::AbstractClient*>)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::AbstractClient::QuickTileMode)
|
||||
|
||||
#endif
|
||||
|
|
15
client.h
15
client.h
|
@ -377,18 +377,6 @@ public:
|
|||
QRect geometryRestore() const;
|
||||
MaximizeMode maximizeMode() const override;
|
||||
|
||||
enum QuickTileFlag {
|
||||
QuickTileNone = 0,
|
||||
QuickTileLeft = 1,
|
||||
QuickTileRight = 1<<1,
|
||||
QuickTileTop = 1<<2,
|
||||
QuickTileBottom = 1<<3,
|
||||
QuickTileHorizontal = QuickTileLeft|QuickTileRight,
|
||||
QuickTileVertical = QuickTileTop|QuickTileBottom,
|
||||
QuickTileMaximize = QuickTileLeft|QuickTileRight|QuickTileTop|QuickTileBottom
|
||||
};
|
||||
|
||||
Q_DECLARE_FLAGS(QuickTileMode, QuickTileFlag)
|
||||
QuickTileMode quickTileMode() const;
|
||||
bool isMinimizable() const override;
|
||||
void setMaximize(bool vertically, bool horizontally);
|
||||
|
@ -476,7 +464,7 @@ public:
|
|||
* This will also handle preserving and restoring of window geometry as necessary.
|
||||
* @param mode The tile mode (left/right) to give this window.
|
||||
*/
|
||||
void setQuickTileMode(QuickTileMode mode, bool keyboard = false);
|
||||
void setQuickTileMode(QuickTileMode mode, bool keyboard = false) override;
|
||||
|
||||
void growHorizontal() override;
|
||||
void shrinkHorizontal() override;
|
||||
|
@ -1280,6 +1268,5 @@ inline void Client::print(T &stream) const
|
|||
} // namespace
|
||||
Q_DECLARE_METATYPE(KWin::Client*)
|
||||
Q_DECLARE_METATYPE(QList<KWin::Client*>)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::Client::QuickTileMode)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue