Continues migration with DDS, Common
This commit is contained in:
1 parent
9b15cee841
commit
fa48db111e
668 files changed
+111841
-2
No files matched your search
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include <QLineEdit>
|
||||
|
||||
namespace LtsWidgets
|
||||
{
|
||||
|
||||
class LineEdit : public QLineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
using QLineEdit::QLineEdit;
|
||||
|
||||
void clear();
|
||||
bool isEmpty() const;
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
void focusOutEvent(QFocusEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
Q_SIGNALS:
|
||||
void focusOutBackspace();
|
||||
void focusOut();
|
||||
};
|
||||
|
||||
class DigitsLineEdit final : public LineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DigitsLineEdit(QWidget *parent = nullptr);
|
||||
|
||||
void setExactNumDigits(int num);
|
||||
void setCursorPosition(int curPos);
|
||||
void setValue(int val);
|
||||
int getValue() const;
|
||||
Q_SIGNALS:
|
||||
void wheelEventReceived(bool bForward, int cursorPos);
|
||||
protected:
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
private:
|
||||
int m_exactNumDigits = -1;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user