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

« back to all changes in this revision

Viewing changes to languages/cpp/app_templates/kpartapp/app.h

  • 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
 
#ifndef _%{APPNAMEUC}_H_
3
 
#define _%{APPNAMEUC}_H_
4
 
 
5
 
#ifdef HAVE_CONFIG_H
6
 
#include <config.h>
7
 
#endif
8
 
 
9
 
#include <kapplication.h>
10
 
#include <kparts/mainwindow.h>
11
 
 
12
 
class KToggleAction;
13
 
 
14
 
/**
15
 
 * This is the application "Shell".  It has a menubar, toolbar, and
16
 
 * statusbar but relies on the "Part" to do all the real work.
17
 
 *
18
 
 * @short Application Shell
19
 
 * @author %{AUTHOR} <%{EMAIL}>
20
 
 * @version %{VERSION}
21
 
 */
22
 
class %{APPNAME} : public KParts::MainWindow
23
 
{
24
 
    Q_OBJECT
25
 
public:
26
 
    /**
27
 
     * Default Constructor
28
 
     */
29
 
    %{APPNAME}();
30
 
 
31
 
    /**
32
 
     * Default Destructor
33
 
     */
34
 
    virtual ~%{APPNAME}();
35
 
 
36
 
    /**
37
 
     * Use this method to load whatever file/URL you have
38
 
     */
39
 
    void load(const KURL& url);
40
 
 
41
 
protected:
42
 
    /**
43
 
     * This method is called when it is time for the app to save its
44
 
     * properties for session management purposes.
45
 
     */
46
 
    void saveProperties(KConfig *);
47
 
 
48
 
    /**
49
 
     * This method is called when this app is restored.  The KConfig
50
 
     * object points to the session management config file that was saved
51
 
     * with @ref saveProperties
52
 
     */
53
 
    void readProperties(KConfig *);
54
 
 
55
 
private slots:
56
 
    void fileNew();
57
 
    void fileOpen();
58
 
    void optionsShowToolbar();
59
 
    void optionsShowStatusbar();
60
 
    void optionsConfigureKeys();
61
 
    void optionsConfigureToolbars();
62
 
 
63
 
    void applyNewToolbarConfig();
64
 
 
65
 
private:
66
 
    void setupAccel();
67
 
    void setupActions();
68
 
 
69
 
private:
70
 
    KParts::ReadWritePart *m_part;
71
 
 
72
 
    KToggleAction *m_toolbarAction;
73
 
    KToggleAction *m_statusbarAction;
74
 
};
75
 
 
76
 
#endif // _%{APPNAMEUC}_H_