Files
Sourcetrail/src/lib_gui/qt/view/QtMainView.h
T
Eberhard Graether 2c90b75a9f ui: Indexing UI
* Added DialogView with QtDialogView implementation to handle information dialogs
* Implemented QtIndexingDialog class that covers all different dialogs for indexing
* Directly communicate with DialogView from Prpject and all Tasks involved in indexing
* Block QtMainWindow UI while indexing
2016-08-23 23:45:45 +02:00

82 lines
2.4 KiB
C++

#ifndef QT_MAIN_VIEW_H
#define QT_MAIN_VIEW_H
#include <memory>
#include <vector>
#include <QStatusBar>
#include "component/view/MainView.h"
#include "qt/utility/QtThreadedFunctor.h"
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageForceEnterLicense.h"
#include "utility/messaging/type/MessageProjectEdit.h"
#include "utility/messaging/type/MessageProjectNew.h"
#include "utility/messaging/type/MessageShowStartScreen.h"
class QtMainWindow;
class View;
class QtMainView
: public MainView
, public MessageListener<MessageForceEnterLicense>
, public MessageListener<MessageProjectEdit>
, public MessageListener<MessageProjectNew>
, public MessageListener<MessageShowStartScreen>
{
public:
QtMainView();
virtual ~QtMainView();
QtMainWindow* getMainWindow() const;
// ViewLayout implementation
virtual void addView(View* view);
virtual void removeView(View* view);
virtual void showView(View* view);
virtual void hideView(View* view);
virtual void loadLayout();
virtual void saveLayout();
virtual QStatusBar* getStatusBar();
virtual void setStatusBar(QStatusBar* statusBar);
// MainView implementation
virtual void hideStartScreen();
virtual void setTitle(const std::string& title);
virtual void activateWindow();
virtual void updateRecentProjectMenu();
private:
void handleMessage(MessageForceEnterLicense* message);
void handleMessage(MessageProjectEdit* message);
void handleMessage(MessageProjectNew* message);
void handleMessage(MessageShowStartScreen* message);
void doEditProject();
void doCreateNewProjectFromSolution(const std::string& ideId, const std::string& solutionPath);
void doShowStartScreen();
void doHideStartScreen();
void doSetTitle(const std::string& title);
void doActivateWindow();
void doUpdateRecentProjectMenu();
void doForceLicenseScreen(bool expired);
std::shared_ptr<QtMainWindow> m_window;
std::vector<View*> m_views;
QtThreadedFunctor<> m_editProjectFunctor;
QtThreadedFunctor<const std::string&, const std::string&> m_createNewProjectFromSolutionFunctor;
QtThreadedFunctor<> m_showStartScreenFunctor;
QtThreadedFunctor<> m_hideStartScreenFunctor;
QtThreadedFunctor<const std::string&> m_setTitleFunctor;
QtThreadedFunctor<> m_activateWindowFunctor;
QtThreadedFunctor<> m_updateRecentProjectMenuFunctor;
QtThreadedFunctor<bool> m_forceLicenseScreenFunctor;
};
#endif // QT_MAIN_VIEW_H