• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libsolidcontrol

frontendobject.cpp

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2006-2007 Kevin Ottens <ervin@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License version 2 as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016     Boston, MA 02110-1301, USA.
00017 
00018 */
00019 
00020 #include "frontendobject_p.h"
00021 
00022 #include <QtCore/QObject>
00023 
00024 Solid::Control::FrontendObjectPrivate::FrontendObjectPrivate(QObject *parent)
00025     : m_parent(parent), m_backendObject(0)
00026 {
00027 }
00028 
00029 Solid::Control::FrontendObjectPrivate::~FrontendObjectPrivate()
00030 {
00031 }
00032 
00033 QObject *Solid::Control::FrontendObjectPrivate::parent() const
00034 {
00035     return m_parent;
00036 }
00037 
00038 QObject *Solid::Control::FrontendObjectPrivate::backendObject() const
00039 {
00040     return m_backendObject;
00041 }
00042 
00043 void Solid::Control::FrontendObjectPrivate::setBackendObject(QObject *object)
00044 {
00045     if (m_backendObject)
00046     {
00047         QObject::disconnect(m_parent, 0, m_backendObject, 0);
00048         m_backendObject->disconnect(m_parent);
00049     }
00050 
00051     m_backendObject = object;
00052 
00053     if (m_backendObject)
00054     {
00055         QObject::connect(m_backendObject, SIGNAL(destroyed(QObject *)),
00056                          m_parent, SLOT(_k_destroyed(QObject *)));
00057     }
00058 }
00059 
00060 void Solid::Control::FrontendObjectPrivate::_k_destroyed(QObject *object)
00061 {
00062     if (m_backendObject == object) {
00063         m_backendObject = 0;
00064     }
00065 }

libsolidcontrol

Skip menu "libsolidcontrol"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal