okular/main.cpp
Daniel M. Duley f8f3331c5d KDVI now joins KGhostview as a full KParts Konq browser :) If your system
is configured properly you can open :

http://www2.jorsm.com/~mosfet/user.dvi

In Konq now and browse it :)

svn path=/trunk/kdegraphics/kdvi/; revision=32391
1999-10-31 15:03:04 +00:00

32 lines
544 B
C++

#include <kapp.h>
#include <kdvi.h>
#include <kconfig.h>
static void getOptions( int& ac, char** av )
{
if ( ac > 2 && av[1] == QString("-paper") )
av[1] = av[3], ac -= 2;
}
int main( int argc, char **argv )
{
KApplication a( argc, argv, "kdvi" );
kdvi *k;
getOptions( argc, argv );
if ( a.isRestored() && KTMainWindow::canBeRestored( 1 ) )
{
k = new kdvi();
k->restore( 1 );
}
else
k = argc==2 ? new kdvi(argv[1]) : new kdvi();
a.setMainWidget( k );
k->show();
kapp->config()->setGroup("kdvi");
return a.exec();
}