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 __SCOREPREVIEW_H__
14 #define __SCOREPREVIEW_H__
15 
16 #include "ui_scorePreview.h"
17 #include "scoreInfo.h"
18 
19 namespace Ms {
20 
21 //---------------------------------------------------------
22 //   ScorePreview
23 //---------------------------------------------------------
24 
25 class ScorePreview : public QWidget, public Ui::ScorePreview
26       {
27       Q_OBJECT
28 
29       ScoreInfo scoreInfo;
30       QString messageNothingToShow;
31 
mouseDoubleClickEvent(QMouseEvent *)32       virtual void mouseDoubleClickEvent(QMouseEvent*) override { emit doubleClicked(scoreInfo.filePath()); }
33 
34    public slots:
35       void setScore(const QString&);
36       void setScore(const ScoreInfo&);
37       void unsetScore();
38 
39    signals:
40       void doubleClicked(QString);
41 
42    public:
43       ScorePreview(QWidget* parent = 0);
44       void displayInfo(bool show);
45       };
46 }
47 
48 
49 #endif
50 
51 
52