summaryrefslogtreecommitdiffstats
path: root/kmrml/kmrml/kcontrol/indextest.cpp
blob: 9571a88fd67c07cabe3e713efde01cb0af7c0f01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "indexer.h"
#include <kmrml_config.h>
#include "indextest.moc"

#include <kapplication.h>
#include <kconfig.h>
#include <kglobal.h>

using namespace KMrmlConfig;

IndexTest::IndexTest()
{
    KMrml::Config *config = new KMrml::Config( TDEGlobal::config() );
    Indexer *indexer = new Indexer( *config, this );
    connect( indexer, TQT_SIGNAL( finished( bool )), TQT_SLOT( slotFinished( bool )));
    connect( indexer, TQT_SIGNAL( progress( int, const TQString& )),
             TQT_SLOT( slotProgress( int, const TQString& )));

    indexer->startIndexing( "/home/gis/testcoll" );
}

IndexTest::~IndexTest()
{

}

void IndexTest::slotFinished( bool success )
{
    tqDebug("##### FINISHED: %i", success );
}

void IndexTest::slotProgress( int percent, const TQString& message )
{
    tqDebug("--- progress: %i: %s", percent, message.latin1());
}

int main( int argc, char **argv )
{
    TDEApplication app( argc, argv, "indextest" );
    IndexTest *test = new IndexTest();

    return app.exec();
}