Skip to content
Snippets Groups Projects
Select Git revision
  • 1845d37e4fa601221109cb27a6da7ee58596a919
  • master default
  • develop
  • borders
  • tests
  • 16
  • 15
  • gaps
  • v1.6.1
  • v1.6
  • v1.5
  • v1.4
  • v1.3.3
  • v1.3.2
  • v1.3.2rc2
  • v1.3.1rc1
  • v1.3.1.2
  • v1.3.1.1
  • v1.3.1
  • v1.3
  • v1.3rc2
  • v1.3rc1
  • v1.2.1
  • v1.2
  • v1.1.4
  • v1.1.3
  • v1.1.2
  • v1.1.1
28 results

tilingmanager.js

Blame
  • user avatar
    Fabian Homborg authored
    This is now pseudo-animated, which is much nicer than an outline anyway
    1845d37e
    History
    tilingmanager.js 16.20 KiB
    /********************************************************************
     KWin - the KDE window manager
     This file is part of the KDE project.
    
    Copyright (C) 2012 Mathias Gottschlag <mgottschlag@gmail.com>
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    *********************************************************************/
    
    Qt.include("signal.js");
    Qt.include("tile.js");
    Qt.include("tilelist.js");
    Qt.include("layout.js");
    Qt.include("spirallayout.js");
    Qt.include("halflayout.js");
    Qt.include("bladelayout.js");
    Qt.include("tiling.js");
    Qt.include("tests.js");
    
    
    /**
     * Class which manages all layouts, connects the various signals and handlers
     * and implements all keyboard shortcuts.
     * @class
     */
    function TilingManager() {
        /**
         * Default layout type which is selected for new layouts.
         */
        this.defaultLayout = HalfLayout;
    
        /**
         * List of all available layout types.
         */
        this.availableLayouts = [
    		HalfLayout,
    		BladeLayout,
            SpiralLayout/*,
    					  ZigZagLayout,
    					  ColumnLayout,
    					  RowLayout,
    					  GridLayout,
    					  MaximizedLayout,
    					  FloatingLayout*/
        ];
        for (var i = 0; i < this.availableLayouts.length; i++) {
            this.availableLayouts[i].index = i;
        }
        /**
         * Number of desktops in the system.
         */
        this.desktopCount = workspace.desktopGridWidth
            * workspace.desktopGridHeight;
        /**
         * Number of screens in the system.
         */
        this.screenCount = workspace.numScreens;
        /**
         * Array containing a list of layouts for every desktop. Each of the lists