1
/***************************************************************************
2
* Copyright (C) 2008 by S. MANKOWSKI / G. DE BURE skrooge@miraks.com *
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. *
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. *
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
20
* A dashboard for skrooge.
22
* @author Stephane MANKOWSKI
24
#include "skginterfaceplugin.h"
25
#include "ui_skgdashboardpluginwidget_pref.h"
28
#include <QVariantList>
29
#include <kgenericfactory.h>
34
* A dashboard for skrooge
36
class SKGDashboardPlugin : public SKGInterfacePlugin
39
Q_INTERFACES(SKGInterfacePlugin);
45
SKGDashboardPlugin(QObject* iParent, const QVariantList& iArg);
50
virtual ~SKGDashboardPlugin();
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
58
virtual void setupActions(SKGMainPanel* iParent, SKGDocument* iDocument, const QStringList& iArgument);
61
* Must be modified to close properly the plugin.
66
* Must be modified to refresh widgets after a modification.
68
virtual void refresh();
71
* The preference widget of the plugin.
72
* @return The preference widget of the plugin
74
virtual QWidget* getPreferenceWidget();
77
* The preference skeleton of the plugin.
78
* @return The preference skeleton of the plugin
80
virtual KConfigSkeleton* getPreferenceSkeleton();
83
* The context widget of the plugin.
84
* @return The context widget of the plugin
86
virtual SKGTabWidget* getWidget();
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.
94
virtual SKGError savePreferences() const;
97
* The title of the plugin.
98
* @return The title of the plugin
100
virtual QString title() const;
103
* The icon of the plugin.
104
* @return The icon of the plugin
106
virtual QString icon() const;
109
* The statusTip of the plugin.
110
* @return The toolTip of the plugin
112
virtual QString statusTip () const;
115
* The toolTip of the plugin.
116
* @return The toolTip of the plugin
118
virtual QString toolTip () const;
121
* The tips list of the plugin.
122
* @return The tips list of the plugin
124
virtual QStringList tips() const;
127
* Must be implemented to set the position of the plugin.
128
* @return integer value between 0 and 999 (default = 999)
130
virtual int getOrder() const;
133
* Must be implemented to know if a plugin must be display in context chooser.
134
* @return true of false (default = false)
136
virtual bool isInContext() const;
141
Q_DISABLE_COPY(SKGDashboardPlugin);
143
SKGMainPanel *parent;
144
SKGDocument* currentBankDocument;
146
Ui::skgdashboardplugin_pref ui;
149
#endif // SKGDASHBOARDPLUGIN_H