mirror of https://github.com/procxx/kepka.git
Fix build of the new TWidgetHelper<> for Clang and GCC.
This commit is contained in:
parent
25583fa813
commit
232ed0a7c0
|
@ -140,13 +140,13 @@ public:
|
||||||
auto margins = getMargins();
|
auto margins = getMargins();
|
||||||
x -= margins.left();
|
x -= margins.left();
|
||||||
y -= margins.top();
|
y -= margins.top();
|
||||||
move(rtl() ? ((outerw > 0 ? outerw : parentWidget()->width()) - x - width()) : x, y);
|
Base::move(rtl() ? ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - Base::width()) : x, y);
|
||||||
}
|
}
|
||||||
void moveToRight(int x, int y, int outerw = 0) {
|
void moveToRight(int x, int y, int outerw = 0) {
|
||||||
auto margins = getMargins();
|
auto margins = getMargins();
|
||||||
x -= margins.right();
|
x -= margins.right();
|
||||||
y -= margins.top();
|
y -= margins.top();
|
||||||
move(rtl() ? x : ((outerw > 0 ? outerw : parentWidget()->width()) - x - width()), y);
|
Base::move(rtl() ? x : ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - Base::width()), y);
|
||||||
}
|
}
|
||||||
void setGeometryToLeft(int x, int y, int w, int h, int outerw = 0) {
|
void setGeometryToLeft(int x, int y, int w, int h, int outerw = 0) {
|
||||||
auto margins = getMargins();
|
auto margins = getMargins();
|
||||||
|
@ -154,7 +154,7 @@ public:
|
||||||
y -= margins.top();
|
y -= margins.top();
|
||||||
w -= margins.left() - margins.right();
|
w -= margins.left() - margins.right();
|
||||||
h -= margins.top() - margins.bottom();
|
h -= margins.top() - margins.bottom();
|
||||||
setGeometry(rtl() ? ((outerw > 0 ? outerw : parentWidget()->width()) - x - w) : x, y, w, h);
|
Base::setGeometry(rtl() ? ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - w) : x, y, w, h);
|
||||||
}
|
}
|
||||||
void setGeometryToRight(int x, int y, int w, int h, int outerw = 0) {
|
void setGeometryToRight(int x, int y, int w, int h, int outerw = 0) {
|
||||||
auto margins = getMargins();
|
auto margins = getMargins();
|
||||||
|
@ -162,25 +162,25 @@ public:
|
||||||
y -= margins.top();
|
y -= margins.top();
|
||||||
w -= margins.left() - margins.right();
|
w -= margins.left() - margins.right();
|
||||||
h -= margins.top() - margins.bottom();
|
h -= margins.top() - margins.bottom();
|
||||||
setGeometry(rtl() ? x : ((outerw > 0 ? outerw : parentWidget()->width()) - x - w), y, w, h);
|
Base::setGeometry(rtl() ? x : ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - w), y, w, h);
|
||||||
}
|
}
|
||||||
QPoint myrtlpoint(int x, int y) const {
|
QPoint myrtlpoint(int x, int y) const {
|
||||||
return rtlpoint(x, y, width());
|
return rtlpoint(x, y, Base::width());
|
||||||
}
|
}
|
||||||
QPoint myrtlpoint(const QPoint p) const {
|
QPoint myrtlpoint(const QPoint p) const {
|
||||||
return rtlpoint(p, width());
|
return rtlpoint(p, Base::width());
|
||||||
}
|
}
|
||||||
QRect myrtlrect(int x, int y, int w, int h) const {
|
QRect myrtlrect(int x, int y, int w, int h) const {
|
||||||
return rtlrect(x, y, w, h, width());
|
return rtlrect(x, y, w, h, Base::width());
|
||||||
}
|
}
|
||||||
QRect myrtlrect(const QRect &r) const {
|
QRect myrtlrect(const QRect &r) const {
|
||||||
return rtlrect(r, width());
|
return rtlrect(r, Base::width());
|
||||||
}
|
}
|
||||||
void rtlupdate(const QRect &r) {
|
void rtlupdate(const QRect &r) {
|
||||||
update(myrtlrect(r));
|
Base::update(myrtlrect(r));
|
||||||
}
|
}
|
||||||
void rtlupdate(int x, int y, int w, int h) {
|
void rtlupdate(int x, int y, int w, int h) {
|
||||||
update(myrtlrect(x, y, w, h));
|
Base::update(myrtlrect(x, y, w, h));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -214,10 +214,10 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TWidget *tparent() {
|
TWidget *tparent() {
|
||||||
return qobject_cast<TWidget*>(parentWidget());
|
return qobject_cast<TWidget*>(Base::parentWidget());
|
||||||
}
|
}
|
||||||
const TWidget *tparent() const {
|
const TWidget *tparent() const {
|
||||||
return qobject_cast<const TWidget*>(parentWidget());
|
return qobject_cast<const TWidget*>(Base::parentWidget());
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -130,13 +130,6 @@ signals:
|
||||||
void linksChanged();
|
void linksChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void enterEventHook(QEvent *e) {
|
|
||||||
return QTextEdit::enterEvent(e);
|
|
||||||
}
|
|
||||||
void leaveEventHook(QEvent *e) {
|
|
||||||
return QTextEdit::leaveEvent(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool viewportEvent(QEvent *e) override;
|
bool viewportEvent(QEvent *e) override;
|
||||||
void touchEvent(QTouchEvent *e);
|
void touchEvent(QTouchEvent *e);
|
||||||
void paintEvent(QPaintEvent *e) override;
|
void paintEvent(QPaintEvent *e) override;
|
||||||
|
@ -272,13 +265,6 @@ signals:
|
||||||
void blurred();
|
void blurred();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void enterEventHook(QEvent *e) {
|
|
||||||
return QLineEdit::enterEvent(e);
|
|
||||||
}
|
|
||||||
void leaveEventHook(QEvent *e) {
|
|
||||||
return QLineEdit::leaveEvent(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool event(QEvent *e) override;
|
bool event(QEvent *e) override;
|
||||||
void touchEvent(QTouchEvent *e);
|
void touchEvent(QTouchEvent *e);
|
||||||
void paintEvent(QPaintEvent *e) override;
|
void paintEvent(QPaintEvent *e) override;
|
||||||
|
@ -746,13 +732,6 @@ protected:
|
||||||
void resizeEvent(QResizeEvent *e) override;
|
void resizeEvent(QResizeEvent *e) override;
|
||||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||||
|
|
||||||
void enterEventHook(QEvent *e) {
|
|
||||||
return QLineEdit::enterEvent(e);
|
|
||||||
}
|
|
||||||
void leaveEventHook(QEvent *e) {
|
|
||||||
return QLineEdit::leaveEvent(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void correctValue(const QString &was, int32 wasCursor, QString &now, int32 &nowCursor) {
|
virtual void correctValue(const QString &was, int32 wasCursor, QString &now, int32 &nowCursor) {
|
||||||
}
|
}
|
||||||
void setCorrectedText(QString &now, int &nowCursor, const QString &newText, int newPos);
|
void setCorrectedText(QString &now, int &nowCursor, const QString &newText, int newPos);
|
||||||
|
|
|
@ -211,8 +211,8 @@ protected:
|
||||||
void moveEvent(QMoveEvent *e) override;
|
void moveEvent(QMoveEvent *e) override;
|
||||||
void touchEvent(QTouchEvent *e);
|
void touchEvent(QTouchEvent *e);
|
||||||
|
|
||||||
void enterEventHook(QEvent *e);
|
void enterEventHook(QEvent *e) override;
|
||||||
void leaveEventHook(QEvent *e);
|
void leaveEventHook(QEvent *e) override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void scrollToY(int toTop, int toBottom = -1);
|
void scrollToY(int toTop, int toBottom = -1);
|
||||||
|
|
Loading…
Reference in New Issue