<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://techbase.kde.org/skins/common/feed.css?0.2"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/KWin/WindowSwitcher&amp;feed=atom&amp;action=history</id>
		<title>Development/Tutorials/KWin/WindowSwitcher - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://techbase.kde.org/index.php?title=Development/Tutorials/KWin/WindowSwitcher&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/KWin/WindowSwitcher&amp;action=history"/>
		<updated>2013-05-22T17:55:22Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/KWin/WindowSwitcher&amp;diff=72001&amp;oldid=prev</id>
		<title>Argonel: /* Installation */ command line was unusable</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/KWin/WindowSwitcher&amp;diff=72001&amp;oldid=prev"/>
				<updated>2012-06-06T19:29:17Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Installation: &lt;/span&gt; command line was unusable&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:29, 6 June 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 56:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 56:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In 4.8 the installation of the custom layouts is not optimal. This will change for the next release. The QML file(s) has to be stored in '''~/.kde/share/apps/kwin/tabbox/'''. Unfortunately the configuration module does not yet recognize custom layouts. To enable the layout use:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In 4.8 the installation of the custom layouts is not optimal. This will change for the next release. The QML file(s) has to be stored in '''~/.kde/share/apps/kwin/tabbox/'''. Unfortunately the configuration module does not yet recognize custom layouts. To enable the layout use:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;kwriteconfig --file kwinrc --group TabBox --LayoutName &amp;lt;nameoflayout&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;kwriteconfig --file kwinrc --group TabBox --&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;key &lt;/ins&gt;LayoutName &amp;lt;nameoflayout&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The layout name is the name of your main QML file without the suffix and only small letters. E.g. ''MyLayout.qml'' becomes ''mylayout''. To set the alternative switcher use ''TabBoxAlternative'' instead of ''TabBox''. Now KWin has to reload the settings (change anything in a KCM) or has to be restarted.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The layout name is the name of your main QML file without the suffix and only small letters. E.g. ''MyLayout.qml'' becomes ''mylayout''. To set the alternative switcher use ''TabBoxAlternative'' instead of ''TabBox''. Now KWin has to reload the settings (change anything in a KCM) or has to be restarted.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wwwdeveloper:diff:version:1.11a:oldid:68128:newid:72001 --&gt;
&lt;/table&gt;</summary>
		<author><name>Argonel</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/KWin/WindowSwitcher&amp;diff=68128&amp;oldid=prev</id>
		<title>Droetker: /* Introduction */ typo</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/KWin/WindowSwitcher&amp;diff=68128&amp;oldid=prev"/>
				<updated>2011-12-26T21:29:18Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Introduction: &lt;/span&gt; typo&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:29, 26 December 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Introduction ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Introduction ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The Window Switcher (Alt+Tab) can be custom styled using layouts written in QML since KDE Plasma Workspaces in version 4.8. The window manager supports multiple Window Switcher and exchanges the loaded layout at runtime. Additionally the underlying Model is recreated each time the switcher is invoked and some properties might change due to screen changes and different settings for the multiple switchers. To support this the QML loader can set properties in the custom QML &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Component &lt;/del&gt;if available.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The Window Switcher (Alt+Tab) can be custom styled using layouts written in QML since KDE Plasma Workspaces in version 4.8. The window manager supports multiple Window Switcher and exchanges the loaded layout at runtime. Additionally the underlying Model is recreated each time the switcher is invoked and some properties might change due to screen changes and different settings for the multiple switchers. To support this the QML loader can set properties in the custom QML &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;component &lt;/ins&gt;if available.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Global Properties ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Global Properties ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Droetker</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/KWin/WindowSwitcher&amp;diff=68118&amp;oldid=prev</id>
		<title>Mgraesslin at 08:11, 26 December 2011</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/KWin/WindowSwitcher&amp;diff=68118&amp;oldid=prev"/>
				<updated>2011-12-26T08:11:38Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 08:11, 26 December 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 52:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 52:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;== Installation ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;In 4.8 the installation of the custom layouts is not optimal. This will change for the next release. The QML file(s) has to be stored in '''~/.kde/share/apps/kwin/tabbox/'''. Unfortunately the configuration module does not yet recognize custom layouts. To enable the layout use:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;kwriteconfig --file kwinrc --group TabBox --LayoutName &amp;lt;nameoflayout&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;The layout name is the name of your main QML file without the suffix and only small letters. E.g. ''MyLayout.qml'' becomes ''mylayout''. To set the alternative switcher use ''TabBoxAlternative'' instead of ''TabBox''. Now KWin has to reload the settings (change anything in a KCM) or has to be restarted.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mgraesslin</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/KWin/WindowSwitcher&amp;diff=68090&amp;oldid=prev</id>
		<title>Mgraesslin: Initial import of KWin Window Switcher API documentation</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/KWin/WindowSwitcher&amp;diff=68090&amp;oldid=prev"/>
				<updated>2011-12-25T19:32:13Z</updated>
		
		<summary type="html">&lt;p&gt;Initial import of KWin Window Switcher API documentation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Introduction ==&lt;br /&gt;
