diff --git a/kcmkwin/kwintabbox/CMakeLists.txt b/kcmkwin/kwintabbox/CMakeLists.txt index e113d1db8d..0616945a6a 100644 --- a/kcmkwin/kwintabbox/CMakeLists.txt +++ b/kcmkwin/kwintabbox/CMakeLists.txt @@ -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}) diff --git a/kcmkwin/kwintabbox/layoutconfig.ui b/kcmkwin/kwintabbox/layoutconfig.ui deleted file mode 100644 index 55f392f3cc..0000000000 --- a/kcmkwin/kwintabbox/layoutconfig.ui +++ /dev/null @@ -1,57 +0,0 @@ - - - LayoutConfigForm - - - - 0 - 0 - 680 - 432 - - - - - - - Item Layout - - - - - - Item layout: - - - itemLayoutCombo - - - - - - - - 0 - 0 - - - - - - - - - - - - KComboBox - QComboBox -
kcombobox.h
-
-
- - itemLayoutCombo - - - -
diff --git a/kcmkwin/kwintabbox/previewhandlerimpl.cpp b/kcmkwin/kwintabbox/previewhandlerimpl.cpp deleted file mode 100644 index cbe2a38be8..0000000000 --- a/kcmkwin/kwintabbox/previewhandlerimpl.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Martin Gräßlin - -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 . -*********************************************************************/ - -#include "previewhandlerimpl.h" -#include -#include -#include -#include - -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 diff --git a/kcmkwin/kwintabbox/previewhandlerimpl.h b/kcmkwin/kwintabbox/previewhandlerimpl.h deleted file mode 100644 index 6d26562043..0000000000 --- a/kcmkwin/kwintabbox/previewhandlerimpl.h +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - -Copyright (C) 2009 Martin Gräßlin - -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 . -*********************************************************************/ - - -#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