Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

+43
View File
@@ -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;
};
} // namespace LtsWidgets