1 //============================================================================= 2 // MuseScore 3 // Linux Music Score Editor 4 // 5 // Copyright (C) 2002-2016 Werner Schweer and others 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 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with this program; if not, write to the Free Software 17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 //============================================================================= 19 20 #ifndef SELECTIONWINDOW_H 21 #define SELECTIONWINDOW_H 22 23 namespace Ms { 24 class Score; 25 26 class SelectionListWidget : public QListWidget { 27 Q_OBJECT 28 virtual void focusInEvent(QFocusEvent*) override; 29 30 public: 31 SelectionListWidget(QWidget* parent = 0); 32 void retranslate(); 33 }; 34 35 36 class SelectionWindow : public QDockWidget { 37 Q_OBJECT 38 39 Score* _score; 40 SelectionListWidget* _listWidget; 41 42 virtual void closeEvent(QCloseEvent*); 43 virtual void hideEvent (QHideEvent* event); 44 void updateFilteredElements(); 45 46 private slots: 47 void changeCheckbox(QListWidgetItem*); 48 49 protected: 50 virtual void changeEvent(QEvent *event); 51 void retranslate(); 52 53 signals: 54 void closed(bool); 55 56 public: 57 SelectionWindow(QWidget *parent = 0, Score* score = 0); 58 ~SelectionWindow(); 59 virtual QSize sizeHint() const; 60 void setScore(Score*); 61 }; 62 } // namespace Ms 63 #endif // SELECTIONWINDOW_H 64