You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.0 KiB
35 lines
1.0 KiB
15 years ago
|
#include <kiconloader.h>
|
||
14 years ago
|
#include <tqdatetime.h>
|
||
15 years ago
|
#include <stdio.h>
|
||
|
#include <kapplication.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <kdebug.h>
|
||
|
|
||
|
int main(int argc, char *argv[])
|
||
|
{
|
||
|
KApplication app(argc,argv,"kiconloadertest"/*,false,false*/);
|
||
|
|
||
|
KIconLoader * mpLoader = KGlobal::iconLoader();
|
||
|
KIcon::Context mContext = KIcon::Application;
|
||
14 years ago
|
TQTime dt;
|
||
15 years ago
|
dt.start();
|
||
|
int count = 0;
|
||
|
for ( int mGroup = 0; mGroup < KIcon::LastGroup ; ++mGroup )
|
||
|
{
|
||
|
kdDebug() << "queryIcons " << mGroup << "," << mContext << endl;
|
||
14 years ago
|
TQStringList filelist=mpLoader->queryIcons(mGroup, mContext);
|
||
15 years ago
|
kdDebug() << " -> found " << filelist.count() << " icons." << endl;
|
||
|
int i=0;
|
||
14 years ago
|
for(TQStringList::Iterator it = filelist.begin();
|
||
15 years ago
|
it != filelist.end() /*&& i<10*/;
|
||
|
++it, ++i )
|
||
|
{
|
||
|
//kdDebug() << ( i==9 ? "..." : (*it) ) << endl;
|
||
|
mpLoader->loadIcon( (*it), (KIcon::Group)mGroup );
|
||
|
++count;
|
||
|
}
|
||
|
}
|
||
|
kdDebug() << "Loading " << count << " icons took " << (float)(dt.elapsed()) / 1000 << " seconds" << endl;
|
||
|
}
|
||
|
|