DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
CustomLineEdit.hpp
Go to the documentation of this file.
1#ifndef CUSTOMLINEEDIT_H
2#define CUSTOMLINEEDIT_H
3
4#include <QLineEdit>
5#include <QValidator>
6
7namespace dbe
8{
9class CustomLineEdit: public QLineEdit
10{
11 Q_OBJECT
12public:
13 explicit CustomLineEdit ( 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 ( QString Dummy );
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 // 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.