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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
// kView -- Qt-toolkit based Graphic viewer for the KDE project.
//
// Sirtaj Kang, Oct '96.
//
// $Id: main.cpp,v 1.8 1998/03/09 20:26:01 kulow Exp $
//#include <qslider.h>
#include "fileman.h"
#include "wview.h"
#include "confighandler.h"
#include <qimage.h>
#include <stdio.h>
//QStrList fileList;
KApplication *theApp;
int main(int argc, char **argv)
{
int i=0;
KApplication a(argc, argv, "kview");
theApp = &a;
//KVConfigHandler::setConfigEntry("General","Cache",3);
//i=(int)KVConfigHandler::getConfigEntry("General","Cache");
//printf("%d\n",i);
KVConfigHandler::readConfigEntries();
if ( qApp->argc() > 1 )
{
i=1;
while ( i < qApp->argc() )
{
QString f = qApp->argv()[i];
if (i==1)
{
/* if ( f.find( ":/" ) == -1 && f.left(1) != "/" )
{
char buffer[ 1024 ];
getcwd( buffer, 1023 );
f.sprintf( "%s/%s", buffer, argv[i] );
}*/
}
// VERY UGLY HACK, I don't have time to make it better
if ( f != "Image Viewer" && f != "-caption" && f != "%u" && f != "%c" )
Fileman::appendFileList(QString(qApp->argv()[i]));
i++;
}
}
Fileman *man = new Fileman(0L,0L);
man->show();
man->firstClicked();
int retval = theApp->exec();
// KVConfigHandler::writeConfigEntries();
return retval;
}
|