Move ::isCurrentTab to AbstractClient

Default implementation returns true.
This commit is contained in:
Martin Gräßlin 2015-03-12 10:43:46 +01:00
parent 6feb1c6604
commit 7ffc742a69
3 changed files with 12 additions and 6 deletions

View file

@ -55,6 +55,11 @@ bool AbstractClient::untab(const QRect &toGeometry, bool clientRemoved)
return false;
}
bool AbstractClient::isCurrentTab() const
{
return true;
}
void AbstractClient::growHorizontal()
{
}

View file

@ -37,6 +37,11 @@ class TabBoxClientImpl;
class AbstractClient : public Toplevel
{
Q_OBJECT
/**
* Whether this Client is the currently visible Client in its Client Group (Window Tabs).
* For change connect to the visibleChanged signal on the Client's Group.
**/
Q_PROPERTY(bool isCurrentTab READ isCurrentTab)
public:
virtual ~AbstractClient();
@ -80,6 +85,7 @@ public:
virtual void setKeepBelow(bool) = 0;
virtual TabGroup *tabGroup() const;
Q_INVOKABLE virtual bool untab(const QRect &toGeometry = QRect(), bool clientRemoved = false);
virtual bool isCurrentTab() const;
virtual MaximizeMode maximizeMode() const = 0;
virtual void maximize(MaximizeMode) = 0;
virtual bool noBorder() const = 0;

View file

@ -238,11 +238,6 @@ class Client
* The "Window Tabs" Group this Client belongs to.
**/
Q_PROPERTY(KWin::TabGroup* tabGroup READ tabGroup NOTIFY tabGroupChanged SCRIPTABLE false)
/**
* Whether this Client is the currently visible Client in its Client Group (Window Tabs).
* For change connect to the visibleChanged signal on the Client's Group.
**/
Q_PROPERTY(bool isCurrentTab READ isCurrentTab)
/**
* Minimum size as specified in WM_NORMAL_HINTS
**/
@ -584,7 +579,7 @@ public:
* client, this function stops it.
*/
void dontMoveResize();
bool isCurrentTab() const;
bool isCurrentTab() const override;
/**
* Whether or not the window has a strut that expands through the invisible area of