- write logfile for debugging purposes
[buliscores] / src / mainwidget.h
index 5049189..6cbd0eb 100644 (file)
@@ -5,31 +5,48 @@
 #include <QVBoxLayout>
 #include <QLabel>
 
+#include "matchdaybackend.h"
+#include "match.h"
 #include "scoretable.h"
 #include "settingsdialog.h"
+#include <phonon/mediaobject.h>
+#include <phonon/audiooutput.h>
 
 
 class MainWidget : public QWidget
 {
     Q_OBJECT
-private:
-    MatchDayModel*  m_datamodel;
-    ScoreTable*     m_scoretbl;
-    SettingsDialog* m_settingsdlg;
-
-    QVBoxLayout m_layout;
-    QLabel      m_statuslbl;
-
 public:
     explicit MainWidget(QWidget *parent = 0);
 
     void mousePressEvent(QMouseEvent* event);
 
-signals:
-
 public slots:
     void showSettingsDialog();
 
+protected slots:
+    void onBackendUpdateStarted(void);
+    void onBackendUpdateFinished(void);
+
+    void onMatchAdded(Match* match);
+    void onScoreChange();
+    void onMatchStateChanged(Match::MatchState state);
+
+private:
+    Phonon::MediaObject *m_mediaObject;
+    Phonon::AudioOutput *m_audioOutput;
+    MatchDayBackend* m_backend;
+    MatchDayModel*   m_datamodel;
+    ScoreTable*      m_scoretbl;
+    SettingsDialog*  m_settingsdlg;
+    QSettings        m_settings;
+
+    QVBoxLayout m_layout;
+    QLabel      m_statuslbl;
+
+private slots:
+    void update(void);
+
 };
 
 #endif // MAINWIDGET_H