~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to languages/cpp/app_templates/opieapp/example.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "%{APPNAMELC}.h"
2
 
#include <qpushbutton.h>
3
 
#include <opie/oapplicationfactory.h>
4
 
 
5
 
typedef OApplicationFactory<%{APPNAME}> %{APPNAME}Factory;
6
 
OPIE_EXPORT_APP( %{APPNAME}Factory )
7
 
 
8
 
/*
9
 
 *  Constructs a %{APPNAME} which is a child of 'parent', with the
10
 
 *  name 'name' and widget flags set to 'f'
11
 
 */
12
 
%{APPNAME}::%{APPNAME}( QWidget* parent,  const char* name, WFlags fl )
13
 
    : %{APPNAME}Base( parent, name, fl )
14
 
{
15
 
    connect(quit, SIGNAL(clicked()), this, SLOT(goodBye()));
16
 
}
17
 
 
18
 
/*
19
 
 *  Destroys the object and frees any allocated resources
20
 
 */
21
 
%{APPNAME}::~%{APPNAME}()
22
 
{
23
 
    // no need to delete child widgets, Qt does it all for us
24
 
}
25
 
 
26
 
/*
27
 
 *  A simple slot... not very interesting.
28
 
 */
29
 
void %{APPNAME}::goodBye()
30
 
{
31
 
    close();
32
 
}