VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
chatMessageChannel.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
9 
11 #include <boost/signals2.hpp>
12 
13 class QToolButton;
14 class QComboBox;
15 class QLabel;
16 
17 namespace makVrf
18 {
19  class DtForceSelectionEntryWidget;
20 
23  {
24  Q_OBJECT
25 
26  public:
27  DtChatMessageChannel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
28 
29  //DTOR
30  virtual ~DtChatMessageChannel() override;
31 
35  virtual void setRange(double bottom, double top) override {};
36 
38  virtual void setDefaultValue(const std::string&) override {};
39 
40  virtual void setVariableData(const QString&) override;
41 
43 
44  virtual void setForceType(int);
45  virtual int forceType() const;
46 
47  virtual void setChannel(const DtString&);
48  virtual DtString channel() const;
49  virtual std::pair<DtString, int> channelWithForce() const;
50 
51  virtual void setLabel(const QString& s) override;
52 
55  virtual DtReaderWriter* createBoundVariable(const std::string& variableName) override;
56 
58  virtual void setupFromBoundVariable(const DtReaderWriter* variableName) override;
59 
61  {
62  return makVrv::DtUnicode::tr("Chat Message Channel: force,channel");
63  }
64 
65  static std::string designerGroup()
66  {
67  return tr("VR-Forces Entity Manipulation").toUtf8().constData();
68  }
69 
70  static std::string headerFile()
71  {
72  return tr("<vrfGuiDataEntryWidgets/chatMessageChannel.h>").toUtf8().constData();
73  }
74 
75  static std::string variableName()
76  {
77  return tr("chatMessageChannel").toUtf8().constData();
78  }
79 
81  virtual void addChannel(int force, const DtString&);
82 
83  virtual void setAllowMultipleForceSelection(bool b);
85  {
86  return myAllowMultipleForceSelection;
87  }
88 
89  boost::signals2::signal<void ()> signal_forceChanged;
90  boost::signals2::signal<void ()> signal_channelChanged;
91 
92  protected slots:
93  virtual void forceSelectionChanged();
94  virtual void forcesSelectionChanged();
95  virtual void channelChanged();
96 
97  protected:
98  virtual void forceChanged();
99  virtual void channelAdded(int force, const DtString&);
100 
101  public:
104 
105  protected:
106  bool myAllowMultipleForceSelection = false;
107  boost::signals2::connection myForceSelectionChangedConnection;
108  };
109 
111 }
Widget that allows the selection of a force.
Definition: forceSelectionEntryWidget.h:62
boost::signals2::signal< void()> signal_forceChanged
Definition: chatMessageChannel.h:89
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
CreationFlags
Definition: taskSetVariableWidget.h:118
Definition: readerWriter.h:85
QComboBox * myChannel
Definition: chatMessageChannel.h:103
Simple line text entry widget that will allow the user to enter a heading value.
Definition: chatMessageChannel.h:22
Basic implementation that has a label at the top.
Definition: taskSetVariableWidget.h:231
static std::string headerFile()
Definition: chatMessageChannel.h:70
virtual void setDefaultValue(const std::string &) override
Default value to set in control.
Definition: chatMessageChannel.h:38
static DtUnicode tr(const char *ascii)
Ascii translation function, used to be compatible with Qt&#39;s translation tools. This will simply call ...
Definition: DtUnicode.h:92
bool allowMultipleForceSelection() const
Definition: chatMessageChannel.h:84
Definition: taskSetVariableWidget.h:422
DtTaskSetVariableWidgetCreator< DtChatMessageChannel > DtChatMessageChannelCreator
Definition: chatMessageChannel.h:110
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
DtForceSelectionEntryWidget * myForce
Definition: chatMessageChannel.h:102
static std::string variableName()
Definition: chatMessageChannel.h:75
static std::string designerGroup()
Definition: chatMessageChannel.h:65
boost::signals2::signal< void()> signal_channelChanged
Definition: chatMessageChannel.h:90
static makVrv::DtUnicode codeVariableType()
Definition: chatMessageChannel.h:60
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:76
boost::signals2::connection myForceSelectionChangedConnection
Definition: chatMessageChannel.h:107
virtual void setRange(double bottom, double top) override
These methods must be implemented in order to be considered a DtTaskSetVariable that can be used as p...
Definition: chatMessageChannel.h:35

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)