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

« back to all changes in this revision

Viewing changes to skrooge_dashboard/skgdashboardpluginwidget.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2010-02-07 19:00:01 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20100207190001-apq0bzl80p0tyr8s
Tags: 0.6.0-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***************************************************************************
2
 
 *   Copyright (C) 2008 by S. MANKOWSKI / G. DE BURE skrooge@miraks.com    *
 
2
 *   Copyright (C) 2008 by S. MANKOWSKI / G. DE BURE skrooge@mankowski.fr  *
3
3
 *                                                                         *
4
4
 *   This program is free software; you can redistribute it and/or modify  *
5
5
 *   it under the terms of the GNU General Public License as published by  *
22
22
* @author Stephane MANKOWSKI
23
23
*/
24
24
#include "ui_skgdashboardpluginwidget_base.h"
25
 
#include "skgtabwidget.h"
 
25
#include "skgtabpage.h"
26
26
 
27
27
#include <QGridLayout>
 
28
#include <QList>
 
29
#include <QStringList>
28
30
 
 
31
class KMenu;
 
32
class QSpacerItem;
 
33
class SKGInterfacePlugin;
29
34
 
30
35
/**
31
36
 * A dashboard for skrooge
32
37
 */
33
 
class SKGDashboardPluginWidget : public SKGTabWidget
 
38
class SKGDashboardPluginWidget : public SKGTabPage
34
39
{
35
40
        Q_OBJECT
36
41
 
38
43
        /**
39
44
         * Default Constructor
40
45
         */
41
 
        SKGDashboardPluginWidget(SKGMainPanel* iParent, SKGDocument* iDocument);
 
46
        SKGDashboardPluginWidget(SKGDocument* iDocument);
42
47
 
43
48
        /**
44
49
         * Default Destructor
61
66
        virtual void setState(const QString& iState);
62
67
 
63
68
        /**
 
69
         * Get attribute name to save the default state
 
70
         * MUST BE OVERWRITTEN
 
71
         * @return attribute name to save the default state.
 
72
         */
 
73
        virtual QString getDefaultStateAttribute();
 
74
 
 
75
        /**
64
76
         * Get the widget must be printed
65
77
         * @return a widget
66
78
         */
73
85
        virtual void refresh();
74
86
 
75
87
private slots:
76
 
 
 
88
        void showHeaderMenu ( const QPoint& pos );
 
89
        void onAddWidget();
 
90
        void onRemoveWidget();
 
91
        void onColumnNbChanged();
 
92
        void onMoveAfterWidget();
 
93
        void onMoveBeforeWidget();
77
94
 
78
95
private:
79
96
        Q_DISABLE_COPY(SKGDashboardPluginWidget);
80
97
 
 
98
        void addItem(SKGInterfacePlugin* iDashboard, int iIndex, const QString& iState="");
 
99
 
81
100
        Ui::skgdashboardplugin_base ui;
82
101
        QGridLayout* gridLayout;
 
102
        QSpacerItem* hSpacer;
 
103
        QSpacerItem* vSpacer;
 
104
 
 
105
        QStringList items;
 
106
        QList<SKGWidget*> itemsPointers;;
 
107
        KMenu* menu;
 
108
        QMenu* addMenu;
 
109
        QMenu* removeMenu;
 
110
        QMenu* previousMenu;
 
111
        QMenu* nextMenu;
 
112
        int col;
 
113
        int row;
 
114
        int nbMaxCol;
83
115
};
84
116
 
85
117
#endif // SKGDASHBOARDPLUGINWIDGET_H