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#ifndef STRING_ATTR_TEXT_EDIT_H
2#define STRING_ATTR_TEXT_EDIT_H
3
4#include <QTextEdit>
5#include <QValidator>
6
7namespace dbe
8{
9class string_attr_text_edit: public QTextEdit
10{
11 Q_OBJECT
12public:
13 explicit string_attr_text_edit ( QWidget * parent = 0, bool IsNull = true, bool IsMulti = false );
15 void SetNullCheck ( bool IsNull );
16 void SetMultiCheck ( bool IsMulti );
17 bool IsNullCheck();
18 bool IsValid();
19 void SetCheckDefault ( bool Default );
20 void SetDefaultValue ( QString ValueDefault );
21 void ValidateText();
22 void SetLoadedDefaultFlag ( bool Loaded );
23 void SetValidator ( QValidator * ValidatorSet );
24 void SetPopupMenu();
25 void CreateActions();
26signals:
29 void DecChange();
30 void HexChange();
31 void OctChange();
32public slots:
33 void TryValidate ();
34 void EmitDecSlot();
35 void EmitOctSlot();
36 void EmitHexSlot();
37protected:
38 void contextMenuEvent ( QContextMenuEvent * Event );
39private:
40 bool Valid;
45 QMenu * ContextMenu;
46 QAction * Dec;
47 QAction * Oct;
48 QAction * Hex;
49 QValidator * Validator;
50 QString DefaultValue;
51};
52} // end namespace dbe
53
54#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.