1 /*! 2 * @file passwidget.h 3 * @brief Headers for the PassWidget UI class. 4 * 5 * 6 * Copyright 2009 - 2017 <qmidiarp-devel@lists.sourceforge.net> 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 21 * MA 02110-1301, USA. 22 * 23 */ 24 #ifndef PASSWIDGET_H 25 #define PASSWIDGET_H 26 27 #include <QDialog> 28 29 #include "engine.h" 30 31 /*! 32 * The PassWidget class is a small QDialog UI that allows defining some 33 * global settings for QMidiArp. It is instantiated by MainWindow. 34 * It is shown when the MainWindow::viewSettingsAction() is triggered. 35 36 * @brief Preferences QDialog UI class. Instantiated by MainWindow. 37 */ 38 class PassWidget : public QDialog 39 40 { 41 Q_OBJECT 42 43 private: 44 Engine *engine; 45 bool modified; 46 47 public: 48 PassWidget(Engine* engine, int p_portcount, QWidget* parent=0); 49 ~PassWidget(); 50 void setForward(bool on); 51 void setPortUnmatched(int id); 52 QCheckBox *cbuttonCheck, *compactStyleCheck, *mutedAddCheck; 53 QCheckBox *forwardCheck; 54 QComboBox *portUnmatchedSpin; 55 bool compactStyle, mutedAdd; isModified()56 bool isModified() { return modified;}; setModified(bool on)57 void setModified(bool on) { modified = on; }; 58 59 signals: 60 void compactLayoutToggle(bool); 61 62 public slots: 63 void updateForward(bool on); 64 void updatePortUnmatched(int); 65 void updateControlSetting(bool); 66 void updateCompactStyle(bool); 67 void updateMutedAdd(bool); 68 }; 69 70 #endif 71