kwave  18.07.70
AboutPlugin.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  AboutPlugin.cpp - plugin that shows the Kwave's about dialog
3  -------------------
4  begin : Sun Oct 29 2000
5  copyright : (C) 2000 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "config.h"
19 #include <errno.h>
20 
21 #include <KLocalizedString>
22 
23 #include "libkwave/Plugin.h"
24 #include "libkwave/PluginManager.h"
25 
26 #include "AboutDialog.h"
27 #include "AboutPlugin.h"
28 
29 KWAVE_PLUGIN(about, AboutPlugin)
30 
31 //***************************************************************************
32 Kwave::AboutPlugin::AboutPlugin(QObject *parent, const QVariantList &args)
33  :Kwave::Plugin(parent, args)
34 {
35 }
36 
37 //***************************************************************************
38 int Kwave::AboutPlugin::start(QStringList& params)
39 {
40  Q_UNUSED(params);
41 
42  // create a new "about" dialog and show it
44  parentWidget(),
45  manager().pluginInfoList()
46  );
47  Q_ASSERT(dlg);
48  if (!dlg) return ENOMEM;
49  dlg->exec();
50  delete dlg;
51 
52  return 0;
53 }
54 
55 //***************************************************************************
56 #include "AboutPlugin.moc"
57 //***************************************************************************
58 //***************************************************************************
Definition: App.h:33
QWidget * parentWidget() const
Definition: Plugin.cpp:450
virtual int start(QStringList &params) Q_DECL_OVERRIDE
Definition: AboutPlugin.cpp:38
Kwave::PluginManager & manager() const
Definition: Plugin.cpp:437
#define KWAVE_PLUGIN(name, class)
Definition: Plugin.h:54