WSF
src
wizard
lib
source
gui
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
25
namespace
wizard
26
{
27
namespace
ContextMenuActions
28
{
29
30
class
VI_EXPORT
OpenFileInProject
:
public
QAction
31
{
32
Q_OBJECT
33
public
:
34
OpenFileInProject
(
const
std::string& aFileFullPath, QWidget* aParentWidget =
nullptr
, QObject* aParent =
nullptr
);
35
private
slots:
36
void
OnTriggered();
37
38
private
:
39
std::string mFilePath;
40
QWidget* mParentWidgetPtr;
41
};
42
43
// -----------------------------------------------------------------------------
44
47
class
VI_EXPORT
MessageReporter
:
public
QObject
48
{
49
Q_OBJECT
50
public
:
51
MessageReporter
(
const
QString& aMessageTitle, QWidget* aParentWidget, QObject* aParent =
nullptr
);
52
public
slots:
53
void
ShowWarningMessage
(
const
QString& aMessage);
54
55
private
:
56
QString mMessageTitle;
57
QWidget* mParentWidgetPtr;
58
};
59
60
// -----------------------------------------------------------------------------
61
62
class
VI_EXPORT
SetAsStartupFile
:
public
QAction
63
{
64
Q_OBJECT
65
public
:
66
SetAsStartupFile
(
const
QString& aFilePath, QObject* aParent =
nullptr
);
67
private
slots:
68
void
OnTriggered();
69
70
private
:
71
QString mFilePath;
72
};
73
74
// -----------------------------------------------------------------------------
75
76
class
VI_EXPORT
AddToStartupFiles
:
public
QAction
77
{
78
Q_OBJECT
79
public
:
80
AddToStartupFiles
(
const
QString& aFilePath, QObject* aParent =
nullptr
);
81
private
slots:
82
void
OnTriggered();
83
84
private
:
85
QString mFilePath;
86
};
87
88
// -----------------------------------------------------------------------------
89
90
class
VI_EXPORT
RemoveFromStartupFiles
:
public
QAction
91
{
92
Q_OBJECT
93
public
:
94
RemoveFromStartupFiles
(
const
QString& aFilePath, QObject* aParent =
nullptr
);
95
private
slots:
96
void
OnTriggered();
97
98
private
:
99
QString mFilePath;
100
};
101
102
// -----------------------------------------------------------------------------
103
104
class
VI_EXPORT
ShowStartupFilesDialog
:
public
QAction
105
{
106
Q_OBJECT
107
public
:
108
explicit
ShowStartupFilesDialog
(QObject* aParent =
nullptr
);
109
private
slots:
110
void
OnTriggered();
111
};
112
113
// -----------------------------------------------------------------------------
114
115
class
VI_EXPORT
OpenFileInEditor
:
public
QAction
116
{
117
Q_OBJECT
118
public
:
119
OpenFileInEditor
(
const
QString& aFilePath, QObject* aParent =
nullptr
);
120
private
slots:
121
void
OnTriggered();
122
123
private
:
124
QString mFilePath;
125
};
126
127
}
// namespace ContextMenuActions
128
}
// namespace wizard
129
130
#endif
// CONTEXTMENUACTIONS_HPP
ViExport.hpp
VI_EXPORT
#define VI_EXPORT
Definition
ViExport.hpp:38
WsfPProxyNode.hpp
wizard::ContextMenuActions::AddToStartupFiles::AddToStartupFiles
AddToStartupFiles(const QString &aFilePath, QObject *aParent=nullptr)
Definition
ContextMenuActions.cpp:82
wizard::ContextMenuActions::MessageReporter::MessageReporter
MessageReporter(const QString &aMessageTitle, QWidget *aParentWidget, QObject *aParent=nullptr)
Definition
ContextMenuActions.cpp:46
wizard::ContextMenuActions::MessageReporter::ShowWarningMessage
void ShowWarningMessage(const QString &aMessage)
Definition
ContextMenuActions.cpp:55
wizard::ContextMenuActions::OpenFileInEditor::OpenFileInEditor
OpenFileInEditor(const QString &aFilePath, QObject *aParent=nullptr)
Definition
ContextMenuActions.cpp:136
wizard::ContextMenuActions::OpenFileInProject::OpenFileInProject
OpenFileInProject(const std::string &aFileFullPath, QWidget *aParentWidget=nullptr, QObject *aParent=nullptr)
Definition
ContextMenuActions.cpp:23
wizard::ContextMenuActions::RemoveFromStartupFiles::RemoveFromStartupFiles
RemoveFromStartupFiles(const QString &aFilePath, QObject *aParent=nullptr)
Definition
ContextMenuActions.cpp:98
wizard::ContextMenuActions::SetAsStartupFile::SetAsStartupFile
SetAsStartupFile(const QString &aFilePath, QObject *aParent=nullptr)
Definition
ContextMenuActions.cpp:62
wizard::ContextMenuActions::ShowStartupFilesDialog::ShowStartupFilesDialog
ShowStartupFilesDialog(QObject *aParent=nullptr)
Definition
ContextMenuActions.cpp:123
wizard::ContextMenuActions
Definition
ContextMenuActions.hpp:28
wizard
Definition
Runner.hpp:22
Copyrights Multiple, All Rights Reserved