DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
string_attr_text_edit.hpp
Go to the documentation of this file.
1// DUNE DAQ modification notice:
2// This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
3// Fork baseline commit: dbe-02-12-17 (2022-05-12).
4// Renamed since fork: yes (from dbe/string_attr_text_edit.h to include/dbe/string_attr_text_edit.hpp).
5
6#ifndef STRING_ATTR_TEXT_EDIT_H
7#define STRING_ATTR_TEXT_EDIT_H
8
9#include <QTextEdit>
10#include <QValidator>
11
12namespace dbe
13{
14class string_attr_text_edit: public QTextEdit
15{
16 Q_OBJECT
17public:
18 explicit string_attr_text_edit ( QWidget * parent = 0, bool IsNull = true, bool IsMulti = false );
20 void SetNullCheck ( bool IsNull );
21 void SetMultiCheck ( bool IsMulti );
22 bool IsNullCheck();
23 bool IsValid();
24 void SetCheckDefault ( bool Default );
25 void SetDefaultValue ( QString ValueDefault );
26 void ValidateText();
27 void SetLoadedDefaultFlag ( bool Loaded );
28 void SetValidator ( QValidator * ValidatorSet );
29 void SetPopupMenu();
30 void CreateActions();
31signals:
34 void DecChange();
35 void HexChange();
36 void OctChange();
37public slots:
38 void TryValidate ();
39 void EmitDecSlot();
40 void EmitOctSlot();
41 void EmitHexSlot();
42protected:
43 void contextMenuEvent ( QContextMenuEvent * Event );
44private:
45 bool Valid;
50 QMenu * ContextMenu;
51 QAction * Dec;
52 QAction * Oct;
53 QAction * Hex;
54 QValidator * Validator;
55 QString DefaultValue;
56};
57} // end namespace dbe
58
59#endif // STRING_ATTR_TEXT_EDIT_H
void SetDefaultValue(QString ValueDefault)
string_attr_text_edit(QWidget *parent=0, bool IsNull=true, bool IsMulti=false)
Include Qt Headers.
void contextMenuEvent(QContextMenuEvent *Event)
void SetValidator(QValidator *ValidatorSet)
Include QT Headers.