Skip to content

Commit

Permalink
Add new API
Browse files Browse the repository at this point in the history
  • Loading branch information
DonLakeFlyer committed Aug 15, 2015
1 parent eb67685 commit af46dc4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/QGCApplication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -772,3 +772,13 @@ MavManager* QGCApplication::getMavManager()
{
return _pMavManager;
}

void QGCApplication::showToolBarMessage(const QString& message)
{
MainWindow* mainWindow = MainWindow::instance();
if (mainWindow) {
mainWindow->getMainToolBar()->showToolBarMessage(message);
} else {
QGCMessageBox::information("", message);
}
}
3 changes: 3 additions & 0 deletions src/QGCApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ class QGCApplication : public QApplication
/// MavManager accessor
MavManager* getMavManager();

/// Show a non-modal message to the user
void showToolBarMessage(const QString& message);

public slots:
/// You can connect to this slot to show an information message box from a different thread.
void informationMessageBoxOnMainThread(const QString& title, const QString& msg);
Expand Down

0 comments on commit af46dc4

Please sign in to comment.