mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Creating a Notification widget in the Main Window.
The main error message bar can be used to show exporting information and other notification. So a new Notification handler object is created in the main window <NotificationWidget> that inherits <KMessageWidget> that shows different type of notifications, ex. (Warning, Error and information) Also this class contains a QFutureWatcher object that is set to handle the QFuture variable returned from the exporting thread. this will allow the UI to be updated when the thread finishes execution. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e6482bbdc8
commit
59ab849854
7 changed files with 88 additions and 12 deletions
|
@ -1308,12 +1308,12 @@ int MainWindow::file_save(void)
|
|||
|
||||
void MainWindow::showError(QString message)
|
||||
{
|
||||
if (message.isEmpty())
|
||||
return;
|
||||
ui.mainErrorMessage->setText(message);
|
||||
ui.mainErrorMessage->setCloseButtonVisible(true);
|
||||
ui.mainErrorMessage->setMessageType(KMessageWidget::Error);
|
||||
ui.mainErrorMessage->animatedShow();
|
||||
ui.mainErrorMessage->showNotification(message, KMessageWidget::Error);
|
||||
}
|
||||
|
||||
NotificationWidget *MainWindow::getNotificationWidget()
|
||||
{
|
||||
return ui.mainErrorMessage;
|
||||
}
|
||||
|
||||
void MainWindow::setTitle(enum MainWindowTitleFormat format)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue