Logo Search packages:      
Sourcecode: kamefu version File versions

system.cpp

/*
    system.cpp - Base class for system plugin.

    Copyright (c) 2005      by Michaƫl Larouche       <michael.larouche@kdemail.net>

    *************************************************************************
    *                                                                       *
    * 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.                                   *
    *                                                                       *
    *************************************************************************
*/
#include "system.h"

// Qt includes
#include <qstringlist.h>

// KDE include
#include <kplugininfo.h>


namespace Kamefu 
{

class System::Private
{
public:
      QStringList systemMimeTypes;
      KPluginInfo *info;
};

System::System(QObject *parent, const char *name)
 : QObject(parent, name), d(new Private())
{
}


System::~System()
{
      delete d;
}

00045 QStringList System::getRegistredSystemMimeTypes() const
{
      return d->systemMimeTypes;
}

00050 void System::registerSystemMimeType(const QString &mimeType)
{
      d->systemMimeTypes.append(mimeType);
}

00055 void System::setPluginInfo(KPluginInfo *info)
{
      d->info = info;
}

00060 QString System::displayName() const
{
      QString displayName = d->info->property( QString::fromUtf8("X-Kamefu-System-DisplayName") ).toString();

      return displayName;
}

}

#include "system.moc"

Generated by  Doxygen 1.6.0   Back to index