MuseScore  3.4
Music composition and notation
uploadscoredialog.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2014 Werner Schweer
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 // as published by the Free Software Foundation and appearing in
10 // the file LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __UPLOADSCOREDIALOG_H__
14 #define __UPLOADSCOREDIALOG_H__
15 
16 #include "ui_uploadscoredialog.h"
17 
18 namespace Ms {
19 
20 class LoginManager;
21 
22 //---------------------------------------------------------
23 // LoginDialog
24 //---------------------------------------------------------
25 
26 class UploadScoreDialog : public QDialog, public Ui::UploadScoreDialog
27  {
28  Q_OBJECT
29 
31  int _nid;
32  bool _newScore = true;
33  QString _url;
34 
35  void showEvent(QShowEvent*) override;
36 
37  private slots:
38  void buttonBoxClicked(QAbstractButton* button);
39  void uploadSuccess(const QString& url, const QString& nid, const QString& vid);
40  void uploadError(const QString& error);
41  void onGetScoreSuccess(const QString &title, const QString &description, bool priv, const QString& license, const QString& tags, const QString &url);
42  void onGetScoreError(const QString& error);
43  void logout();
44  void display();
45  void updateScoreData(const QString& nid, bool newScore);
46  void updateScoreData();
47  void displaySuccess();
48 
49  private:
50  void upload(int nid);
51  void clear();
52  void showOrHideUploadAudio();
53 
54  public:
56  void setTitle(const QString& t) { title->setText(t); }
57  };
58 }
59 
60 #endif
void display()
Definition: uploadscoredialog.cpp:191
Definition: uploadscoredialog.h:26
void logout()
Definition: uploadscoredialog.cpp:274
void onGetScoreSuccess(const QString &title, const QString &description, bool priv, const QString &license, const QString &tags, const QString &url)
Definition: uploadscoredialog.cpp:233
UploadScoreDialog(LoginManager *)
Definition: uploadscoredialog.cpp:54
Definition: loginmanager.h:26
void uploadSuccess(const QString &url, const QString &nid, const QString &vid)
Definition: uploadscoredialog.cpp:109
void onGetScoreError(const QString &error)
Definition: uploadscoredialog.cpp:249
void displaySuccess()
Definition: uploadscoredialog.cpp:154
LoginManager * _loginManager
Definition: uploadscoredialog.h:30
bool _newScore
Definition: uploadscoredialog.h:32
void clear()
Definition: uploadscoredialog.cpp:259
int _nid
Definition: uploadscoredialog.h:31
Definition: aeolus.cpp:26
void uploadError(const QString &error)
Definition: uploadscoredialog.cpp:168
void showEvent(QShowEvent *) override
Definition: uploadscoredialog.cpp:284
void showOrHideUploadAudio()
Definition: uploadscoredialog.cpp:180
QString _url
Definition: uploadscoredialog.h:33
void updateScoreData()
Definition: uploadscoredialog.cpp:145
void buttonBoxClicked(QAbstractButton *button)
Definition: uploadscoredialog.cpp:81
void upload(int nid)
Definition: uploadscoredialog.cpp:94
void setTitle(const QString &t)
Definition: uploadscoredialog.h:56