58 lines
1.6 KiB
C++
58 lines
1.6 KiB
C++
#ifndef HEADERACTIVITY_H
|
|
#define HEADERACTIVITY_H
|
|
|
|
#include <QObject>
|
|
#include "interfaces/IPageActivity.h"
|
|
|
|
class QQuickItem;
|
|
class DynamicLoader;
|
|
class QQmlEngine;
|
|
class ArrDifferentTypes;
|
|
|
|
class HeaderActivity : public QObject, public IPageActivity
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit HeaderActivity(QQuickItem * item, QObject *parent = nullptr);
|
|
|
|
void pageChanged() override final;
|
|
void isAllowChangePage(const std::function<void()> &continueChange, const std::function<void()> &blockChange) override final;
|
|
|
|
signals:
|
|
void closeWindowClick();
|
|
void hideWindowClick();
|
|
void newProjectItemClick();
|
|
void projectItemClick();
|
|
void homeClick();
|
|
|
|
private:
|
|
QQuickItem * root;
|
|
|
|
const QString FIELD_HIDE_WINDOW = "HideWindow";
|
|
const QString FIELD_CLOSE_WINDOW = "CloseWindow";
|
|
const QString FIELD_CREATE_PROJECT = "CreateProjectItemMenu";
|
|
const QString FIELD_PROJECTS = "ProjectsItemMenu";
|
|
const QString FIELD_HOME = "HomeItemMenu";
|
|
const QString FIELD_LABEL_TITLE = "LabelTitle";
|
|
|
|
QQuickItem *fieldHideWindow = 0;
|
|
QQuickItem *fieldCloseWindow = 0;
|
|
QQuickItem *fieldCreateProject = 0;
|
|
QQuickItem *fieldProjects = 0;
|
|
QQuickItem *fieldHome = 0;
|
|
QQuickItem *fieldLabelTitle = 0;
|
|
|
|
ArrDifferentTypes * headerArrDifferentTypes = 0;
|
|
|
|
void init();
|
|
bool isAlllElementFound();
|
|
void addMouseAreaToElementsToNavigation();
|
|
void handleWrapperMove();
|
|
void handleWrapperHide();
|
|
void handleWrapperClose();
|
|
|
|
|
|
};
|
|
|
|
#endif // HEADERACTIVITY_H
|