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 {
13class CustomLineEdit : public QLineEdit
14{
15 Q_OBJECT
16public:
17 explicit CustomLineEdit(QWidget* parent = 0, bool IsNull = true, bool IsMulti = false);
19 void SetNullCheck(bool IsNull);
20 void SetMultiCheck(bool IsMulti);
21 bool IsNullCheck();
22 bool IsValid();
23 void SetCheckDefault(bool Default);
24 void SetDefaultValue(QString ValueDefault);
25 void ValidateText();
26 void SetLoadedDefaultFlag(bool Loaded);
27 void SetValidator(QValidator* ValidatorSet);
28 void SetPopupMenu();
29 void CreateActions();
30signals:
33 void DecChange();
34 void HexChange();
35 void OctChange();
36public slots:
37 void TryValidate(QString Dummy);
38 void EmitDecSlot();
39 void EmitOctSlot();
40 void EmitHexSlot();
41
42protected:
43 void contextMenuEvent(QContextMenuEvent* Event);
44
45private:
46 bool Valid;
52 QAction* Dec;
53 QAction* Oct;
54 QAction* Hex;
55 QValidator* Validator;
56 QString DefaultValue;
57};
58} // end namespace dbe
59
60#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.