1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 06:53:53 +00:00
openmw/apps/opencs/view/doc/globaldebugprofilemenu.hpp

53 lines
1,007 B
C++
Raw Normal View History

#ifndef CSV_DOC_GLOBALDEBUGPROFILEMENU_H
#define CSV_DOC_GLOBALDEBUGPROFILEMENU_H
#include <QMenu>
2022-10-19 17:02:00 +00:00
#include <string>
class QAction;
class QActionGroup;
2022-10-19 17:02:00 +00:00
class QModelIndex;
class QObject;
class QWidget;
namespace CSMWorld
{
class IdTable;
}
namespace CSVDoc
{
class GlobalDebugProfileMenu : public QMenu
{
2022-09-22 18:26:05 +00:00
Q_OBJECT
2022-09-22 18:26:05 +00:00
CSMWorld::IdTable* mDebugProfiles;
QActionGroup* mActions;
2022-09-22 18:26:05 +00:00
private:
void rebuild();
2022-09-22 18:26:05 +00:00
public:
GlobalDebugProfileMenu(CSMWorld::IdTable* debugProfiles, QWidget* parent = nullptr);
2022-09-22 18:26:05 +00:00
void updateActions(bool running);
2022-09-22 18:26:05 +00:00
private slots:
2022-09-22 18:26:05 +00:00
void profileAboutToBeRemoved(const QModelIndex& parent, int start, int end);
2022-09-22 18:26:05 +00:00
void profileInserted(const QModelIndex& parent, int start, int end);
2022-09-22 18:26:05 +00:00
void profileChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
2022-09-22 18:26:05 +00:00
void actionTriggered(QAction* action);
2022-09-22 18:26:05 +00:00
signals:
2022-09-22 18:26:05 +00:00
void triggered(const std::string& profile);
};
}
#endif