WSF
ContextMenuActions.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef CONTEXTMENUACTIONS_HPP
13#define CONTEXTMENUACTIONS_HPP
14
15#include <string>
16
17#include <QAction>
18#include <QPoint>
19#include <QString>
20#include <QWidget>
21
22#include "ViExport.hpp"
23#include "WsfPProxyNode.hpp"
24
25namespace wizard
26{
28{
29
30class VI_EXPORT OpenFileInProject : public QAction
31{
32 Q_OBJECT
33public:
34 OpenFileInProject(const std::string& aFileFullPath, QWidget* aParentWidget = nullptr, QObject* aParent = nullptr);
35private slots:
36 void OnTriggered();
37
38private:
39 std::string mFilePath;
40 QWidget* mParentWidgetPtr;
41};
42
43// -----------------------------------------------------------------------------
44
47class VI_EXPORT MessageReporter : public QObject
48{
49 Q_OBJECT
50public:
51 MessageReporter(const QString& aMessageTitle, QWidget* aParentWidget, QObject* aParent = nullptr);
52public slots:
53 void ShowWarningMessage(const QString& aMessage);
54
55private:
56 QString mMessageTitle;
57 QWidget* mParentWidgetPtr;
58};
59
60// -----------------------------------------------------------------------------
61
62class VI_EXPORT SetAsStartupFile : public QAction
63{
64 Q_OBJECT
65public:
66 SetAsStartupFile(const QString& aFilePath, QObject* aParent = nullptr);
67private slots:
68 void OnTriggered();
69
70private:
71 QString mFilePath;
72};
73
74// -----------------------------------------------------------------------------
75
76class VI_EXPORT AddToStartupFiles : public QAction
77{
78 Q_OBJECT
79public:
80 AddToStartupFiles(const QString& aFilePath, QObject* aParent = nullptr);
81private slots:
82 void OnTriggered();
83
84private:
85 QString mFilePath;
86};
87
88// -----------------------------------------------------------------------------
89
90class VI_EXPORT RemoveFromStartupFiles : public QAction
91{
92 Q_OBJECT
93public:
94 RemoveFromStartupFiles(const QString& aFilePath, QObject* aParent = nullptr);
95private slots:
96 void OnTriggered();
97
98private:
99 QString mFilePath;
100};
101
102// -----------------------------------------------------------------------------
103
104class VI_EXPORT ShowStartupFilesDialog : public QAction
105{
106 Q_OBJECT
107public:
108 explicit ShowStartupFilesDialog(QObject* aParent = nullptr);
109private slots:
110 void OnTriggered();
111};
112
113// -----------------------------------------------------------------------------
114
115class VI_EXPORT OpenFileInEditor : public QAction
116{
117 Q_OBJECT
118public:
119 OpenFileInEditor(const QString& aFilePath, QObject* aParent = nullptr);
120private slots:
121 void OnTriggered();
122
123private:
124 QString mFilePath;
125};
126
127} // namespace ContextMenuActions
128} // namespace wizard
129
130#endif // CONTEXTMENUACTIONS_HPP
#define VI_EXPORT
Definition ViExport.hpp:38
AddToStartupFiles(const QString &aFilePath, QObject *aParent=nullptr)
Definition ContextMenuActions.cpp:82
MessageReporter(const QString &aMessageTitle, QWidget *aParentWidget, QObject *aParent=nullptr)
Definition ContextMenuActions.cpp:46
void ShowWarningMessage(const QString &aMessage)
Definition ContextMenuActions.cpp:55
OpenFileInEditor(const QString &aFilePath, QObject *aParent=nullptr)
Definition ContextMenuActions.cpp:136
OpenFileInProject(const std::string &aFileFullPath, QWidget *aParentWidget=nullptr, QObject *aParent=nullptr)
Definition ContextMenuActions.cpp:23
RemoveFromStartupFiles(const QString &aFilePath, QObject *aParent=nullptr)
Definition ContextMenuActions.cpp:98
SetAsStartupFile(const QString &aFilePath, QObject *aParent=nullptr)
Definition ContextMenuActions.cpp:62
ShowStartupFilesDialog(QObject *aParent=nullptr)
Definition ContextMenuActions.cpp:123
Definition ContextMenuActions.hpp:28
Definition Runner.hpp:22
Copyrights Multiple, All Rights Reserved