Files
Sourcetrail/src/lib_gui/qt/view/QtDialogView.h
T
Eberhard Graether 149a305761 logic: Fixed error view related issues
* polished color schemes for error view
* fixed error id column not hidden
* fixed error count shown correctly in each view
* moved storage stats logging to application
* fixed indexed flag of errors broken for indexed headers in cdb project
* fixed scrolling to active error when errors where not visible before
* reverted tictactoe files to no errors
2016-10-13 14:21:22 +02:00

64 lines
1.9 KiB
C++

#ifndef QT_DIALOG_VIEW_H
#define QT_DIALOG_VIEW_H
#include "component/view/DialogView.h"
#include "qt/utility/QtThreadedFunctor.h"
#include "qt/window/QtWindowStack.h"
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageInterruptTasks.h"
#include "utility/messaging/type/MessageNewErrors.h"
#include "utility/messaging/type/MessageShowErrors.h"
#include "utility/messaging/type/MessageWindowClosed.h"
class QtMainWindow;
class QtDialogView
: public QObject
, public DialogView
, public MessageListener<MessageInterruptTasks>
, public MessageListener<MessageNewErrors>
, public MessageListener<MessageShowErrors>
, public MessageListener<MessageWindowClosed>
{
Q_OBJECT
public:
QtDialogView(QtMainWindow* mainWindow, StorageAccess* storageAccess);
virtual ~QtDialogView();
void showProgressDialog(const std::string& title, const std::string& message) override;
void hideProgressDialog() override;
bool startIndexingDialog(size_t cleanFileCount, size_t indexFileCount) override;
void updateIndexingDialog(size_t fileCount, size_t totalFileCount, std::string sourcePath) override;
void finishedIndexingDialog(size_t fileCount, size_t totalFileCount, float time, ErrorCountInfo errorInfo) override;
int confirm(const std::string& message, const std::vector<std::string>& options) override;
private:
void handleMessage(MessageInterruptTasks* message) override;
void handleMessage(MessageNewErrors* message) override;
void handleMessage(MessageShowErrors* message) override;
void handleMessage(MessageWindowClosed* message) override;
void updateErrorCount(size_t errorCount, size_t fatalCount);
template<typename T>
T* createWindow();
void setUIBlocked(bool blocked);
QtMainWindow* m_mainWindow;
QtWindowStack m_windowStack;
QtThreadedLambdaFunctor m_onQtThread;
QtThreadedLambdaFunctor m_onQtThread2;
bool m_resultReady;
};
#endif // QT_DIALOG_VIEW_H