1
1
/*************************************************************************
2
* Copyright 2009 Sandro Andrade sandroandrade@kde.org *
2
* Copyright 2009-2010 Sandro Andrade sandroandrade@kde.org *
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>
26
26
#include <Plasma/PopupApplet>
27
#include <Plasma/DataEngine>
30
32
class QGraphicsLinearLayout;
33
class QGraphicsItemAnimation;
33
35
class IViewProvider;
34
36
class KdeObservatoryConfigViews;
35
37
class KdeObservatoryConfigGeneral;
64
68
bool eventFilter(QObject *receiver, QEvent *event);
65
69
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
72
void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data);
76
void engineError(const QString &source, const QString &error);
77
void setBusy(bool value);
68
80
void createConfigurationInterface(KConfigDialog *parent);
69
81
void configAccepted();
70
void collectFinished();
71
83
void moveViewRight();
72
84
void moveViewLeft();
73
85
void moveViewRightClicked();
74
86
void moveViewLeftClicked();
75
87
void switchViews(int delta);
88
void timeLineFinished();
79
void prepareUpdateViews();
80
92
void updateViews();
86
98
KConfigGroup m_configGroup;
88
KdeObservatoryConfigGeneral *m_configGeneral;
100
KdeObservatoryConfigGeneral *m_configGeneral;
89
101
KdeObservatoryConfigProjects *m_configProjects;
90
KdeObservatoryConfigViews *m_configViews;
102
KdeObservatoryConfigViews *m_configViews;
92
104
// Config - General
94
int m_synchronizationDelay;
105
int m_activityRangeType;
107
QString m_commitFrom;
95
109
bool m_cacheContents;
96
110
bool m_enableAutoViewChange;
122
136
Plasma::PushButton *m_right;
123
137
Plasma::PushButton *m_left;
139
// View providers and data
126
140
QMap<QString, IViewProvider *> m_viewProviders;
128
142
QList<QGraphicsWidget *> m_views;
129
144
int m_currentView;
131
146
QTimer *m_viewTransitionTimer;
132
QTimer *m_synchronizationTimer;
133
147
QTimeLine *m_transitionTimer;
149
QGraphicsItemAnimation *m_animationPrevious;
150
QGraphicsItemAnimation *m_animationNew;
136
QMap<QString, ICollector *> m_collectors;
137
int m_collectorsFinished;
152
Plasma::DataEngine *m_engine;
153
Plasma::Service *m_service;
158
typedef QMultiMap<int, QString> RankValueMap;
159
typedef QMapIterator<int, QString> RankValueMapIterator;
160
Q_DECLARE_METATYPE(RankValueMap)
162
typedef QList< QPair<QString, int> > DateCommitList;
163
Q_DECLARE_METATYPE(DateCommitList)
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)
170
typedef QMap<QString, QStringList> FileTypeKrazyReportMap;