MuseScore  3.4
Music composition and notation
updatechecker.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2002-2010 Werner Schweer and others
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2.
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, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef UPDATECHECKER_H
21 #define UPDATECHECKER_H
22 
23 namespace Ms {
24 
25 //---------------------------------------------------------
26 // UpdateChecker
27 //---------------------------------------------------------
28 class UpdateCheckerBase: public QObject {
29  Q_OBJECT
30 
31 public:
32  UpdateCheckerBase(QObject* parent);
33  virtual bool hasToCheck();
34 
35 private:
36  virtual bool getUpdatePrefValue() = 0;
37  virtual QString getUpdatePrefString() = 0;
38  };
39 
41  Q_OBJECT
42 
43  QNetworkAccessManager* manager;
44  QString os;
45  QString release;
46  QString _currentVersion;
47  bool manual;
48 
49  public:
50  void check(QString,bool);
51 
52 
53  public slots:
54  void onRequestFinished(QNetworkReply*);
55 
56  private:
57  QString parseText(QXmlStreamReader&);
58  virtual bool getUpdatePrefValue();
59  virtual QString getUpdatePrefString();
60 
61  public:
62  UpdateChecker(QObject* parent);
63  };
64 
66  Q_OBJECT
67 public:
68  ExtensionsUpdateChecker(QObject* parent);
69 
70  void check();
71 private:
72  virtual bool getUpdatePrefValue();
73  virtual QString getUpdatePrefString();
74  };
75 }
76 #endif // UPDATECHECKER_H
Definition: updatechecker.h:65
virtual bool getUpdatePrefValue()=0
QString release
Definition: updatechecker.h:45
bool manual
Definition: updatechecker.h:47
QNetworkAccessManager * manager
Definition: updatechecker.h:43
Definition: aeolus.cpp:26
virtual QString getUpdatePrefString()=0
UpdateCheckerBase(QObject *parent)
Definition: updatechecker.cpp:172
Definition: updatechecker.h:28
Definition: updatechecker.h:40
QString os
Definition: updatechecker.h:44
QString _currentVersion
Definition: updatechecker.h:46
virtual bool hasToCheck()
Definition: updatechecker.cpp:182