2014-11-12 15:01:08 +01:00
|
|
|
//=============================================================================
|
|
|
|
// MuseScore
|
|
|
|
// Music Composition & Notation
|
|
|
|
//
|
|
|
|
// Copyright (C) 2014 Werner Schweer
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License version 2
|
|
|
|
// as published by the Free Software Foundation and appearing in
|
|
|
|
// the file LICENCE.GPL
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
#ifndef __SCOREBROWSER_H__
|
|
|
|
#define __SCOREBROWSER_H__
|
|
|
|
|
|
|
|
#include "ui_scoreBrowser.h"
|
|
|
|
#include "scoreInfo.h"
|
|
|
|
|
|
|
|
namespace Ms {
|
|
|
|
|
2014-11-19 14:26:20 +01:00
|
|
|
class ScoreItem;
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// ScoreListWidget
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
class ScoreListWidget : public QListWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
virtual QSize sizeHint() const override;
|
|
|
|
|
|
|
|
public:
|
|
|
|
ScoreListWidget(QWidget* parent = 0) : QListWidget(parent) {}
|
|
|
|
};
|
|
|
|
|
2014-11-12 15:01:08 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// ScoreBrowser
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
class ScoreBrowser : public QWidget, public Ui::ScoreBrowser
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2014-11-19 14:26:20 +01:00
|
|
|
QListWidget* createScoreList();
|
|
|
|
QList<ScoreListWidget*> scoreLists;
|
2014-11-19 15:25:03 +01:00
|
|
|
bool _stripNumbers { false };
|
2014-11-19 14:26:20 +01:00
|
|
|
|
|
|
|
ScoreItem* genScoreItem(const QFileInfo& fi);
|
|
|
|
|
2014-11-12 15:01:08 +01:00
|
|
|
private slots:
|
|
|
|
void scoreChanged(QListWidgetItem*, QListWidgetItem*);
|
2014-11-19 14:26:20 +01:00
|
|
|
void setScoreActivated(QListWidgetItem*);
|
2014-11-12 15:01:08 +01:00
|
|
|
|
2014-11-12 16:36:40 +01:00
|
|
|
signals:
|
|
|
|
void leave();
|
2014-11-19 14:26:20 +01:00
|
|
|
void scoreSelected(QString);
|
|
|
|
void scoreActivated(QString);
|
2014-11-12 16:36:40 +01:00
|
|
|
|
2014-11-12 15:01:08 +01:00
|
|
|
public:
|
|
|
|
ScoreBrowser(QWidget* parent = 0);
|
2014-11-13 10:22:05 +01:00
|
|
|
void setScores(QFileInfoList);
|
2014-11-19 15:25:03 +01:00
|
|
|
void setStripNumbers(bool val) { _stripNumbers = val; }
|
2014-11-12 15:01:08 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|