libtaskmanager
startup.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "startup.h"
00027
00028
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 }
00097
00098
00099 #include "startup.moc"