ui: Showing indexing progress in windows task bar
* implemented showing indexing progress in windows taskbar button * renamed TaskShowStatusDialog * added "Qt5WinExtras.dll" for windows builds
This commit is contained in:
@@ -279,8 +279,8 @@ add_files(
|
||||
data/TaskInjectStorage.h
|
||||
data/TaskMergeStorages.cpp
|
||||
data/TaskMergeStorages.h
|
||||
data/TaskShowStatusDialog.cpp
|
||||
data/TaskShowStatusDialog.h
|
||||
data/TaskShowUnknownProgressDialog.cpp
|
||||
data/TaskShowUnknownProgressDialog.h
|
||||
|
||||
project/Project.cpp
|
||||
project/Project.h
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#include "data/TaskShowStatusDialog.h"
|
||||
|
||||
#include "component/view/DialogView.h"
|
||||
#include "Application.h"
|
||||
|
||||
TaskShowStatusDialog::TaskShowStatusDialog(
|
||||
const std::string& title,
|
||||
const std::string& message
|
||||
)
|
||||
: m_title(title)
|
||||
, m_message(message)
|
||||
{
|
||||
}
|
||||
|
||||
TaskShowStatusDialog::~TaskShowStatusDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void TaskShowStatusDialog::doEnter(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
}
|
||||
|
||||
Task::TaskState TaskShowStatusDialog::doUpdate(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
Application::getInstance()->getDialogView()->showUnknownProgressDialog(m_title, m_message);
|
||||
|
||||
return STATE_SUCCESS;
|
||||
}
|
||||
|
||||
void TaskShowStatusDialog::doExit(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
}
|
||||
|
||||
void TaskShowStatusDialog::doReset(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#include "data/TaskShowUnknownProgressDialog.h"
|
||||
|
||||
#include "component/view/DialogView.h"
|
||||
#include "Application.h"
|
||||
|
||||
TaskShowUnknownProgressDialog::TaskShowUnknownProgressDialog(
|
||||
const std::string& title,
|
||||
const std::string& message
|
||||
)
|
||||
: m_title(title)
|
||||
, m_message(message)
|
||||
{
|
||||
}
|
||||
|
||||
TaskShowUnknownProgressDialog::~TaskShowUnknownProgressDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void TaskShowUnknownProgressDialog::doEnter(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
}
|
||||
|
||||
Task::TaskState TaskShowUnknownProgressDialog::doUpdate(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
if (std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView())
|
||||
{
|
||||
dialogView->showUnknownProgressDialog(m_title, m_message);
|
||||
}
|
||||
return STATE_SUCCESS;
|
||||
}
|
||||
|
||||
void TaskShowUnknownProgressDialog::doExit(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
}
|
||||
|
||||
void TaskShowUnknownProgressDialog::doReset(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
}
|
||||
@@ -1,22 +1,20 @@
|
||||
#ifndef TASK_SHOW_STATUS_DIALOG_H
|
||||
#define TASK_SHOW_STATUS_DIALOG_H
|
||||
#ifndef TASK_SHOW_UNKNOWN_PROGRESS_DIALOG_H
|
||||
#define TASK_SHOW_UNKNOWN_PROGRESS_DIALOG_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "utility/scheduling/Task.h"
|
||||
|
||||
class DialogView;
|
||||
|
||||
class TaskShowStatusDialog
|
||||
class TaskShowUnknownProgressDialog
|
||||
: public Task
|
||||
{
|
||||
public:
|
||||
TaskShowStatusDialog(
|
||||
TaskShowUnknownProgressDialog(
|
||||
const std::string& title,
|
||||
const std::string& message
|
||||
);
|
||||
|
||||
virtual ~TaskShowStatusDialog();
|
||||
virtual ~TaskShowUnknownProgressDialog();
|
||||
|
||||
private:
|
||||
virtual void doEnter(std::shared_ptr<Blackboard> blackboard);
|
||||
@@ -28,4 +26,4 @@ private:
|
||||
const std::string m_message;
|
||||
};
|
||||
|
||||
#endif // TASK_SHOW_STATUS_DIALOG_H
|
||||
#endif // TASK_SHOW_UNKNOWN_PROGRESS_DIALOG_H
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "data/TaskFinishParsing.h"
|
||||
#include "data/TaskInjectStorage.h"
|
||||
#include "data/TaskMergeStorages.h"
|
||||
#include "data/TaskShowStatusDialog.h"
|
||||
#include "data/TaskShowUnknownProgressDialog.h"
|
||||
#include "project/SourceGroup.h"
|
||||
#include "project/SourceGroupFactory.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
@@ -440,7 +440,7 @@ void Project::buildIndex(const RefreshInfo& info, DialogView* dialogView)
|
||||
);
|
||||
// add task that notifies the user of what's going on
|
||||
taskSequential->addTask( // we don't need to hide this dialog again, because it's overridden by other dialogs later on.
|
||||
std::make_shared<TaskShowStatusDialog>("Finish Indexing", "Saving\nRemaining Data")
|
||||
std::make_shared<TaskShowUnknownProgressDialog>("Finish Indexing", "Saving\nRemaining Data")
|
||||
);
|
||||
|
||||
// add task that injects the remaining intermediate storages into the persistent storage
|
||||
|
||||
Reference in New Issue
Block a user