MuseScore  3.4
Music composition and notation
importmidi_panel.h
Go to the documentation of this file.
1 #ifndef IMPORTMIDI_PANEL_H
2 #define IMPORTMIDI_PANEL_H
3 
4 
5 namespace Ui {
6  class ImportMidiPanel;
7  }
8 
9 namespace Ms {
10 
11 class TracksModel;
12 class OperationsModel;
13 class OperationsDelegate;
14 
15 class ImportMidiPanel : public QWidget
16  {
17  Q_OBJECT
18 
19  public:
20  explicit ImportMidiPanel(QWidget *parent = 0);
21  ~ImportMidiPanel();
22 
23  void setMidiFile(const QString &fileName);
24  void excludeMidiFile(const QString &fileName);
25  bool isPreferredVisible() const { return _preferredVisible; }
26  void setPreferredVisible(bool visible);
27  void setReopenInProgress();
28 
29  static bool isMidiFile(const QString &fileName);
30 
32 
33  signals:
34  void closeClicked();
35 
36  private slots:
37  void updateUi();
38  void hidePanel();
39  void applyMidiImport();
40  void moveTrackUp();
41  void moveTrackDown();
42  void cancelChanges();
43 
44  private:
45  void setupUi();
46  bool canImportMidi() const;
47  bool canTryCancelChanges() const;
48  bool canMoveTrackUp(int visualIndex) const;
49  bool canMoveTrackDown(int visualIndex) const;
50  void setReorderedIndexes();
51  int currentVisualIndex() const;
52  void saveTableViewState();
53  void restoreTableViewState();
54  void resetTableViewState();
55  void fillCharsetList();
56 
57  void doCancelChanges();
58  static bool fileDataAvailable(const QString& midiFile);
59 
60  Ui::ImportMidiPanel *_ui;
61  QTimer *_updateUiTimer;
62 
68  QString _midiFile;
69  };
70 
71 } // namespace Ms
72 
73 
74 #endif // IMPORTMIDI_PANEL_H
Definition: crashreporter.h:27
QString _midiFile
Definition: importmidi_panel.h:68
TracksModel * _model
Definition: importmidi_panel.h:63
bool _importInProgress
Definition: importmidi_panel.h:66
bool _reopenInProgress
Definition: importmidi_panel.h:67
Definition: importmidi_panel.h:15
bool _preferredVisible
Definition: importmidi_panel.h:65
Definition: aeolus.cpp:26
QTimer * _updateUiTimer
Definition: importmidi_panel.h:61
void instrumentTemplatesChanged()
Definition: importmidi_instrument.cpp:374
OperationsDelegate * _delegate
Definition: importmidi_panel.h:64
bool isPreferredVisible() const
Definition: importmidi_panel.h:25
Definition: importmidi_delegate.h:66
Ui::ImportMidiPanel * _ui
Definition: importmidi_panel.h:60
Definition: importmidi_model.h:11