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

« back to all changes in this revision

Viewing changes to languages/cpp/app_templates/opietoday/exampleplugin.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
 
 
2
 
#include "%{APPNAMELC}.h"
3
 
 
4
 
%{APPNAME}::%{APPNAME}() {
5
 
    m_widget = 0l;
6
 
}
7
 
 
8
 
%{APPNAME}::~%{APPNAME}() {
9
 
    delete (%{APPNAME}Widget*)m_widget;
10
 
}
11
 
 
12
 
QString %{APPNAME}::pluginName() const {
13
 
    return QObject::tr( "%{APPNAME}" );
14
 
}
15
 
 
16
 
double %{APPNAME}::versionNumber() const {
17
 
    return 0.1;
18
 
}
19
 
 
20
 
// this sets the image that will be shown on the left side of the plugin
21
 
QString %{APPNAME}::pixmapNameWidget() const {
22
 
    return QString::fromLatin1("%{APPNAMELC}/%{APPNAMELC}");
23
 
}
24
 
 
25
 
QWidget* %{APPNAME}::widget( QWidget * wid ) {
26
 
    if(!m_widget) {
27
 
        m_widget = new %{APPNAME}Widget( wid,  "%{APPNAME}" );
28
 
    }
29
 
    return m_widget;
30
 
}
31
 
 
32
 
 
33
 
// that would be the icon of the config widget in todays config view
34
 
QString %{APPNAME}::pixmapNameConfig() const {
35
 
    return 0l;
36
 
}
37
 
 
38
 
// No config widget yet, look at the datebook plugin for an example of that
39
 
TodayConfigWidget* %{APPNAME}::configWidget( QWidget* /*parent*/ ) {
40
 
    return 0l;
41
 
}
42
 
 
43
 
// add the binary name of the app to launch here
44
 
QString %{APPNAME}::appName() const {
45
 
    return QString::null;
46
 
}
47
 
 
48
 
// if the plugin should be excluded form the refresh cycles that can be set in the today app
49
 
bool %{APPNAME}::excludeFromRefresh() const {
50
 
    return false;
51
 
}
52
 
 
53
 
void %{APPNAME}::refresh()  {
54
 
    if ( m_widget )  {
55
 
        m_widget->refresh();
56
 
    }
57
 
}
58
 
 
59
 
void %{APPNAME}::reinitialize()  {
60
 
}