• Skip to content
  • Skip to link menu
KDE 4.1 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 namespace TaskManager
00032 {
00033 
00034 class Startup::Private
00035 {
00036 public:
00037     Private(const KStartupInfoId& id, const KStartupInfoData& data)
00038         : id(id), data(data)
00039     {
00040     }
00041 
00042     KStartupInfoId id;
00043     KStartupInfoData data;
00044     QSet<WId> windowMatches;
00045 };
00046 
00047 Startup::Startup(const KStartupInfoId& id, const KStartupInfoData& data,
00048                  QObject * parent, const char *name)
00049     : QObject(parent),
00050       d(new Private(id, data))
00051 {
00052     setObjectName( name );
00053 }
00054 
00055 Startup::~Startup()
00056 {
00057     delete d;
00058 }
00059 
00060 QString Startup::text() const
00061 {
00062     return d->data.findName();
00063 }
00064 
00065 QString Startup::bin() const
00066 {
00067     return d->data.bin();
00068 }
00069 
00070 QString Startup::icon() const
00071 {
00072     return d->data.findIcon();
00073 }
00074 
00075 void Startup::update(const KStartupInfoData& data)
00076 {
00077     d->data.update(data);
00078     emit changed();
00079 }
00080 
00081 KStartupInfoId Startup::id() const
00082 {
00083     return d->id;
00084 }
00085 
00086 void Startup::addWindowMatch(WId window)
00087 {
00088     d->windowMatches.insert(window);
00089 }
00090 
00091 bool Startup::matchesWindow(WId window) const
00092 {
00093     return d->windowMatches.contains(window);
00094 }
00095 
00096 } // TaskManager namespace
00097 
00098 
00099 #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
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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