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 ------------------------------------------------------------- */
13 #include <kcmdlineargs.h>
15 #include "application.h"
19 Application::Application()
20 : KUniqueApplication()
22 m_mainWindow
= new TopLevel();
26 Application::~Application()
32 int Application::newInstance()
34 kDebug(5004) << "Application::newInstance()" << endl
;
35 KUniqueApplication::newInstance();
37 // process parameters...
38 KCmdLineArgs
*args
= KCmdLineArgs::parsedArgs();
42 if (args
->isSet("clipboard"))
44 m_mainWindow
->defineClipboard();
51 for (int i
=0;i
<args
->count();i
++)
53 phrase
+= QString::fromLocal8Bit(args
->arg(i
));
54 if (i
+1 < args
->count())
57 m_mainWindow
->define(phrase
);
61 m_mainWindow
->normalStartup();
68 //--------------------------------
70 #include "application.moc"