• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kded
 

kded

kmimelist.cpp
00001 #include <ktrader.h>
00002 #include <kservice.h>
00003 #include <kmimetype.h>
00004 #include <assert.h>
00005 #include <kstandarddirs.h>
00006 #include <kservicegroup.h>
00007 #include <kimageio.h>
00008 #include <kuserprofile.h>
00009 #include <kprotocolinfo.h>
00010 
00011 #include <kapplication.h>
00012 
00013 #include <stdio.h>
00014 
00015 int main(int argc, char *argv[])
00016 {
00017    KApplication k(argc,argv,"blurb",false);
00018 
00019    KMimeType::List mtl = KMimeType::allMimeTypes( );
00020    assert( mtl.count() );
00021    qDebug( "Found %d mime types.", mtl.count() );
00022    TQValueListIterator<KMimeType::Ptr> it(mtl.begin());
00023    KServiceTypeProfile::OfferList ol;
00024 
00025    for (; it != mtl.end(); ++it)
00026    {
00027      {
00028       // Application
00029       printf( "APP:%s:", (*it)->name().latin1() );
00030       ol = KServiceTypeProfile::offers((*it)->name(), "Application");
00031       TQValueListIterator<KServiceOffer> it2(ol.begin());
00032       for (; it2 != ol.end(); ++it2) {
00033         if ((*it2).allowAsDefault())
00034            printf( " %s", (*it2).service()->desktopEntryPath().ascii() );
00035 
00036       }
00037       printf( "\n" );
00038      }
00039 
00040      {
00041       // Embedded
00042       printf( "PART:%s:", (*it)->name().latin1() );
00043       ol = KServiceTypeProfile::offers((*it)->name(), "KParts/ReadOnlyPart");
00044       TQValueListIterator<KServiceOffer> it2(ol.begin());
00045       for (; it2 != ol.end(); ++it2) {
00046         if ((*it2).allowAsDefault())
00047            printf( " %s", (*it2).service()->desktopEntryPath().ascii() );
00048 
00049       }
00050       printf( "\n" );
00051      }
00052    }
00053 }
00054 

kded

Skip menu "kded"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kded

Skip menu "kded"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kded by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |