~ubuntu-branches/ubuntu/oneiric/kdeplasma-addons/oneiric

« back to all changes in this revision

Viewing changes to applets/kdeobservatory/src/kdeobservatory.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2010-05-25 09:50:14 UTC
  • mto: (0.4.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 68.
  • Revision ID: james.westby@ubuntu.com-20100525095014-e3cebfkdenjrx3xg
Tags: upstream-4.4.80
ImportĀ upstreamĀ versionĀ 4.4.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*************************************************************************
2
 
 * Copyright 2009 Sandro Andrade sandroandrade@kde.org                   *
 
2
 * Copyright 2009-2010 Sandro Andrade sandroandrade@kde.org              *
3
3
 *                                                                       *
4
4
 * This program is free software; you can redistribute it and/or         *
5
5
 * modify it under the terms of the GNU General Public License as        *
24
24
#include <KConfigGroup>
25
25
 
26
26
#include <Plasma/PopupApplet>
 
27
#include <Plasma/DataEngine>
27
28
 
28
29
class QTimer;
29
30
class QTimeLine;
 
31
class QNetworkReply;
30
32
class QGraphicsLinearLayout;
 
33
class QGraphicsItemAnimation;
31
34
 
32
 
class ICollector;
33
35
class IViewProvider;
34
36
class KdeObservatoryConfigViews;
35
37
class KdeObservatoryConfigGeneral;
39
41
{
40
42
    class Label;
41
43
    class Meter;
 
44
    class Engine;
42
45
    class PushButton;
43
46
}
44
47
 
50
53
    ~KdeObservatory();
51
54
 
52
55
    void init();
 
56
 
53
57
    virtual QGraphicsWidget* graphicsWidget();
54
58
 
55
59
    struct Project
64
68
    bool eventFilter(QObject *receiver, QEvent *event);
65
69
    bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
66
70
 
 
71
public Q_SLOTS:
 
72
    void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data);
 
73
 
67
74
protected Q_SLOTS:
 
75
    void safeInit();
 
76
    void engineError(const QString &source, const QString &error);
 
77
    void setBusy(bool value);
 
78
    void updateSources();
 
79
 
68
80
    void createConfigurationInterface(KConfigDialog *parent);
69
81
    void configAccepted();
70
 
    void collectFinished();
 
82
 
71
83
    void moveViewRight();
72
84
    void moveViewLeft();
73
85
    void moveViewRightClicked();
74
86
    void moveViewLeftClicked();
75
87
    void switchViews(int delta);
76
 
    void runCollectors();
 
88
    void timeLineFinished();
77
89
 
78
90
private:
79
 
    void prepareUpdateViews();
 
91
    void createViews();
80
92
    void updateViews();
81
93
    void loadConfig();
82
94
    void saveConfig();
85
97
 
86
98
    KConfigGroup m_configGroup;
87
99
 
88
 
    KdeObservatoryConfigGeneral *m_configGeneral;
 
100
    KdeObservatoryConfigGeneral  *m_configGeneral;
89
101
    KdeObservatoryConfigProjects *m_configProjects;
90
 
    KdeObservatoryConfigViews *m_configViews;
 
102
    KdeObservatoryConfigViews    *m_configViews;
91
103
 
92
104
    // Config - General
93
 
    int  m_commitExtent;
94
 
    int  m_synchronizationDelay;
 
105
    int m_activityRangeType;
 
106
    int m_commitExtent;
 
107
    QString m_commitFrom;
 
108
    QString m_commitTo;
95
109
    bool m_cacheContents;
96
110
    bool m_enableAutoViewChange;
97
111
    int  m_viewsDelay;
122
136
    Plasma::PushButton *m_right;
123
137
    Plasma::PushButton *m_left;
124
138
 
125
 
    // View providers
 
139
    // View providers and data
126
140
    QMap<QString, IViewProvider *> m_viewProviders;
127
 
 
 
141
    
128
142
    QList<QGraphicsWidget *> m_views;
 
143
 
129
144
    int m_currentView;
130
145
 
131
146
    QTimer *m_viewTransitionTimer;
132
 
    QTimer *m_synchronizationTimer;
133
147
    QTimeLine *m_transitionTimer;
 
148
    
 
149
    QGraphicsItemAnimation *m_animationPrevious;
 
150
    QGraphicsItemAnimation *m_animationNew;
134
151
 
135
 
    // Collectors
136
 
    QMap<QString, ICollector *> m_collectors;
137
 
    int m_collectorsFinished;
 
152
    Plasma::DataEngine *m_engine;
 
153
    Plasma::Service *m_service;
 
154
    
 
155
    int m_sourceCounter;
138
156
};
139
157
 
 
158
typedef QMultiMap<int, QString> RankValueMap;
 
159
typedef QMapIterator<int, QString> RankValueMapIterator;
 
160
Q_DECLARE_METATYPE(RankValueMap)
 
161
 
 
162
typedef QList< QPair<QString, int> > DateCommitList;
 
163
Q_DECLARE_METATYPE(DateCommitList)
 
164
 
 
165
//            FileType      TestName      FileName Errors
 
166
typedef QMap< QString, QMap<QString, QMap<QString, QStringList> > > KrazyReportMap;
 
167
typedef QMapIterator< QString, QMap<QString, QMap<QString, QStringList > > > KrazyReportMapIterator;
 
168
Q_DECLARE_METATYPE(KrazyReportMap)
 
169
 
 
170
typedef QMap<QString, QStringList> FileTypeKrazyReportMap;
 
171
 
140
172
#endif