DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
CustomLineEdit.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/CustomLineEdit.h to include/dbe/CustomLineEdit.hpp).
5
6#ifndef CUSTOMLINEEDIT_H
7#define CUSTOMLINEEDIT_H
8
9#include <QLineEdit>
10#include <QValidator>
11
12namespace dbe
13{
14class CustomLineEdit: public QLineEdit
15{
16 Q_OBJECT
17public:
18 explicit CustomLineEdit ( 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 ( QString Dummy );
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 // CUSTOMLINEEDIT_H
void SetValidator(QValidator *ValidatorSet)
void SetLoadedDefaultFlag(bool Loaded)
void SetCheckDefault(bool Default)
CustomLineEdit(QWidget *parent=0, bool IsNull=true, bool IsMulti=false)
Include Qt Headers.
void SetMultiCheck(bool IsMulti)
void SetNullCheck(bool IsNull)
void contextMenuEvent(QContextMenuEvent *Event)
void SetDefaultValue(QString ValueDefault)
void TryValidate(QString Dummy)
Include QT Headers.