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

« back to all changes in this revision

Viewing changes to languages/cpp/app_templates/khello2/widget.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2006-05-23 18:39:42 UTC
  • Revision ID: james.westby@ubuntu.com-20060523183942-hucifbvh68k2bwz7
Tags: upstream-3.3.2
Import upstream version 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%{CPP_TEMPLATE}
 
2
 
 
3
#include <qlabel.h>
 
4
 
 
5
#include "%{APPNAMELC}widget.h"
 
6
 
 
7
%{APPNAME}Widget::%{APPNAME}Widget(QWidget* parent, const char* name, WFlags fl)
 
8
        : %{APPNAME}WidgetBase(parent,name,fl)
 
9
{}
 
10
 
 
11
%{APPNAME}Widget::~%{APPNAME}Widget()
 
12
{}
 
13
 
 
14
/*$SPECIALIZATION$*/
 
15
void %{APPNAME}Widget::button_clicked()
 
16
{
 
17
    if ( label->text().isEmpty() )
 
18
    {
 
19
        label->setText( "Hello World!" );
 
20
    }
 
21
    else
 
22
    {
 
23
        label->clear();
 
24
    }
 
25
}
 
26
 
 
27
 
 
28
 
 
29
#include "%{APPNAMELC}widget.moc"
 
30