diff options
author | Olli Werwolff <[email protected]> | 2011-04-14 12:28:52 +0200 |
---|---|---|
committer | Olli Werwolff <[email protected]> | 2011-04-14 12:28:52 +0200 |
commit | e8f6913d361188c4984e2ff0a630f3d2be325b04 (patch) | |
tree | c7978f9a305cd30c75701013a79c5fa702e61d02 /src/ui/mainwindow.cpp | |
parent | eb87d8b4d6d09c40f9837647f012f88e95196bcf (diff) |
Load/save custom gesture start on startup/shutdowntouch
Task-number: QTSIM-77
Diffstat (limited to 'src/ui/mainwindow.cpp')
-rw-r--r-- | src/ui/mainwindow.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index db37478..2598ee5 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -247,15 +247,16 @@ MainWindow::MainWindow(QWidget *parent) mobility->mNfcUi = nfcUi; config->addSimulateSubPage(nfcUi); - MultiPointTouchUi *mptUi = new MultiPointTouchUi(this); - mptUi->setGestureScriptPath(userResourcePath() + "/scripts/gestures"); - config->addSimulateSubPage(mptUi); - connect(mptUi, SIGNAL(inputModeChanged(MultiPointTouchUi::InputMode)), + mTouchUi = new MultiPointTouchUi(this); + mTouchUi->setGestureScriptPath(userResourcePath() + "/scripts/gestures"); + config->addSimulateSubPage(mTouchUi); + connect(mTouchUi, SIGNAL(inputModeChanged(MultiPointTouchUi::InputMode)), widgetManager, SLOT(setMouseInputMode(MultiPointTouchUi::InputMode))); connect(this, SIGNAL(mouseInputModeChanged(MultiPointTouchUi::InputMode)), - mptUi, SLOT(setInputMode(MultiPointTouchUi::InputMode))); - connect(mptUi, SIGNAL(customGesturePathChanged(QString)), + mTouchUi, SLOT(setInputMode(MultiPointTouchUi::InputMode))); + connect(mTouchUi, SIGNAL(customGesturePathChanged(QString)), widgetManager, SLOT(setCurrentGesturePath(QString))); + mTouchUi->readSettings(QCoreApplication::organizationName(), QCoreApplication::applicationName()); ScriptUi *scriptUi = new ScriptUi(scriptAdapter, this); FavoriteScriptButton *scriptButton = new FavoriteScriptButton(this); @@ -371,6 +372,7 @@ void MainWindow::closeEvent(QCloseEvent *event) if (!startupError) { writeSettings(); config->writeSettings(QCoreApplication::organizationName(), QCoreApplication::applicationName()); + mTouchUi->writeSettings(QCoreApplication::organizationName(), QCoreApplication::applicationName()); } } |