~ubuntu-branches/ubuntu/lucid/skrooge/lucid

« back to all changes in this revision

Viewing changes to skrooge_dashboard/skgdashboardplugin.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2009-07-28 15:38:43 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090728153843-91b74m0vcam50krt
Tags: 0.2.9-0ubuntu1
* New upstream release
* Added kubuntu_01_cmake_fix.patch:
  Fix FTBFS

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2008 by S. MANKOWSKI / G. DE BURE skrooge@miraks.com    *
 
3
 *                                                                         *
 
4
 *   This program is free software; you can redistribute it and/or modify  *
 
5
 *   it under the terms of the GNU General Public License as published by  *
 
6
 *   the Free Software Foundation; either version 2 of the License, or     *
 
7
 *   (at your option) any later version.                                   *
 
8
 *                                                                         *
 
9
 *   This program is distributed in the hope that it will be useful,       *
 
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
12
 *   GNU General Public License for more details.                          *
 
13
 *                                                                         *
 
14
 *   You should have received a copy of the GNU General Public License     *
 
15
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>  *
 
16
 ***************************************************************************/
 
17
#ifndef SKGDASHBOARDPLUGIN_H
 
18
#define SKGDASHBOARDPLUGIN_H
 
19
/** @file
 
20
 * A dashboard for skrooge.
 
21
*
 
22
* @author Stephane MANKOWSKI
 
23
 */
 
24
#include "skginterfaceplugin.h"
 
25
#include "ui_skgdashboardpluginwidget_pref.h"
 
26
 
 
27
#include <QObject>
 
28
#include <QVariantList>
 
29
#include <kgenericfactory.h>
 
30
 
 
31
class SKGMainPanel;
 
32
 
 
33
/**
 
34
 * A dashboard for skrooge
 
35
 */
 
36
class SKGDashboardPlugin : public SKGInterfacePlugin
 
37
{
 
38
        Q_OBJECT
 
39
        Q_INTERFACES(SKGInterfacePlugin);
 
40
 
 
41
public:
 
42
        /**
 
43
         * Default Constructor
 
44
         */
 
45
        SKGDashboardPlugin(QObject* iParent, const QVariantList& iArg);
 
46
 
 
47
        /**
 
48
         * Default Destructor
 
49
         */
 
50
        virtual ~SKGDashboardPlugin();
 
51
 
 
52
        /**
 
53
         * Called to initialise the plugin
 
54
         * @param iParent the SKGMainPanel main panel parent
 
55
         * @param iDocument the SKGDocumentBank main document
 
56
         * @param iArgument the arguments
 
57
         */
 
58
        virtual void setupActions(SKGMainPanel* iParent, SKGDocument* iDocument, const QStringList& iArgument);
 
59
 
 
60
        /**
 
61
         * Must be modified to close properly the plugin.
 
62
         */
 
63
        virtual void close();
 
64
 
 
65
        /**
 
66
         * Must be modified to refresh widgets after a modification.
 
67
         */
 
68
        virtual void refresh();
 
69
 
 
70
        /**
 
71
        * The preference widget of the plugin.
 
72
        * @return The preference widget of the plugin
 
73
         */
 
74
        virtual QWidget* getPreferenceWidget();
 
75
 
 
76
        /**
 
77
         * The preference skeleton of the plugin.
 
78
         * @return The preference skeleton of the plugin
 
79
         */
 
80
        virtual KConfigSkeleton* getPreferenceSkeleton();
 
81
 
 
82
        /**
 
83
         * The context widget of the plugin.
 
84
         * @return The context widget of the plugin
 
85
         */
 
86
        virtual SKGTabWidget* getWidget();
 
87
 
 
88
        /**
 
89
         * This function is called when preferences have been modified. Must be used to save some parameters into the document.
 
90
         * A transaction is already opened
 
91
         * @return an object managing the error.
 
92
         *   @see SKGError
 
93
         */
 
94
        virtual SKGError savePreferences() const;
 
95
 
 
96
        /**
 
97
         * The title of the plugin.
 
98
         * @return The title of the plugin
 
99
         */
 
100
        virtual QString title() const;
 
101
 
 
102
        /**
 
103
         * The icon of the plugin.
 
104
         * @return The icon of the plugin
 
105
         */
 
106
        virtual QString icon() const;
 
107
 
 
108
        /**
 
109
         * The statusTip of the plugin.
 
110
         * @return The toolTip of the plugin
 
111
         */
 
112
        virtual QString statusTip () const;
 
113
 
 
114
        /**
 
115
         * The toolTip of the plugin.
 
116
         * @return The toolTip of the plugin
 
117
         */
 
118
        virtual QString toolTip () const;
 
119
 
 
120
        /**
 
121
         * The tips list of the plugin.
 
122
         * @return The tips list of the plugin
 
123
         */
 
124
        virtual QStringList tips() const;
 
125
 
 
126
        /**
 
127
         * Must be implemented to set the position of the plugin.
 
128
         * @return integer value between 0 and 999 (default = 999)
 
129
         */
 
130
        virtual int getOrder() const;
 
131
 
 
132
        /**
 
133
         * Must be implemented to know if a plugin must be display in context chooser.
 
134
         * @return true of false (default = false)
 
135
         */
 
136
        virtual bool isInContext() const;
 
137
 
 
138
private slots:
 
139
 
 
140
private:
 
141
        Q_DISABLE_COPY(SKGDashboardPlugin);
 
142
 
 
143
        SKGMainPanel *parent;
 
144
        SKGDocument* currentBankDocument;
 
145
 
 
146
        Ui::skgdashboardplugin_pref ui;
 
147
};
 
148
 
 
149
#endif // SKGDASHBOARDPLUGIN_H