diff options
author | Robert Jonsson <spamatica@gmail.com> | 2011-03-01 16:53:08 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2011-03-01 16:53:08 +0000 |
commit | 1f615170b3519ca56951fbdd7cd86ef5f35817cc (patch) | |
tree | a11186da159c0c07e9a9ad60d17e2ca5c4621575 /muse2/muse | |
parent | e34cbdc31e42538b551025313ff97410ae24b1c7 (diff) |
restore geometry midi config dialog
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/confmport.cpp | 13 | ||||
-rw-r--r-- | muse2/muse/confmport.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/muse2/muse/confmport.cpp b/muse2/muse/confmport.cpp index cf76d5ef..d05e174d 100644 --- a/muse2/muse/confmport.cpp +++ b/muse2/muse/confmport.cpp @@ -18,6 +18,7 @@ #include <QTableWidget> #include <QTableWidgetItem> #include <QHeaderView> +#include <QSettings> #include "confmport.h" #include "app.h" @@ -47,6 +48,15 @@ enum { DEVCOL_NO = 0, DEVCOL_GUI, DEVCOL_REC, DEVCOL_PLAY, DEVCOL_INSTR, DEVCOL_ DEVCOL_INROUTES, DEVCOL_OUTROUTES, DEVCOL_DEF_IN_CHANS, DEVCOL_DEF_OUT_CHANS, DEVCOL_STATE }; //--------------------------------------------------------- +// closeEvent +//--------------------------------------------------------- +void MPConfig::closeEvent(QCloseEvent *event) +{ + QSettings settings("MusE", "MusE-qt"); + settings.setValue("MPConfig/geometry", saveGeometry()); + QWidget::closeEvent(event); +} +//--------------------------------------------------------- // changeDefInputRoutes //--------------------------------------------------------- @@ -1015,6 +1025,9 @@ MPConfig::MPConfig(QWidget* parent) : QDialog(parent) { setupUi(this); + QSettings settings("MusE", "MusE-qt"); + restoreGeometry(settings.value("MPConfig/geometry").toByteArray()); + mdevView->setRowCount(MIDI_PORTS); mdevView->verticalHeader()->hide(); mdevView->setSelectionMode(QAbstractItemView::SingleSelection); diff --git a/muse2/muse/confmport.h b/muse2/muse/confmport.h index f09c4d65..3c139ee2 100644 --- a/muse2/muse/confmport.h +++ b/muse2/muse/confmport.h @@ -47,6 +47,8 @@ class MPConfig : public QDialog, Ui::SynthConfigBase { void removeInstanceClicked(); void changeDefInputRoutes(QAction* act); void changeDefOutputRoutes(QAction* act); + public slots: + void closeEvent(QCloseEvent*e); public: MPConfig(QWidget* parent=0); |