diff options
author | Javier <dev.git@javispedro.com> | 2015-06-14 20:18:59 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-06-14 20:18:59 +0200 |
commit | fb55ea21c891a75f2e7e06d336faa9b5b8b105a3 (patch) | |
tree | 4c8d677ea98027576f44b8acfbc60b34675fe215 /mainwindow.cc | |
parent | 3a17eeddaf005a5e9fe48f1207978d0a0da0ae9d (diff) | |
download | scribiu-fb55ea21c891a75f2e7e06d336faa9b5b8b105a3.tar.gz scribiu-fb55ea21c891a75f2e7e06d336faa9b5b8b105a3.zip |
improve sync locking and status messages
Diffstat (limited to 'mainwindow.cc')
-rw-r--r-- | mainwindow.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mainwindow.cc b/mainwindow.cc index 0610993..5d4f503 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -56,6 +56,10 @@ MainWindow::MainWindow(QWidget *parent) : this, SLOT(handleNotebookRowsInserted(QModelIndex,int,int))); connect(_manager, SIGNAL(pensBeingSynchronizedChanged()), this, SLOT(handlePensBeingSynchronizedChanged())); + connect(_manager, SIGNAL(syncComplete(QString)), + this, SLOT(handlePenSyncComplete(QString))); + connect(_manager, SIGNAL(syncFailed(QString)), + this, SLOT(handlePenSyncFailed(QString))); connect(_media, SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(handleMediaStateChange(Phonon::State))); connect(_media, SIGNAL(totalTimeChanged(qint64)), @@ -278,6 +282,16 @@ void MainWindow::handlePensBeingSynchronizedChanged() } } +void MainWindow::handlePenSyncComplete(const QString &penName) +{ + ui->statusBar->showMessage(tr("Completed synchronization with %1").arg(penName), 10000); +} + +void MainWindow::handlePenSyncFailed(const QString &penName) +{ + ui->statusBar->showMessage(tr("Failed synchronization with %1").arg(penName), 10000); +} + void MainWindow::handleExport() { if (_curNotebookName == PAPER_REPLAY) { |