//   TimeMon (c)  1994  Helmut Maierhofer			
//   KDE-ified M. Maierhofer 1998
//
//   maintained by Dirk A. Mueller <mueller@kde.org>

/*
 * main.cc
 *
 * Main program.
 */

#include <klocale.h>
#include <kapp.h>
#include <kcmdlineargs.h>

#include "timemon.h"


static const char *description =
	I18N_NOOP("KDE System Monitor");

static const char *version = "v0.4";


// -- main function ------------------------------------------------------

int main(int argc, char **argv)
{
    KCmdLineArgs::init(argc, argv, "ktimemon", description, version);

    KApplication* app = new KApplication(argc, argv, "ktimemon");

    KTimeMon *ktimemon = new KTimeMon();
    app->setMainWidget(ktimemon);

    ktimemon->dock("ktimemon");

    QObject::connect(app, SIGNAL(saveYourself()), ktimemon, SLOT(save()));

    int ret = app->exec();
    if (ret == 0) ktimemon->save();

    delete ktimemon;
    delete app;

    return ret;
}
