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

libtaskmanager

startup.cpp

Go to the documentation of this file.
00001 /*****************************************************************
00002 
00003 Copyright (c) 2000-2001 Matthias Elter <elter@kde.org>
00004 Copyright (c) 2001 Richard Moore <rich@kde.org>
00005 
00006 Permission is hereby granted, free of charge, to any person obtaining a copy
00007 of this software and associated documentation files (the "Software"), to deal
00008 in the Software without restriction, including without limitation the rights
00009 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00010 copies of the Software, and to permit persons to whom the Software is
00011 furnished to do so, subject to the following conditions:
00012 
00013 The above copyright notice and this permission notice shall be included in
00014 all copies or substantial portions of the Software.
00015 
00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00018 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00019 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00020 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00021 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00022 
00023 ******************************************************************/
00024 
00025 // Own
00026 #include "startup.h"
00027 
00028 // Qt
00029 #include <QSet>
00030 
00031 #include "taskmanager.h"
00032 
00033 namespace TaskManager
00034 {
00035 
00036 class Startup::Private
00037 {
00038 public:
00039     Private(const KStartupInfoId& id, const KStartupInfoData& data)
00040         : id(id), data(data)
00041     {
00042     }
00043 
00044     KStartupInfoId id;
00045     KStartupInfoData data;
00046     QSet<WId> windowMatches;
00047 };
00048 
00049 Startup::Startup(const KStartupInfoId& id, const KStartupInfoData& data,
00050                  QObject * parent, const char *name)
00051     : QObject(parent),
00052       d(new Private(id, data))
00053 {
00054     setObjectName( name );
00055 }
00056 
00057 Startup::~Startup()
00058 {
00059     delete d;
00060 }
00061 
00062 QString Startup::text() const
00063 {
00064     return d->data.findName();
00065 }
00066 
00067 QString Startup::bin() const
00068 {
00069     return d->data.bin();
00070 }
00071 
00072 QString Startup::icon() const
00073 {
00074     return d->data.findIcon();
00075 }
00076 
00077 void Startup::update(const KStartupInfoData& data)
00078 {
00079     d->data.update(data);
00080     emit changed(::TaskManager::TaskUnchanged);
00081 }
00082 
00083 KStartupInfoId Startup::id() const
00084 {
00085     return d->id;
00086 }
00087 
00088 void Startup::addWindowMatch(WId window)
00089 {
00090     d->windowMatches.insert(window);
00091 }
00092 
00093 bool Startup::matchesWindow(WId window) const
00094 {
00095     return d->windowMatches.contains(window);
00096 }
00097 
00098 } // TaskManager namespace
00099 
00100 
00101 #include "startup.moc"

libtaskmanager

Skip menu "libtaskmanager"
  • 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