2 #include <tdeapplication.h> 4 #include <tdecmdlineargs.h> 5 #include <tdeaboutdata.h> 8 #include "mainwindow.h" 13 const char* description = I18N_NOOP( "TDE Time tracker tool"); 17 kdDebug(5970) << i18n( "Just caught a software interrupt.") << endl; 22 static const TDECmdLineOptions options[] = 24 { "+file", I18N_NOOP( "The iCalendar file to open" ), 0 }, 28 int main( int argc, char *argv[] ) 30 TDEAboutData aboutData( "karm", I18N_NOOP( "KArm"), 31 KARM_VERSION, description, TDEAboutData::License_GPL, 32 "(c) 1997-2004, KDE PIM Developers" ); 34 aboutData.addAuthor( "Mark Bucciarelli", I18N_NOOP( "Current Maintainer" ), 35 "mark@hubcapconsulting.com" ); 36 aboutData.addAuthor( "Sirtaj Singh Kang", I18N_NOOP( "Original Author" ), 38 aboutData.addAuthor( "Allen Winter", 0, "winterz@verizon.net" ); 39 aboutData.addAuthor( "David Faure", 0, "faure@kde.org" ); 40 aboutData.addAuthor( "Espen Sand", 0, "espen@kde.org" ); 41 aboutData.addAuthor( "Gioele Barabucci", 0, "gioele@gioelebarabucci.com" ); 42 aboutData.addAuthor( "Jan Schaumann", 0, "jschauma@netmeister.org" ); 43 aboutData.addAuthor( "Jesper Pedersen", 0, "blackie@kde.org" ); 44 aboutData.addAuthor( "Kalle Dalheimer", 0, "kalle@kde.org" ); 45 aboutData.addAuthor( "Scott Monachello", 0, "smonach@cox.net" ); 46 aboutData.addAuthor( "Thorsten Staerk", 0, "kde@staerk.de" ); 47 aboutData.addAuthor( "Tomas Pospisek", 0, "tpo_deb@sourcepole.ch" ); 48 aboutData.addAuthor( "Willi Richert", 0, "w.richert@gmx.net" ); 50 TDECmdLineArgs::init( argc, argv, &aboutData ); 51 TDECmdLineArgs::addCmdLineOptions( options ); 54 TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); 57 if ( args->count() > 0 ) 59 TQString icsfile = TQString::fromLocal8Bit( args->arg( 0 ) ); 61 if ( icsfile.startsWith( "/" ) 62 || icsfile.lower().startsWith( "http://" ) 63 || icsfile.lower().startsWith( "ftp://" ) 71 icsfile = TDECmdLineArgs::cwd() + "/" + icsfile; 80 myApp.setMainWidget( mainWindow ); 82 if (kapp->isRestored() && TDEMainWindow::canBeRestored( 1 )) 83 mainWindow->restore( 1, false ); 87 signal( SIGQUIT, cleanup ); 88 signal( SIGINT, cleanup ); 89 int ret = myApp.exec(); Main window to tie the application together.
|