b6756a34cf4543701c2cb6dc059333bd823bc4cf
[quassel.git] / src / qtopia / example.cpp
1 /****************************************************************************
2 **
3 ** Copyright (C) 2000-$THISYEAR$ $TROLLTECH$. All rights reserved.
4 **
5 ** This file is part of the $MODULE$ of the Qtopia Toolkit.
6 **
7 ** $TROLLTECH_DUAL_LICENSE$
8 **
9 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 **
12 ****************************************************************************/
13
14 #include "example.h"
15 #include <qpushbutton.h>
16
17 ExampleBase::ExampleBase( QWidget *parent, Qt::WFlags f )
18     : QWidget( parent, f )
19 {
20     setupUi( this );
21 }
22
23 ExampleBase::~ExampleBase()
24 {
25 }
26
27 /* 
28  *  Constructs a Example which is a child of 'parent', with the 
29  *  name 'name' and widget flags set to 'f' 
30  */
31 Example::Example( QWidget *parent, Qt::WFlags f )
32     : ExampleBase( parent, f )
33 {
34     connect(quit, SIGNAL(clicked()), this, SLOT(goodBye()));
35 }
36
37 /*  
38  *  Destroys the object and frees any allocated resources
39  */
40 Example::~Example()
41 {
42     // no need to delete child widgets, Qt does it all for us
43 }
44
45 /*
46  *  A simple slot... not very interesting.
47  */
48 void Example::goodBye()
49 {
50     close();
51 }
52