summaryrefslogtreecommitdiff
path: root/noncore/tools/calc2/simple/simplefactory.cpp
Unidiff
Diffstat (limited to 'noncore/tools/calc2/simple/simplefactory.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/calc2/simple/simplefactory.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/noncore/tools/calc2/simple/simplefactory.cpp b/noncore/tools/calc2/simple/simplefactory.cpp
new file mode 100644
index 0000000..515418f
--- a/dev/null
+++ b/noncore/tools/calc2/simple/simplefactory.cpp
@@ -0,0 +1,51 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** GNU General Public License version 2 as published by the Free Software
10** Foundation and appearing in the file LICENSE.GPL included in the
11** packaging of this file.
12**
13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15**
16** See http://www.trolltech.com/gpl/ for GPL licensing information.
17**
18** Contact info@trolltech.com if any conditions of this licensing are
19** not clear to you.
20**
21**********************************************************************/
22
23#include "simplefactory.h"
24#include "simpleimpl.h"
25#include <engine.h>
26
27QWidget *SimpleInterface::getPlugin ( Engine *e, QWidget *parent ) {
28 if ( !input )
29 input = new FormSimpleImpl ( e, parent );
30 return input;
31}
32
33#ifndef QT_NO_COMPONENT
34QRESULT SimpleInterface::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
35{
36 *iface = 0;
37 if ( uuid == IID_QUnknown )
38 *iface = this;
39 else if ( uuid == IID_Calc )
40 *iface = this;
41
42 if ( *iface )
43 (*iface)->addRef();
44 return QS_OK;
45}
46
47Q_EXPORT_INTERFACE()
48{
49 Q_CREATE_INSTANCE( SimpleInterface )
50}
51#endif