~ubuntu-branches/ubuntu/intrepid/kdesdk/intrepid-updates

« back to all changes in this revision

Viewing changes to kapptemplate/kpartapp/app.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-05-28 10:11:43 UTC
  • mto: This revision was merged to the branch mainline in revision 37.
  • Revision ID: james.westby@ubuntu.com-20080528101143-gzc3styjz1b70zxu
Tags: upstream-4.0.80
ImportĀ upstreamĀ versionĀ 4.0.80

Show diffs side-by-side

added added

removed removed

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