Now the systrayicon change it's color when a download is in progress. I simply change...
[kdenetwork.git] / kdict / application.cpp
blob28e3a39878dd0ec19c26766a958b0c92bccfd06e
1 /* -------------------------------------------------------------
3 application.cpp (part of The KDE Dictionary Client)
5 Copyright (C) 2000-2001 Christian Gebauer <gebauer@kde.org>
7 This file is distributed under the Artistic License.
8 See LICENSE for details.
10 ------------------------------------------------------------- */
12 #include <kwin.h>
13 #include <kdebug.h>
14 #include <kcmdlineargs.h>
16 #include "application.h"
17 #include "toplevel.h"
20 Application::Application()
21 : KUniqueApplication()
23 m_mainWindow = new TopLevel( 0, "mainWindow" );
27 Application::~Application()
29 delete m_mainWindow;
33 int Application::newInstance()
35 kdDebug(5004) << "Application::newInstance()" << endl;
36 KUniqueApplication::newInstance();
38 // process parameters...
39 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
41 m_mainWindow->show();
43 if (args->isSet("clipboard"))
45 m_mainWindow->defineClipboard();
47 else
49 if (args->count()>0)
51 QString phrase;
52 for (int i=0;i<args->count();i++)
54 phrase += QString::fromLocal8Bit(args->arg(i));
55 if (i+1 < args->count())
56 phrase += " ";
58 m_mainWindow->define(phrase);
60 else
62 m_mainWindow->normalStartup();
66 return 0;
69 //--------------------------------
71 #include "application.moc"