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 ------------------------------------------------------------- */
14 #include <kcmdlineargs.h>
16 #include "application.h"
20 Application::Application()
21 : KUniqueApplication()
23 m_mainWindow
= new TopLevel( 0, "mainWindow" );
27 Application::~Application()
33 int Application::newInstance()
35 kdDebug(5004) << "Application::newInstance()" << endl
;
36 KUniqueApplication::newInstance();
38 // process parameters...
39 KCmdLineArgs
*args
= KCmdLineArgs::parsedArgs();
43 if (args
->isSet("clipboard"))
45 m_mainWindow
->defineClipboard();
52 for (int i
=0;i
<args
->count();i
++)
54 phrase
+= QString::fromLocal8Bit(args
->arg(i
));
55 if (i
+1 < args
->count())
58 m_mainWindow
->define(phrase
);
62 m_mainWindow
->normalStartup();
69 //--------------------------------
71 #include "application.moc"