Initial checkin
[opensuse:qtobs.git] / mainwindow.h
1 /*
2  *  Qt OBS - A Qt based OBS client
3  *
4  *  Copyright (C) 2010 Novell Inc, Klaas Freitag <freitag@suse.de>
5  *
6  *  This program is free software: you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation, either version 2 of the License, or
9  *  (at your option) version 3.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  *
19  *  --
20  *  Written by Klaas Freitag <freitag@suse.de>
21  *  Contributors:
22  */
23
24
25
26 #ifndef MAINWINDOW_H
27 #define MAINWINDOW_H
28
29 #include <QtGui/QMainWindow>
30 #include <QNetworkReply>
31
32 #include "obsaccess.h"
33 #include "obsbuildresults.h"
34 #include "projectresulttreewidget.h"
35 #include "statusmodel.h"
36 #include "projectresultwidget.h"
37
38 namespace Ui
39 {
40     class MainWindow;
41 }
42
43 class QNetworkReply;
44 class QUrl;
45
46 class MainWindow : public QMainWindow
47 {
48   Q_OBJECT
49
50 public:
51   MainWindow(QWidget *parent = 0);
52   ~MainWindow();
53
54   void setWorkFile( const QString& );
55 public slots:
56   void slotGetUserInfo();
57   void slotGetProjectBuildStatus();
58
59 protected slots:
60   void slotUserInfo();
61   void slotBuildStatusArrived( OBSProjectBuildResults );
62
63 private:
64   Ui::MainWindow *ui;
65   OBSAccess *mAccess;
66   ProjectResultTreeWidget *mTreeWidget;
67   StatusModel *mStatusModel;
68   ProjectResultWidget *mResultWidget;
69 };
70
71 #endif // MAINWINDOW_H