MuseScore/mscore/scoreBrowser.h

69 lines
1.7 KiB
C
Raw Normal View History

//=============================================================================
// 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 {
class ScoreItem;
//---------------------------------------------------------
// ScoreListWidget
//---------------------------------------------------------
class ScoreListWidget : public QListWidget
{
Q_OBJECT
virtual QSize sizeHint() const override;
public:
ScoreListWidget(QWidget* parent = 0) : QListWidget(parent) {}
};
//---------------------------------------------------------
// ScoreBrowser
//---------------------------------------------------------
class ScoreBrowser : public QWidget, public Ui::ScoreBrowser
{
Q_OBJECT
QListWidget* createScoreList();
QList<ScoreListWidget*> scoreLists;
2014-11-19 15:25:03 +01:00
bool _stripNumbers { false };
ScoreItem* genScoreItem(const QFileInfo& fi);
private slots:
void scoreChanged(QListWidgetItem*, QListWidgetItem*);
void setScoreActivated(QListWidgetItem*);
2014-11-12 16:36:40 +01:00
signals:
void leave();
void scoreSelected(QString);
void scoreActivated(QString);
2014-11-12 16:36:40 +01:00
public:
ScoreBrowser(QWidget* parent = 0);
void setScores(QFileInfoList);
2014-11-19 15:25:03 +01:00
void setStripNumbers(bool val) { _stripNumbers = val; }
};
}
#endif