1/*******************************************************************
2* systeminformation.h
3* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
4*
5* This program is free software; you can redistribute it and/or
6* modify it under the terms of the GNU General Public License as
7* published by the Free Software Foundation; either version 2 of
8* the License, or (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <http://www.gnu.org/licenses/>.
17*
18******************************************************************/
19
20#ifndef SYSTEMINFORMATION__H
21#define SYSTEMINFORMATION__H
22
23#include <QtCore/QObject>
24
25class SystemInformation: public QObject
26{
27 Q_OBJECT
28 public:
29 explicit SystemInformation(QObject * parent = 0);
30 ~SystemInformation();
31
32 QString bugzillaPlatform() const;
33 void setBugzillaPlatform(const QString &);
34
35 QString operatingSystem() const;
36 QString bugzillaOperatingSystem() const;
37
38 QString lsbRelease() const;
39
40 bool compiledSources() const;
41 void setCompiledSources(bool);
42
43 QString kdeVersion() const;
44 QString qtVersion() const;
45
46 private Q_SLOTS:
47 void lsbReleaseFinished();
48
49 private:
50 QString fetchOSBasicInformation() const;
51 QString fetchOSDetailInformation() const;
52 QString fetchOSReleaseInformation() const;
53
54 QString guessBugzillaPlatform(const QString&) const;
55
56 void tryToSetBugzillaPlatform();
57 void tryToSetBugzillaPlatformFromExternalInfo();
58
59 QString m_operatingSystem;
60 QString m_bugzillaOperatingSystem;
61 QString m_bugzillaPlatform;
62
63 QString m_lsbRelease;
64
65 bool m_compiledSources;
66};
67
68#endif
69