Drop obsoleted files of TabBox Configuration
Old ui file for layout configuration no longer required and preview of old TabBox no longer required (and was not used at all).
This commit is contained in:
parent
08d6f62ae7
commit
5c3a7afb36
4 changed files with 0 additions and 319 deletions
|
@ -5,7 +5,6 @@ include_directories( ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/tabbox )
|
|||
set(kcm_kwintabbox_PART_SRCS
|
||||
main.cpp
|
||||
layoutconfig.cpp
|
||||
previewhandlerimpl.cpp
|
||||
${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/tabbox/clientitemdelegate.cpp
|
||||
${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/tabbox/clientmodel.cpp
|
||||
${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/tabbox/declarative.cpp
|
||||
|
@ -17,7 +16,6 @@ set(kcm_kwintabbox_PART_SRCS
|
|||
${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/tabbox/tabboxview.cpp )
|
||||
|
||||
kde4_add_ui_files( kcm_kwintabbox_PART_SRCS main.ui )
|
||||
kde4_add_ui_files( kcm_kwintabbox_PART_SRCS layoutconfig.ui )
|
||||
|
||||
kde4_add_plugin(kcm_kwintabbox ${kcm_kwintabbox_PART_SRCS})
|
||||
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>LayoutConfigForm</class>
|
||||
<widget class="QWidget" name="LayoutConfigForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>680</width>
|
||||
<height>432</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Item Layout</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Item layout:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>itemLayoutCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="KComboBox" name="itemLayoutCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>KComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>kcombobox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>itemLayoutCombo</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1,183 +0,0 @@
|
|||
/********************************************************************
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2009 Martin Gräßlin <kde@martin-graesslin.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/>.
|
||||
*********************************************************************/
|
||||
|
||||
#include "previewhandlerimpl.h"
|
||||
#include <kephal/screens.h>
|
||||
#include <klocalizedstring.h>
|
||||
#include <kwindowsystem.h>
|
||||
#include <KDebug>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
namespace TabBox
|
||||
{
|
||||
|
||||
PreviewClientImpl::PreviewClientImpl(WId id)
|
||||
: m_id(id)
|
||||
{
|
||||
}
|
||||
|
||||
PreviewClientImpl::~PreviewClientImpl()
|
||||
{
|
||||
}
|
||||
|
||||
QString PreviewClientImpl::caption() const
|
||||
{
|
||||
KWindowInfo info = KWindowSystem::windowInfo(m_id, NET::WMVisibleName);
|
||||
return info.visibleName();
|
||||
}
|
||||
|
||||
QPixmap PreviewClientImpl::icon(const QSize& size) const
|
||||
{
|
||||
return KWindowSystem::icon(m_id, size.width(), size.height(), true);
|
||||
}
|
||||
|
||||
bool PreviewClientImpl::isMinimized() const
|
||||
{
|
||||
KWindowInfo info = KWindowSystem::windowInfo(m_id, NET::WMState | NET::XAWMState);
|
||||
return info.isMinimized();
|
||||
}
|
||||
|
||||
int PreviewClientImpl::width() const
|
||||
{
|
||||
return 0; // only needed for the outline - not needed in preview
|
||||
}
|
||||
|
||||
int PreviewClientImpl::height() const
|
||||
{
|
||||
return 0; // only needed for the outline - not needed in preview
|
||||
}
|
||||
|
||||
WId PreviewClientImpl::window() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
int PreviewClientImpl::x() const
|
||||
{
|
||||
return 0; // only needed for the outline - not needed in preview
|
||||
}
|
||||
|
||||
int PreviewClientImpl::y() const
|
||||
{
|
||||
return 0; // only needed for the outline - not needed in preview
|
||||
}
|
||||
|
||||
/*******************************************************
|
||||
* PreviewHandlerImpl
|
||||
*******************************************************/
|
||||
PreviewHandlerImpl::PreviewHandlerImpl()
|
||||
{
|
||||
QList< WId > windows = KWindowSystem::stackingOrder();
|
||||
foreach (WId w, windows) {
|
||||
m_stackingOrder.append(new PreviewClientImpl(w));
|
||||
kDebug(1212) << "Window " << w;
|
||||
}
|
||||
}
|
||||
|
||||
PreviewHandlerImpl::~PreviewHandlerImpl()
|
||||
{
|
||||
qDeleteAll(m_stackingOrder.begin(), m_stackingOrder.end());
|
||||
m_stackingOrder.clear();
|
||||
}
|
||||
|
||||
TabBoxClient* PreviewHandlerImpl::clientToAddToList(TabBoxClient* client, int desktop, bool allDesktops) const
|
||||
{
|
||||
Q_UNUSED(desktop)
|
||||
Q_UNUSED(allDesktops)
|
||||
// don't include desktops and panels
|
||||
KWindowInfo info = KWindowSystem::windowInfo(client->window(), NET::WMWindowType);
|
||||
NET::WindowType wType = info.windowType(NET::NormalMask | NET::DesktopMask | NET::DockMask |
|
||||
NET::ToolbarMask | NET::MenuMask | NET::DialogMask |
|
||||
NET::OverrideMask | NET::TopMenuMask |
|
||||
NET::UtilityMask | NET::SplashMask);
|
||||
|
||||
if (wType != NET::Normal && wType != NET::Override && wType != NET::Unknown &&
|
||||
wType != NET::Dialog && wType != NET::Utility) {
|
||||
return NULL;
|
||||
}
|
||||
return client;
|
||||
}
|
||||
|
||||
TabBoxClientList PreviewHandlerImpl::stackingOrder() const
|
||||
{
|
||||
return m_stackingOrder;
|
||||
}
|
||||
|
||||
int PreviewHandlerImpl::nextDesktopFocusChain(int desktop) const
|
||||
{
|
||||
int ret = desktop + 1;
|
||||
if (ret > numberOfDesktops())
|
||||
ret = 1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int PreviewHandlerImpl::numberOfDesktops() const
|
||||
{
|
||||
return KWindowSystem::numberOfDesktops();
|
||||
}
|
||||
|
||||
int PreviewHandlerImpl::currentDesktop() const
|
||||
{
|
||||
return KWindowSystem::currentDesktop();
|
||||
}
|
||||
|
||||
QString PreviewHandlerImpl::desktopName(int desktop) const
|
||||
{
|
||||
return KWindowSystem::desktopName(desktop);
|
||||
}
|
||||
|
||||
QString PreviewHandlerImpl::desktopName(TabBoxClient* client) const
|
||||
{
|
||||
Q_UNUSED(client)
|
||||
return desktopName(1);
|
||||
}
|
||||
|
||||
TabBoxClient* PreviewHandlerImpl::nextClientFocusChain(TabBoxClient* client) const
|
||||
{
|
||||
if (m_stackingOrder.isEmpty())
|
||||
return NULL;
|
||||
int index = m_stackingOrder.indexOf(client);
|
||||
index++;
|
||||
if (index >= m_stackingOrder.count())
|
||||
index = 0;
|
||||
return m_stackingOrder[ index ];
|
||||
}
|
||||
|
||||
KWin::TabBox::TabBoxClient* PreviewHandlerImpl::activeClient() const
|
||||
{
|
||||
if (m_stackingOrder.isEmpty())
|
||||
return NULL;
|
||||
return m_stackingOrder[ 0 ];
|
||||
}
|
||||
|
||||
int PreviewHandlerImpl::activeScreen() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
TabBoxClient* PreviewHandlerImpl::desktopClient() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
} // namespace TabBox
|
||||
} // namespace KWin
|
|
@ -1,77 +0,0 @@
|
|||
/********************************************************************
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2009 Martin Gräßlin <kde@martin-graesslin.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/>.
|
||||
*********************************************************************/
|
||||
|
||||
|
||||
#ifndef KWIN_TABBOX_PREVIEWHANDLERIMPL_H
|
||||
#define KWIN_TABBOX_PREVIEWHANDLERIMPL_H
|
||||
|
||||
#include "tabboxhandler.h"
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
namespace TabBox
|
||||
{
|
||||
|
||||
class PreviewClientImpl :
|
||||
public KWin::TabBox::TabBoxClient
|
||||
{
|
||||
public:
|
||||
PreviewClientImpl(WId id);
|
||||
~PreviewClientImpl();
|
||||
|
||||
virtual QString caption() const;
|
||||
virtual int height() const;
|
||||
virtual QPixmap icon(const QSize& size = QSize(32, 32)) const;
|
||||
virtual bool isMinimized() const;
|
||||
virtual int width() const;
|
||||
virtual WId window() const;
|
||||
virtual int x() const;
|
||||
virtual int y() const;
|
||||
|
||||
private:
|
||||
WId m_id;
|
||||
};
|
||||
|
||||
class PreviewHandlerImpl :
|
||||
public KWin::TabBox::TabBoxHandler
|
||||
{
|
||||
public:
|
||||
PreviewHandlerImpl();
|
||||
~PreviewHandlerImpl();
|
||||
virtual KWin::TabBox::TabBoxClient* clientToAddToList(KWin::TabBox::TabBoxClient* client, int desktop, bool allDesktops) const;
|
||||
virtual KWin::TabBox::TabBoxClientList stackingOrder() const;
|
||||
virtual int nextDesktopFocusChain(int desktop) const;
|
||||
virtual int numberOfDesktops() const;
|
||||
virtual int currentDesktop() const;
|
||||
virtual QString desktopName(int desktop) const;
|
||||
virtual QString desktopName(KWin::TabBox::TabBoxClient* client) const;
|
||||
virtual KWin::TabBox::TabBoxClient* nextClientFocusChain(KWin::TabBox::TabBoxClient* client) const;
|
||||
virtual KWin::TabBox::TabBoxClient* activeClient() const;
|
||||
virtual int activeScreen() const;
|
||||
virtual TabBoxClient* desktopClient() const;
|
||||
|
||||
private:
|
||||
TabBoxClientList m_stackingOrder;
|
||||
};
|
||||
|
||||
} // namespace TabBox
|
||||
} // namespace KWin
|
||||
|
||||
#endif // KWIN_TABBOX_PREVIEWHANDLERIMPL_H
|
Loading…
Reference in a new issue