The Window Switcher (Alt+Tab) can be custom styled using layouts written in QML since KDE Plasma Workspaces in version 4.8. The window manager supports multiple Window Switcher and exchanges the loaded layout at runtime. Additionally the underlying Model is recreated each time the switcher is invoked and some properties might change due to screen changes and different settings for the multiple switchers. To support this the QML loader can set properties in the custom QML Component if available.&lt;br /&gt;
&lt;br /&gt;
== Global Properties ==&lt;br /&gt;
* ''int'' '''screenWidth''': the width of the primary screen. This property can be used to restrain the width of the switcher to the current screen.&lt;br /&gt;
* ''int'' '''screenHeight''': the height of the primary screen. This property can be used to restrain the height of the switcher to the current screen.&lt;br /&gt;
* ''string'' '''longestCaption''': the window title with most characters at the moment of Model creation. This property can be used to dynamically calculate the width of a list view based on the longest window title.&lt;br /&gt;
* ''bool'' '''allDesktops''': whether the Model includes windows from all desktops or only the current desktop. This property can be used to e.g. hide the desktop a window is on when the switcher only shows windows of the current desktop. Do not use this property to filter the list. This is done by the Model.&lt;br /&gt;
&lt;br /&gt;
If the custom QML layout supports the same properties on the root item, they will be set whenever the layout is loaded and whenever the value changes.&lt;br /&gt;
&lt;br /&gt;
== Model ==&lt;br /&gt;
The Model is available as a context property '''clientModel'''. Additionally the custom component can define a function called '''setModel(model)''' which is invoked whenever the Model is set. By that the QML layout can react on the expected Model changes. The component can also define a function called '''modelChanged()''' which gets invoked whenever the Model is reset. This happens for example when a window closes while the window switcher is active.&lt;br /&gt;
&lt;br /&gt;
The Model provides the following roles:&lt;br /&gt;
* ''string'' '''caption''': the window title&lt;br /&gt;
* ''bool'' '''minimized''': whether the window is minimized&lt;br /&gt;
* ''string'' '''desktopName''': the name of the desktop the window is on&lt;br /&gt;
* ''ulonglong'' '''windowId''': the window Id (XId) of the window&lt;br /&gt;
&lt;br /&gt;
== Icon ==&lt;br /&gt;
The window switcher includes an Image Provider to return the window's icon. An image url looks like the following:&lt;br /&gt;
&lt;br /&gt;
image://client/&amp;lt;index&amp;gt;/&amp;lt;invokation-uid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The URL supports an additional suffix '''/selected''' to request a highlighted item or '''/disabled''' to request an icon in disabled look. E.g.&lt;br /&gt;
&lt;br /&gt;
image://client/1/1223-324/disabled&lt;br /&gt;
&lt;br /&gt;
It is important to remember that QML caches the icons. As the URL is based on the Model index which changes from each invocation of the window switcher a unique Id has to be added to disable the cache. This unique Id should be changed whenever the modelChanged() function described above is invoked.&lt;br /&gt;
&lt;br /&gt;
== Model based View ==&lt;br /&gt;
The window switcher has to set the index in the list view to select the proper item when the switcher is invoked. Because of that the ListView implementation has to follow this contract:&lt;br /&gt;
* Property ''objectName'' must have value '''listView'''&lt;br /&gt;
* a ''signal'' '''currentIndexChanged(int index)''' must be defined and invoked whenever the ListView changes the index (e.g. due to mouse click).&lt;br /&gt;
&lt;br /&gt;
== Thumbnails ==&lt;br /&gt;
The window manager provides a QML component to render a live thumbnail of the window. It is important to know that this thumbnail is not rendered in QML's scene graph, but by the compositor after the window has been rendered. Because of that it is not possible to put other visual components on top of the thumbnail. If compositing is not available an icon will be rendered instead of the thumbnail.&lt;br /&gt;
&lt;br /&gt;
To use the Thumbnail component import '''org.kde.kwin''' in version '''0.1'''. The component is called '''ThumbnailItem''' and has one required property '''wId'''. Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
import QtQuick 1.0&lt;br /&gt;
import org.kde.kwin 0.1 as KWin&lt;br /&gt;
ListView {&lt;br /&gt;
    objectName: &amp;quot;listView&amp;quot;&lt;br /&gt;
    model: clientModel&lt;br /&gt;
    delegate: KWin.ThumbnailItem {&lt;br /&gt;
        wId: windowId&lt;br /&gt;
        width: 200&lt;br /&gt;
        height: 200&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mgraesslin</name></author>	</entry>

	</feed>