17 #include <matrix/vlVector.h>
20 #include <QtWidgets/QWidget>
21 #include <QtWidgets/QBoxLayout>
22 #include <QtWidgets/QPushButton>
23 #include <QtWidgets/QLabel>
24 #include <QtWidgets/QLineEdit>
26 #include <QtDesigner/QExtensionFactory>
27 #include <QtDesigner/QDesignerTaskMenuExtension>
34 class DtNewTacticalGraphicEntryWidgetLogic;
39 Q_PROPERTY(QString entityType READ variableData WRITE setVariableData)
52 QWidget* parent,
const Qt::WindowFlags& flags = 0,
const CreationFlags& cflags = NormalMode);
62 virtual void setObjectDefined(DtObjectDefinitionState state);
65 virtual DtObjectDefinitionState objectDefined()
const;
69 virtual DtReaderWriter* createBoundVariable(
const std::string& variableName);
72 virtual void setupFromBoundVariable(
const DtReaderWriter* variableName);
77 QWidget* parent,
const Qt::WindowFlags& flags = 0)
const;
84 virtual void setEntityTypeToCreate(
const DtEntityType&);
88 virtual const DtEntityType& entityTypeCreated()
const;
103 return tr(
"VR-Forces Object Creation").toUtf8().constData();
108 return tr(
"<vrfGuiCoreQt/newTacticalGraphicEntryWidget.h>").toUtf8().constData();
113 return tr(
"tacticalGraphic").toUtf8().constData();
117 static void initializeForQtDesignerExtension(
makVrv::DtDe&, QDesignerFormEditorInterface*);
121 virtual void setVariableData(
const QString&);
123 virtual void setButtonTexts(
const std::string& objectDefinedText,
const std::string& objectBeingDefinedText,
const std::string& objectNotDefinedText);
124 virtual void setStatusTexts(
const std::string& objectDefinedText,
const std::string& objectBeingDefinedText,
const std::string& objectNotDefinedText);
126 virtual void setVertices(
const std::vector<DtVector>& positions);
137 virtual void setupGui();
140 virtual void setupConnections();
143 virtual void setRange(
double top,
double bottom);
146 virtual void setDefaultValue(
const std::string&);
149 virtual void closeEvent(QCloseEvent* event);
152 virtual void hideEvent(QHideEvent* event);
158 virtual void slot_onDefineButtonClicked();
193 virtual void setReadOnly(
bool);
196 virtual void onSelectEntityType();
237 return DtNewTacticalGraphicEntryWidget::staticMetaObject.className();
291 virtual QAction *preferredEditAction()
const;
295 virtual void editState();
DtObjectDefinitionState myObjectDefinitionState
Definition: newTacticalGraphicEntryWidget.h:175
QToolButton * myEntityTypeEditButton
Definition: newTacticalGraphicEntryWidget.h:202
DtNewTacticalGraphicEntryWidgetLogic * myLogic
Definition: newTacticalGraphicEntryWidget.h:176
virtual DtTaskSetVariableWidgetInterface * create(makVrv::DtDe &de, QWidget *parent, const Qt::WindowFlags &flags=0, const DtTaskSetVariableWidgetInterface::CreationFlags &cflags=DtTaskSetVariableWidgetInterface::NormalMode)
Definition: newTacticalGraphicEntryWidget.h:215
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
std::string myButtonObjectNotDefinedText
Definition: newTacticalGraphicEntryWidget.h:169
std::string myButtonObjectBeingDefinedText
Definition: newTacticalGraphicEntryWidget.h:168
virtual makVrv::DtUnicode codeVariableType() const
Definition: newTacticalGraphicEntryWidget.h:230
virtual std::string designerGroup() const
The designer group that this is going into.
Definition: newTacticalGraphicEntryWidget.h:240
#define DT_DLL_VRFGUICOREQT
Definition: vrfGuiCoreQt.h:26
DtObjectDefinitionState
Definition: newTacticalGraphicEntryWidget.h:43
Definition: newTacticalGraphicEntryWidget.h:45
This class will parse the UI file for known scripted task variable types and pull out specified scrip...
Definition: scriptedTaskVariableLayoutConverter.h:32
Definition: readerWriter.h:85
static makVrv::DtUnicode codeVariableType()
Definition: newTacticalGraphicEntryWidget.h:96
void init()
Creates the object, sets up the GUI, and sets up the signal/slot connections for this widget...
QWidget * myWidget
Definition: newTacticalGraphicEntryWidget.h:161
QHBoxLayout * myLayout
Definition: newTacticalGraphicEntryWidget.h:199
DtNewTacticalGraphicEntryWidgetCreator()
Definition: newTacticalGraphicEntryWidget.h:208
boost::signals2::signal< void()> signal_statusChanged
Signals.
Definition: newTacticalGraphicEntryWidget.h:129
virtual ~DtNewTacticalGraphicEntryWidgetCreator()
Definition: newTacticalGraphicEntryWidget.h:211
QPushButton * myDefineButton
Definition: newTacticalGraphicEntryWidget.h:163
virtual bool canBeUsedAsWidget() const
Whether or not this shows up as a usable variable widget.
Definition: newTacticalGraphicEntryWidget.h:225
static std::string headerFile()
Definition: newTacticalGraphicEntryWidget.h:106
QLineEdit * myEntityType
Definition: newTacticalGraphicEntryWidget.h:201
std::string myButtonObjectDefinedText
Definition: newTacticalGraphicEntryWidget.h:167
virtual std::string headerFile() const
The header file to include when generating code.
Definition: newTacticalGraphicEntryWidget.h:245
static DtUnicode tr(const char *ascii)
Ascii translation function, used to be compatible with Qt's translation tools. This will simply call ...
Definition: DtUnicode.h:92
static std::string variableName()
Definition: newTacticalGraphicEntryWidget.h:111
static bool canBeUsedAsWidget()
Whether or not this shows up as a usable variable widget.
Definition: newTacticalGraphicEntryWidget.h:91
Definition: newTacticalGraphicEntryWidget.h:46
std::string myStatusObjectNotDefinedText
Definition: newTacticalGraphicEntryWidget.h:173
QLabel * myLabel
Definition: newTacticalGraphicEntryWidget.h:200
Definition: newTacticalGraphicEntryWidget.h:36
static std::string designerGroup()
Definition: newTacticalGraphicEntryWidget.h:101
A class for keeping track of meta data for variables of scripted tasks. The information is currently ...
Definition: scriptedTaskVariable.h:34
QLabel * myStatusLabel
Definition: newTacticalGraphicEntryWidget.h:164
Private to this class.
Definition: newTacticalGraphicEntryWidgetLogic.h:35
virtual std::string variableName() const
The default variable nameto initially assign to this object.
Definition: newTacticalGraphicEntryWidget.h:255
Definition: newTacticalGraphicEntryWidget.h:205
std::string myStatusObjectBeingDefinedText
Definition: newTacticalGraphicEntryWidget.h:172
QHBoxLayout * myLayout
Definition: newTacticalGraphicEntryWidget.h:162
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
std::string myStatusObjectDefinedText
Definition: newTacticalGraphicEntryWidget.h:171
Definition: translator.h:58
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
virtual bool includeInDesigner() const
Include this class in the designer plugin.
Definition: newTacticalGraphicEntryWidget.h:250
virtual std::string className() const
Definition: newTacticalGraphicEntryWidget.h:235
virtual void initializeForQtDesignerExtension(makVrv::DtDe &de, QDesignerFormEditorInterface *core)
Called when initializing widget for potential Qt Designer plugin usage. Please refer to Qt documentat...
Definition: newTacticalGraphicEntryWidget.h:262
Extension widget which allows the entity type of the tactical graphic to be created.
Definition: newTacticalGraphicEntryWidget.h:181
static void initializeForQtDesignerExtension(makVrv::DtDe &, QDesignerFormEditorInterface *)
Add custom menu item to task menu to be able to edit the entity type created by this object...